Audvik Labs

Setting Up And Using Puppet


Puppet is a configuration management tool that simplifies system administration. Puppet uses a client/server model in which your managed nodes, running a process called the Puppet agent, talk to and pull down configuration profiles from a Puppet master.

Puppet deployments can range from small groups of servers up to enterprise-level operations. 

Puppet, from Puppet Labs, is a configuration management tool that helps system administrators automate the provisioning, configuration, and management of a server infrastructure. Planning ahead and using config management tools like Puppet can cut down on time spent repeating basic tasks, and help ensure that your configurations are consistent and accurate across your infrastructure. 

Puppet comes in two varieties, Puppet Enterprise and open source Puppet. It runs on most Linux distributions, various UNIX platforms, and Windows.


Before  getting started with installing Puppet, ensure that you have the following prerequisites:

  • Private Network DNS: Forward and reverse DNS must be configured, and every server must have a unique hostname. 
  • Firewall Open Ports: The Puppet master must be reachable on port 8140.


We need to enable the official Puppet Labs collection repository in both Puppet Master and Puppet Agent. Copy the link location of the repository according to the version of CentOS that you are using.

To install Puppet Master execute the below command:

yum install puppet-server

Puppet follows a master-slave pull-based architecture, Where multiple slaves/agents serve a master or we can say a master node controls multiple slaves.

Puppet slave first requests for a master certificate, the master sends its certificate and request for the slave certificate. All the information which is communicated between master and slave nodes is encrypted using SSL certificates. Once certificates are transferred on both ends, we need to sign the slave certificate on the master server in order to authenticate slave.

Run following commands to setup Puppet master on the master server:


$ curl -O https: //apt. puppetlabs. com /puppetlabs-release-pc1-xenial.deb
$ sudo dpkg -i puppetlabs-release-pc1-xenial.deb
$ sudo apt-get update
$ sudo apt-get install puppetserver or sudo apt-get install puppetmaster






Puppet uses port 8140 to communicate, so we’ll ensure it’s open:

$ sudo ufw allow 8140

Installation can be checked by running the following commands:

$ apt policy puppetmaster
$ sudo systemctl status puppetmaster.service

To connect to the slave server, slave should have DNS set up .



  • Infrastructure as code(IaC): It enables you to define infrastructure as code (IaC) with ease of coding as IaC plays a crucial part in DevOps practices such as version control(VCS), automated testing & deployment, and CD.
  • Disaster Recovery:  Downtime due to misconfiguration issues can be reduced significantly, also can be avoided in most cases, as the speed of recovery gets pretty fast.
  • It allows a significant time saving with its speed of deployment. An open-source developer platform backs puppet.
  • Puppet works fine even on an extensive infrastructure by automating repetitive tasks & giving constant outputs.
  • It supports a vast variety of Mac OS, Microsoft Windows, Debian & many more. The best part is, it uses easy-to-learn language to define the configurations.


Puppet applies a continuous delivery model to the software release cycle by automating operations and deployment workflow.

System administration tasks are saved as manifests and modules. These are reusable configuration construction blocks to speedily create preconfigured servers.

Puppet has wide industry support across the cloud and DevOps ecosystem. It works with just about every server platform in the market today.

Leave a comment

Your email address will not be published. Required fields are marked *