1. More strings for the Puppet

    Automating system configuration is something every sysadmin should want to achieve. Even if you don’t have physical boxes to configure and manage on a regular basis, increasingly we use virtualisation to spin up machines everywhere from a developer box to the cloud (e.g. EC2) and these machines all need to go from zero to hero, preferably without human intervention.

    Tools to automate the job of configuring hosts have been around for many, many years. The likes of bcfg2 are no longer the cool kids though, so if you want street cred you’re going to have to make friends with Puppet or Chef and getting familiar with one of them should probably be on your todo list if you’ve not already tried them.

    Puppet seems to have the biggest crowd around it and it’s relatively simple declarative language works well. With a move from the 0.2x version to 2.x series (subtle change of version numbering - don’t think anyone noticed) a lot of annoyances have been resolved.

    My main gripe was with managing applications on Ubuntu from repositories other than the Ubuntu ones. Creating a class to add the PPA or repo location, trigger an apt-get update and install the package is easy enough. But do this 20 times and you have 20 updates executed on each catalogue run if there are 20 changes. What you’d want is all apt sources to be updated by all classes that do so, then have apt-get update once and then carry on to install packages. Prior to recent releases achieving this was only possibly by explicitly setting all those relationships which is not a scalable, generic solution.

    John Leach (twitter @johnleach) explains how to solve this very problem using new syntax in this blog post. It’s a pattern sure to be valuable in other cases so even if you’re familiar with Puppet, have a read of the updated Puppet syntax just in case there’s a slicker way of expressing your rules.

    None of these systems are perfect, but Puppet is advancing quickly and covers a lot of bases so if you have yet to use a configuration management system you should pay it close attention.

Notes

  1. zorinholdings posted this