The four ways to install Puppet modules

April 13, 2021 – Samuli Seppänen

When working with Puppet and Puppet modules in particular you quickly notice that there are several ways to manage module dependencies. Today I learned about a new way introduced in Puppet Bolt 3.x, so I thought I'd compile a list that celebrates this diversity:

  • metadata.json: used primarily to dependency metadata to Puppet Forge. Some tools like librarian-puppet and puppet-litmus use / can use this file to download dependency modules. The downside is that you can't define the location of the modules, so you're limited to Forge modules.
  • Puppetfile: this is used by r10k and librarian-puppet to fetch modules. It supports downloading modules from Forge and Git. It is often used with Puppet control repositories, but is quite useful when using puppet apply as well (example here).
  • .fixtures.yml: used by puppetlabs-spec-helper to download module dependencies that rspec-puppet needs to run the tests. In some more advanced modules (like puppet-module-keycloak) you may see several fixture files: one for with well-defined module versions and one for "whatever module are latest". The latter allows spotting regressions with new modules quickly.
  • bolt-project.yaml: this is the new kid on the block. The old "bolt puppetfile install" command that could reuse an existing Puppetfile (e.g. in a control repository) was removed in Bolt 3.0. The new way requires defining module dependencies in bolt-project.yaml. Once you run "bolt module install" Bolt will create a Puppetfile based on contents of bolt-project.yaml. What the purpose of this change is I do not know. A side-effect is that you may need to move your Bolt project to a subdirectory inside your control repository or you could wipe out you main Puppetfile. That said, Bolt tries to avoid overwriting changes in the Puppetfile, so Bolt cold potentially co-exist with a control repo Puppetfile if you're careful.

So there are many ways to define Puppet module dependencies. Do we need that many? Probably not, but that's what we have. I hope that the changes to Bolt were made for a (good) reason, because I don't see the need for yet another way to define module dependencies in Puppet.

...

Too much information? Get back to basics of Puppet. You might also want to read our introduction to Infrastructure as Code

Want to talk to an expert?

If you want to reach us, just send us a message or book a free call!
Categories

Tags

#aad #Access #acl #alertmanager #ansible #ansible module development #Apache #API #augeas #authentication #authorization #automation #automatization #aws #azure #backup #bash #bitbucket #buildbot #cache #centos #cloud #cloud-init #cloudflare #cloudfront #cluster #connectionsJpa #control repo #custom fact #database #debian #devops #digital sovereignty #DNS #docker #domain mode #duplo #ejabberd #email #encryption #erb #europe #eyaml #fabric #facter #facts #fargate #fedora #file #finnish #foreman #freeipa #git #github #gitlab #gnome #google #grafana #hammer #hiera #IAM #import #infinispan #Infrastructure as Code #ipmi #irc #jboss #jdk #jenkins #JMESPath #kanban #keycloak #librarian-puppet #librenms #linkedin #Linux #Location #loop #marketing #mautic #Mellon #mfa #monitoring #mysql #nagios #network-manager #oauth #oauth2 #office365 #open source #openvpn #oxygen #packer #paranormal #pdk #people #php #pkcs7 #pomodoro #Powershell #preseed #presentation #profiles #prometheus #provisioning #puppet #puppet-bolt #puppet-litmus #puppetboard #puppetdb #Puppetfile #puppetserver #puppet types and providers #pxeboot #qemu #quality #r10k #recruitment #redirect #Restrict #Reverse Proxy #roles #rspec #ruby #SAML #sem #shell #showsql #snmp #snmpd #software developement #spam #ssh #sso #standardization #systemd #systemd-resolved #teams #terraform #ubuntu #user-data #vagrant #vanity awards #variable #vim #virtualbox #visualstudio #webdevelopment #wildfly #Windows #wireguard #wordpress #workflow #x11 #xmpp #zimbra
We are
 Puppeteers
menucross-circle