Problem

As of this writing (6/30/16) there is no .deb package or installer for Puppet 4.X for ARMHF on https://apt.puppetlabs.com/. This means with using the default Raspberian repository, apt-get install puppet will not download the latest Puppet, but instead download the previous generation Puppet 3.8. Following Puppet's instructions, apt-get install puppet-agent could not find any packages for install even after adding their repository.

Puppet 4 brings a stack of new features and all new syntax. It seemed a wasted potential to invest energy into a deprecated version of Puppet, luckily installing Puppet from source allows us to accomplish our goals.

Getting started

I began by installing Rasbarian Lite onto my SD card. A quick tool for osx is the Apple Pi Baker.

After booting and logging in using the defaults (U: pi, P: raspberry), change the account passwords to ensure no hacks are made passwd pi, sudo passwd root.

Install dependencies

Ensure your apt is up to date. Then install vim, because efficiency.
Then install Ruby, this is needed to build and run Puppet. Installing Ruby takes a while on a Raspberry Pi, even a Raspberry Pi 3. Get a cup of tea to pass the time. We will also need facter and hiera because Puppet depends on these. These can be found on the Standard Raspberrian repos, Puppet 4 seems to work on the version that is latest there.

sudo apt-get update  
sudo apt-get install vim ruby-full facter hiera bundler  

Get Source code

Find the version of Puppet you need, their github page has all the releases as zips. For me, I setup a 4.5.2 Puppet Server, so I downloaded the client to match.

wget https://github.com/puppetlabs/puppet/archive/4.5.2.zip  
unzip 4.5.2.zip  
cd puppet-4.5.2/  

Install from source

Now install Puppet, the commands are straightforward and work from Puppet's website. I did these as the pi user, it is recommended to NOT use root for this.

bundle install --path .bundle/gems/  
sudo bundle update  
ruby install.rb  

Configure Puppet

Make sure your Puppet agent will be able to talk to your server, add the following to your /etc/puppetlabs/puppet/puppet.conf

environment = production  
server = puppetserver.psd401.net  

Checkin with the Puppet Master

Unlike puppet 4 installed through apt, this version install to /op/puppetlabs, instead simple run puppet agent --test to check in with the master.

Make a backup

Now that you have a working install, use the Apple-Pi baker to create an image, this will allow you to clone this Pi and use Puppet to manage any number of Pi minions you may have.