Chapter 1. Baby Steps to Automation
Puppet is a configuration management framework with an object-oriented twist. It provides a declarative language syntax and an abstraction layer that allow you to write heavily reusable and understandable configuration definitions. In this chapter, I’ll cover the basics of the Puppet programs, the language syntax, and some simple class and resource definitions.
Getting the Software
A Puppet deployment comes with a couple of pieces of software. For
the most part, these can be installed from your chosen Linux
distribution’s package manager. Alternatively, you can use the packages or
source provided by Puppet Labs at http://www.puppetlabs.com/misc/download-options/. In my
examples, I’ve used Ubuntu Linux 11.04, but the packages are very similar
in each distro. There are generally two packages: the Puppet package
itself, which comes with Facter, and the Puppet Master server. For the
purposes of this chapter, the Puppet and Facter package will suffice. When
installed, it will include an init script to start an “agent” daemon at
boot, which will look for a Puppet Master. For simplicity’s sake, we will
test manifests from the command line using the puppet apply command to begin:
Ubuntu:
apt-get install puppetFedora:
yum install puppetMac OS X:
port install puppet
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access