Image for post
Image for post

Installing Puppet 5

Puppet 5 Agent on Ubuntu Trusty and Xenial

You would think this should be a straight forward task, but no, unfortunately, alas, no, it is not. Forces are at work to stop you from getting Puppet.

Ubuntu Packages Blocking Puppet

Puppet Docs Blocking Puppet

Puppet’s docs will instruct you to download an installer that installs the repository entry and public key, so that then you can go install puppet on your own.

Yes, that is correct, the installer DOES NOT INSTALL Puppet. And then afterward, after reading tomes of text, it doesn’t really tell you how to install it.

In any event, here’s how to get Puppet 5 (puppet-agent), Puppet Development Kit (pdk), and the new tool bolt on your system so you can play around with these tools.

Installing Puppet

Install GPG Key

sudo apt-key adv \
--keyserver "pgp.mit.edu" \
--recv-keys "EF8D349F"

Add Repository Entry

echo "deb http://apt.puppetlabs.com $(lsb_release -c -s) puppet5" \
| sudo tee -a /etc/apt/sources.list.d/puppet5.list
sudo apt-get update

You verify that you are pointing to the correct source for puppet-agent, pdk, and bolt.

apt-cache policy puppet-agent bolt pdk

Install the Goods

sudo apt-get install -y puppet-agent bolt pdk

Optionally added new tools from Puppet, bolt a simple remote execute tool and pdk(Puppet Dev Kit), a toolset for creating Puppet modules.

Wait, We’re Not Done

-bash: puppet: command not found

Bummer.

No, We’re not going to take it! Let’s make these puppies available:

After running this fancy schmancy bash snippet, we can check our versions now:

As of April 13, 2018, if none of the programs crash (stack trace), this shows us:

puppet: 5.5.0
facter: 3.11.0
hiera: 3.4.2
mco: 2.12.0
bolt: 0.19.0
pdk: 1.4.1

And it crashes…

Game Over Man!

Well, actually, I had this happen with mco on Ubuntu 16.04. Fortunately, I have a version of ruby 2.4 installed, so I can fix this by gem install stomp. If you don’t have ruby 2.4, well, then get it!

You can install ruby 2.4 easily by using either RVM or rbenv. I even wrote a few articles on these:

and

Final Thoughts

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store