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.
Resources:
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.















Excellent article.
Clear and concise would be the right words to describe the content.
Not heard of Chef??
@Bobo: Chef is a project fork/spin-off from Puppet by another group. At this point in time it has though diverged significantly.
As happy puppet user on my Linux servers, I am looking forward to testing the just released Windows support. It is still bare bones but should grow quickly.
There is another web interface for puppet and puppet reports which is more mature:
http://theforeman.org/wiki/foreman/Screenshots
You can find rpms and debs as well:
http://groups.google.com/group/puppet-users/browse_thread/thread/05a19667555658a3
I prefer a more lightweight and versatile solution: Cfengine
Facebook runs Cfengine on all their machines.
(http://www.datacenterknowledge.com/archives/2010/06/25/a-day-in-the-life-of-a-facebook-engineer/) Minute 8-9 is on Cfengine.
http://www.cfengine.org
There’s a simple Puppet tutorial here to help people get started with installing it, setting it up to manage a client machine, and creating a basic configuration:
http://bitfieldconsulting.com/puppet-tutorial
Hope it’s helpful!
I talk about numerous topics, still debating in every single element that may be debated, and at the finish of my course (every single week), I advised them in regards to the conclusion of your respective theme. Hot theme and environment can be fun right here. After which, you might be shocked that my college students received new story every single working day, and also all of them can express their thought in residence and college.
There are many alternative server management frameworks – good comparison is here – https://secure.wikimedia.org/wikipedia/en/wiki/Comparison_of_open_source_configuration_management_software.
I personally prefer plain OS :) or PCfengine
Hi,
I have configured puppet on centos for testing purpose. server is working fine. but getting error at the time of connect from client. Please help me. I got following error
……………………………………..
[root@manoj puppet]# puppet agent –test
err: Could not retrieve catalog from remote server: Connection refused – connect(2)
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
[root@manoj puppet]# puppet agent –test –server=127.0.0.1
err: Could not retrieve catalog from remote server: Connection refused – connect(2)
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
…………………………………………………………………….