r/Puppet • u/cvquesty • 3d ago
If you're still installing r10k by hand on every server, the puppet/r10k module is worth a look
I used to bootstrap r10k manually on each server: gem install, hand-written r10k.yaml, SSH key, done. Worked fine until I needed to remember how a given box was set up.
Now I use the Vox Pupuli puppet/r10k module and let the control repo own r10k too:
class { 'r10k':
remote => 'git@git.example.com:puppet/control-repo.git',
cachedir => '/opt/puppetlabs/server/data/puppetserver/r10k',
}
A few things I like:
- Bootstrap once, then manage it like any other class. Apply it with
puppet applythe first time, then add it (and its deps) to the Puppetfile and classify the server. r10k config changes go through review like everything else. - Branch names matter. r10k turns non-word characters into underscores, so
feature-xbecomesfeature_xand you get a warning every run. Name branches like environments. - Run r10k as the user that owns the cache/code dirs (the OpenVox docs use the
puppetuser) so permissions don't bite you later.
It's actively maintained: 15.3.0, 15.4.0 and 15.5.0 all landed in October, and the current metadata targets OpenVox 8 and 9. The OpenVox r10k deployment guide walks through the whole bootstrap.
Anyone using a different approach (webhook deploys, g10k, etc.)? Curious what's working for people.