Puppet is one of the oldest IaC applications, and as such, it's a stable and proven solution. What are its features?
Puppet is one of the main tools available for managing what is known as IaC or Infrastructure as Code. As a reminder, IaC is an approach that enables a systems engineer to manage an IT infrastructure using predefined configuration scripts.
What is Puppet?
Puppet was created by consultant Luke Kanies in 2005, and he played a major role in the development of IaC. From the outset, the goal was to help system administrators automate server infrastructure management.
How does Puppet work?
Puppet works from a “manifest”, a script that specifies what is to be accomplished:
- Execute commands ;
- Start certain services;
- Install software ;
- etc.
In a manifest, the system administrator specifies a precise list of instructions – how a particular server is to be configured, etc. – and Puppet then takes care of them. – and Puppet takes care of them.
Once set up, a manifest can be reused and applied unchanged to other servers. If a change occurs in the infrastructure, simply update the manifest.
Puppet's main features
Having been one of the pioneers of the IaC movement, Puppet has defined several standards in the field.
Declarative language
All you have to do is describe how you want the system to end up. Puppet takes care of implementing the necessary procedures.
Agent/master model
Puppet requires an agent to be installed on each node (individual machine), which will receive configurations from the “master” machine.
Reporting system
The ability to produce detailed, versioned reports facilitates audits.
Factor
This Puppet-integrated tool collects detailed information on nodes, making it easy to adapt to specific configurations.
Predefined modules
The Puppet Forge library is home to many pre-built modules.
Maturity
Thanks to its long history, Puppet is a stable, well-documented tool, with a strong community of users ready to help each other.
Examples of use
Let’s imagine that a company manages hundreds of servers, each of which must be configured identically to the others. A single manifest will do the trick.
Do all the company’s servers need to be updated one day with a certain piece of software? A Puppet script can manage this global operation and ensure that all servers are running the exact same version of the software.
A company manages a wide variety of IT environments: some dedicated to the sale of products, others to research, others to program development
All you need to do is write Puppet manifests adapted to each environment and update them individually whenever necessary.
Puppet compared to other IaC products
Here are some of Puppet’s major competitors in IaC.
Ansible
Unlike Pupplet, Ansible stands out for its agentless approach (no agent needs to be installed on target servers). It is sometimes preferred to Puppet for rapid, small-scale deployments, whereas Puppet is chosen for more complex, long-term operations.
Chef
Where Puppet uses manifests, Chef lets administrators describe the infrastructure using “recipes”, defined in the Ruby language. Developers accustomed to this language can therefore take advantage of it.
Salt (ou SaltStack)
Capable of managing large infrastructures, this tool is often praised for its speed of communication with remote servers – enabling real-time commands to be executed on a massive scale.
Terraform
Like Puppet, it is based on a “declarative” approach: the administrator describes the desired state, and Terraform takes care of implementing it. Terraform specializes in cloud computing infrastructure management.