Write once reuse many times over.

What is puppet?

Puppet is a automation tool for managing infrastructure. It allows you to describe machines in an easy to understand way and then repeatably and reliably build those machines.

Our approach to puppet

There are 3 component parts to how we use Puppet:

  • The Manifests Repository
  • The Hiera Data
  • Puppet Dashboard

In the following sections we'll go through each of these.

The Manifests repository

Puppet works on the principle of Resources. Resources are a unit of configuration, for example a yum package or permissions on a directory. Manifests are the files that define the Resources and are then interpreted by Puppet.

We have a single Manifests Repository that contains configurations for a number of the common services that we use on our infrastructure for example; PostgreSQL, Ruby, Redis, Elastic Search, and it continues to grow as new requirements emerge.

The Hiera Data

Hiera Data is a mechanism within Puppet to inject specific variables into our Manifests, this allows us to take a generic PostgreSQL manifest and apply it to a particular machine with variables like; version, database name, users credentials etc. This means we can re-use our manifests across multiple machines and across multiple projects without needing to duplicate the manifests.

Hiera can be defined in a number of ways, we use the JSON format becasue it is familiar to all developers and it is much easier to understand than some of the alternatives.

Puppet Dashboard

The Puppet Dashboard is a web based interface for Puppet. We use this tool to apply particular manifests and hiera data to machines. It also gives us a history of all puppet executions and the current state of the machine.