Puppet – In DevOps

What is puppet and why should we consider it in infrastructure to manage servers?

The traditional infrastructure contains various servers that run several applications in it. We system engineers used bash scripts and power shell scripts to manage those servers including installing updates and configuring services. This process is generally called configuration management. Configuration management is a process of configuring servers in a consistent and desired way. Implementing configuration management in large infrastructure is a hectic job for engineers. It contains different servers with its configuration to manage that configurations we need to write scripts to manage its functionality. We need to repeat this task for every server with a unique script.

When DevOps came into picture various tools implemented to automate each task with simple scripts. To automate configuration management, we have several tools based on the infrastructure requirement.

Generally, configuration management works in two ways

1) push-based mechanism

2) pull-based mechanism 

Push based mechanism:

In this mechanism, we have master and agent setup. Master and agent are having a communication channel to communicate with each other. In a push-based mechanism, the master pushes or initiates the required configuration to its agents. Tools: Ansible, Salt stack

Pull based mechanism:

In pull-based mechanism, Agent requests configuration to the master, and master is having all the configuration changes in its repository and it will release to the agents based on the request. Tools: Puppet, Chef


Puppet is a configuration management tool to automate server related tasks including managing and deploying servers. Puppet uses master and agent setup to its full-fledged implementation. Puppet uses simple setup to manage servers including deploying and automating server tasks.

Puppet works with its programming language called, Domain-Specific Language and it is written in Ruby language. We can’t say puppet is purely based on programming and purely on scripting, it uses a declarative approach to finish its tasks. It will come under the concept of infrastructure as a code.

In Realtime, suppose we have 200 servers and they are running continuously to serve maximum uptime for applications. Let us say ubuntu versions and cent OS versions are running in that servers and got mandatory security updates. Pushing updates with a script also a big task for various versions so we can do one thing here. I will connect all the servers to one puppet master and puppet agents request or we can say communicates with the master for every 30 mins. When it got contact with master it will push all the required updates. It will save man-hours too.

Puppet, available to two projects.

  1. Open-source
  2. Enterprise 

Deployment with puppet:

The main aim of the puppet is to automate deployment tasks and provide faster output to the infrastructure.

Puppetmaster and agents are in sync for every half-hour generally. At that time puppet master gathers agent’s complete configuration using Facter command. Facter command gathers agent’s information like hostnames, SSH keys, Kernel details, etc. this data is stored in Puppet DB and Hiera.

Puppet providing puppet forge to provide modules to the communities. Puppet’s main advantages are, it saves system admin tasks and it helps us for continuous delivery in automating workflows.

Leave a Reply

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