1 min read

The following provides instructions on how to install a particular version of Puppet from Puppet Labs' own APT repos, this is particularly useful if you run different O/S versions across your puppet nodes or simply don't want to use the versions bundled with your particular Ubuntu distro.

This will cover puppet rather than puppetmaster but the basic installation principles are the same for both, it's simply the configuration which is different between the two.

I'm writing this mostly as an aide-mémoire to myself as it's one of those things that I do infrequently enough that I'm always forgetting the precise steps.

# First of all ensure that you have uninstalled any existing puppet installation
sudo apt-get --purge remove puppet
sudo rm -fr /etc/puppet

# Install the Puppetlabs GPG key.
apt-key adv --recv-key --keyserver pool.sks-keyservers.net 4BD6EC30

# Add the Puppetlabs APT repository to our APT sources
# Note the deliberate carriage return, this is important
# for the 'apt.puppetlabs.com.sources.list' file to be correctly formatted.
sudo sh -c 'echo "deb http://apt.puppetlabs.com natty main
deb-src http://apt.puppetlabs.com natty main" > /etc/apt/sources.list.d/apt.puppetlabs.com.sources.list'

# Install the puppet-common package.
# Shouldn't strictly have to do this as it should be a dependency
# of puppet package but seems to be something wrong witg
# the dependency setup so have to do this manually for 2.7.17 at least.
sudo apt-get install puppet-common=2.7.17-1puppetlabs1
# Install puppet package.
sudo apt-get install puppet=2.7.17-1puppetlabs1

That's it, now just configure puppet as you would do usually (e.g. /etc/puppet/puppet.conf and /etc/default/puppet), register your client's cert with your puppetmaster and you're good to go!