Notice: Undefined index: order_next_posts in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 194

Notice: Undefined index: post_link_target in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 195

Notice: Undefined index: posts_featured_size in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 196

Puppet – server management made easy

Make server management and configuration easy with Puppet. Koen Vervloesem shows you the way...

This article originally appeared in issue 89 of Linux User & Developer magazine.

Subscribe and save more than 30% and receive our exclusive money back guarantee – click here to find out more.

Puppet – Open source data centre automation and configuration management framework
ERB – Powerful templating system for Ruby
Puppet Recipes – Recipes for configuring Puppet
Puppet Dashboard – Web interface and reporting tool for Puppet

If you have more than a handful of servers, maintaining them by hand becomes a tedious task. Of course, you can automate this with shell scripts, but this is an ad hoc solution. Puppet can help you to reach a more consistent way of managing your servers. All your configuration changes are made in a central repository and pushed to your various servers, which can be Linux, BSD or Solaris. There are lot of ready-made Puppet modules to configure various system components, and everyone can write their own Puppet modules.

When you install an operating system on a server, you know more or less the exact configuration of the system: you have entered it manually during the installation or you have initialised it with an automated installation system such as Kickstart (Red Hat) or Jumpstart (Solaris). But from the moment the server starts running, the uncertainty about the configuration begins. For instance, let’s say you have tweaked a configuration file without documenting it. When problems arise later, you decide to reinstall the system, but you have forgotten about the configuration change and you have to re-learn it the hard way. The result: you are losing time and making too many errors.

The alternative to this trial-and-error method is using a configuration management system. This way, you enter your configuration changes in a central repository and push them to your various servers. After a reinstallation, the servers just have to get their configuration from the central repository. One popular open source configuration management system is Puppet, created by Puppet Labs (formerly known as Reductive Labs). It allows you to maintain packages, files, services, users and groups, abstracting this in such a way that you can use mostly the same code on Debian, Red Hat, FreeBSD, Solaris and so on.

Testing a potentially troublesome configuration change also becomes easy thanks to Puppet: just install a new server, be it physical or virtual, and apply the original configuration to it. Then push the configuration change to the test server and check if all functionality still works. If no problems arise, you can apply the change to your production server.

Using a configuration management system like Puppet is especially useful in combination with a revision control system, such as Git or Subversion: if you version all your changes to the Puppet configuration files in a revision control system, you can always revert to a previous configuration if a new configuration turns out to be disastrous.

[twitter username=”linuxusermag”]