Running Puppet 7 on Raspberry Pi OS (armhf/armv7)

The Puppet open source repositories for Debian are not currently packaged with a puppet-agent for ARM architectures. If you need to run a specific Puppet agent version (>=6) you can manually set up the agent and run it with Ruby.

Installing the Puppet Agent via Ruby

Install Ruby 2.7.2 with rvm or an equivalent environment manager:

rvm install 2.7.2
rvm use 2.7.2

Install the puppet and facter gems:

gem install puppet facter

If your codebase uses Augeas you will likely receive the error Error: Could not find a suitable provider for augeas. Install the development library and ruby wrapper with:

apt-get install libaugeas-dev
gem install ruby-augeas

Initial Configuration

Create an initial directory structure for Puppet/Facter:

mkdir -p /etc/puppetlabs/puppet/ /etc/puppetlabs/facter/facts.d/

Add a minimal Puppet configuration file:

cat <<EOF > /etc/puppetlabs/puppet/puppet.conf
server = puppetserver.example.local
environment = production

Set the System Facts

The distro and ARM architecture are unlikely to be supported by Puppet (including any forge modules you may be using). Running Puppet now can result in errors such as:

Warning: Found multiple default providers for service: init, systemd; using init

If the distro you are using is part of a well-supported family, you can manually set the OS facts. In the following example the OS is set to Debian under /etc/puppetlabs/facter/facts.d/os.yaml:

operatingsystem: Debian # Raspbian
architecture: armv7l
codename: buster
description: "Raspbian GNU/Linux 10 (buster)"
id: "Debian" # "Raspbian"
full: '10.11'
major: '10'
minor: '11'
family: "Debian"
hardware: armv7l
name: "Debian" # "Raspbian"
full: '10.11'
major: '10'
minor: '11'
enabled: false

OS facts resolved by facter can be queried with:

facter operatingsystem os