© Perforce Software, Inc.
David Swan
Principal Software Engineer
February 2025 | #ConfigMgmtCamp Ghent
Can You Help Me
Upgrade to Puppet 8?
© Perforce Software, Inc.
• Update your Hiera
• Ensure that the version is set to at least
5.
• Correct your Puppet version
• Ensure that you are bringing in the
newest Puppet version.
• Check that your dependencies allow Puppet 8
• Ensure that each module dependency
that you have brought in has completed
the above steps.
And now, let's do that…
What Should Be Done First?
© Perforce Software, Inc.
Now Let’s Do That…
© Perforce Software, Inc.
Legacy Facts
Now it’s time to start the more
complex changes:
• With Puppet 8, support for the
legacy style facts has been
removed
• This means that going forward,
all references to the legacy
style must be replaced with
their modern alternatives
• Both in the Puppet
code
• And in the Ruby code
© Perforce Software, Inc.
Example Time!
© Perforce Software, Inc.
Missing
Datatypes
• One important change, that
I hope none of you need to
do, is to ensure that all
parameters within your
module have a datatype.
• This has always been the
advised behaviour, but is
now required
• The module will now
fail to run and error
out, if a datatype is
missing
© Perforce Software, Inc.
One More Time 
I swear, I am not trying to drag this out to fill time
© Perforce Software, Inc.
• Ensure that Puppet 4 functions are given the
stdlib namespace where applicable
• Remove any top-scope facts or variables, keep
them within the local definition
• PSON is no longer supported, use JSON
instead
• Strict mode is now default, any code that
caused warnings will now fail
Other Smaller Changes
© Perforce Software, Inc.
• One thing you may notice about these
changes is that before they were mandatory.
They were all considered best practice for a
considerable period.
• So, expecting that this may occur again in the
future, here is a link to the official style guide
that lays out the current best practices and
which will be kept updated in the future.
Moving Forward
https://www.puppet.com/docs/puppet/8/style_guide.html
© Perforce Software, Inc.
Some Useful Links
Verifying code and modules are compatible with Puppet 8:
https://github.com/puppetlabs/puppet/wiki/Puppet-8-Compati
bility#module-compatibility
Using Onceover to test for Puppet 8 readiness:
https://dev.to/puppet/puppet-8-readiness-with-onceover-135f
A list of deprecated puppetlabs-stdlib functions:
https://puppetlabs.github.io/content-and-tooling-team/blog/p
osts/2023-05-12-deprecation-of-stdlib-functions/
Contacting Puppet Professional Services for upgrade help:
https://www.puppet.com/professional-services
© Perforce Software, Inc.
Thank You for Listening!
https://dev.to/puppet/updating-modules-to-puppet-8-58h3

Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Upgrade

  • 1.
    © Perforce Software,Inc. David Swan Principal Software Engineer February 2025 | #ConfigMgmtCamp Ghent Can You Help Me Upgrade to Puppet 8?
  • 2.
    © Perforce Software,Inc. • Update your Hiera • Ensure that the version is set to at least 5. • Correct your Puppet version • Ensure that you are bringing in the newest Puppet version. • Check that your dependencies allow Puppet 8 • Ensure that each module dependency that you have brought in has completed the above steps. And now, let's do that… What Should Be Done First?
  • 3.
    © Perforce Software,Inc. Now Let’s Do That…
  • 4.
    © Perforce Software,Inc. Legacy Facts Now it’s time to start the more complex changes: • With Puppet 8, support for the legacy style facts has been removed • This means that going forward, all references to the legacy style must be replaced with their modern alternatives • Both in the Puppet code • And in the Ruby code
  • 5.
    © Perforce Software,Inc. Example Time!
  • 6.
    © Perforce Software,Inc. Missing Datatypes • One important change, that I hope none of you need to do, is to ensure that all parameters within your module have a datatype. • This has always been the advised behaviour, but is now required • The module will now fail to run and error out, if a datatype is missing
  • 7.
    © Perforce Software,Inc. One More Time  I swear, I am not trying to drag this out to fill time
  • 8.
    © Perforce Software,Inc. • Ensure that Puppet 4 functions are given the stdlib namespace where applicable • Remove any top-scope facts or variables, keep them within the local definition • PSON is no longer supported, use JSON instead • Strict mode is now default, any code that caused warnings will now fail Other Smaller Changes
  • 9.
    © Perforce Software,Inc. • One thing you may notice about these changes is that before they were mandatory. They were all considered best practice for a considerable period. • So, expecting that this may occur again in the future, here is a link to the official style guide that lays out the current best practices and which will be kept updated in the future. Moving Forward https://www.puppet.com/docs/puppet/8/style_guide.html
  • 10.
    © Perforce Software,Inc. Some Useful Links Verifying code and modules are compatible with Puppet 8: https://github.com/puppetlabs/puppet/wiki/Puppet-8-Compati bility#module-compatibility Using Onceover to test for Puppet 8 readiness: https://dev.to/puppet/puppet-8-readiness-with-onceover-135f A list of deprecated puppetlabs-stdlib functions: https://puppetlabs.github.io/content-and-tooling-team/blog/p osts/2023-05-12-deprecation-of-stdlib-functions/ Contacting Puppet Professional Services for upgrade help: https://www.puppet.com/professional-services
  • 11.
    © Perforce Software,Inc. Thank You for Listening! https://dev.to/puppet/updating-modules-to-puppet-8-58h3

Editor's Notes

  • #2 - With the release of Puppet 8, the minimum version of Hiera has been raised to 5 - To use Puppet 8 you must first set the dependency in your module to allow it - Finally, take a look at whatever modules may be listed as dependencies and make sure that they are Puppet 8 compatible
  • #4 Add example pictures
  • #6 One important change, that I hope none of you need to do, is to ensure that all parameters within your module have a datatype. While this has always been advised behaviour, the changes made with Puppet 8 mean it is now required and if it is not done the code will fail to compile and error out.