Migrating a Module to Puppet 4 Edit

Published on Jan 11, 2017 by bastelfreak.

We announced the deprecation of Puppet 3 in our modules already. There are a few steps needed to be taken before a Puppet-4-only release can be done:

  • Check the current metadata.json for the required Puppet version and bump it if needed
    • We already have a few modules that only support Puppet 4, in this case you can ignore this guide
    • Also check if the dependencies in the metadata.json all have Puppet 4 support, they may have to be bumped too
    • The minimum required stdlib version has to be 4.6.0
    • The required Puppet version should be 3.8.7 or newer
  • Ensure that the module is modulesynced with version 0.16.11. You can detect the version in the .msync.yml
  • Perform a release of the module within the current Major version that announces the deprecation of Puppet 3. e.g. Current version is 2.1.3, release 2.2.0 with the deprecation notice
  • Create a new branch which is called puppet3
    • The required Puppet version for this branch in the metadata.json should be the latest available, which is currently 3.8.7
    • Keep in mind that stdlib 4.13.0 deprecates a lot of functions, you maybe want to require an older version in the puppet3 branch
  • Check the .sync.yml, sometimes the .travis.yml file is unmanaged or modified because the module is already Puppet 4 only. Take a look for an include block in the .travis.yml section and remove it
  • Do a modulesync with at least version 0.20.0 (how to do it)
  • Check if the .sync.yml provides any extra travis jobs, they should use the latest ruby version (2.4.0 right now) as the other jobs and run on the trusty platform
  • The minimum required Puppet Version should not be 4.0.0 but 4.6.1
  • data-in-modules was experimental before Puppet 4.9.1, so if you introduce data-in-modules please bump to 4.9.1
  • You may now merge any existing Pull Requests to the master branch that are not backwards compatible with Puppet 3
  • Do a major version bump + a release soon after the first Puppet 4 functionality is added