Puppet – Introduction
Puppet is a configuration management tool which can be help to address the following challenges:
- Deploying servers with a consistent configuration.
- Addressing inconsistent configurations (config drift).
- Application deployment.
- Automation – as part of CI & CD, get it down faster!
Before the likes of Puppet and Chef, SysOps typically would have a repository of scripts used to configure servers. Despite the arrival of configuration management tools, the use of scripts is still common place. So, why not use scripts?
- Scripts take time to write, test & debug.
- Scripts are procedural and focus on how something is done rather than the end result. This can involve high levels of complexity.
- Scripts are idiosyncratic – there are many ways to achieve the same objective. As people have their own approach, it may not be easy for someone else to understand what is happening.
- Scripts need to handle different Operating Systems and versions such as package handles (yum/apt-get).
Why use Puppet?
Puppet uses definition files (manifests) which are declarative – they describe the desired configuration state (DCS) rather than how to get there. The manifests are easier to read and understand, less complex (few lines and less logic), plus are pretty much self-documenting.
Puppet also abstracts the resources which means that services can be defined once and then configured across multiple servers e.g. the configuration of Apache can be defined in a manifest which is then used on different *nix platforms such as Red Hat or Solaris. Other resources include patches, software packages, file system objects (files & folders) and user accounts/groups.
With the availability of alternatives, why use Puppet?
According to a review of leading configuration management tools by InfoWorld (2013), Puppet achieved maximum points across six categories outscoring Ansible, Chef and SaltStack.
Puppet will help you perform the following tasks:
- Enforce consistent configuration across all servers.
- Deploy applications as frequently as desired.
- Manage all of the application configurations.
- Spend less time writing, testing and debugging.
- Minimise configuration mistakes and downtime.
- Automate all of the above.