HOWTO: Upgrading from puppet6 to puppet7 (RHEL-based)

Thought I’d add a little info for those who may want to update their puppet rpms.

Most of you have probably noticed that the guide(s) for installing the newer versions of Katello/Foreman include installing the puppet7-release rpm. But as of only a few versions ago, puppet6 was the standard.

And while there’s instructions per above for new installs, I haven’t found anything to tell folks (like me) that continially upgrade their katello/foreman how to UPGRADE puppet from 6 to 7.

The good news is it’s easy. FYI these instructions are for RHEL8-based servers. Change el-8 to el-7 below and change “dnf” to “yum” if you’re still(!) using rhel7-based hosts…

  1. Take a backup. Always before making any changes. I use foreman-maintain backup offline…
  2. Shut down foreman. foreman-maintain service stop
  3. Erase the puppet6 distribution. dnf erase puppet6-release. This should uninstall just the one release rpm.
  4. Install the new puppet7 distribution: dnf localinstall https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
  5. Clean yum, do an update dnf clean all; dnf upfate
    This should only upgrade two rpms: puppetserver and puppet-agent
  6. Run the installer, just like for any upgrade: foreman-installer

And you should be good to go.

(Hey devs: something akin to the above should really be in the upgrade instructions sometime soon… I can see someday puppet6 going away, so… thx!)

I had no issues after doing the above. YOUR MILEAGE MAY VARY

4 Likes

oops, slight correction: In my case, the dnf update, in addition to upgrading puppet6 to puppet7, also upgraded python39-debian (from the pulpcore repo). This may be very specific to what version of katello/foreman you are at.

Thank you for this! Worked perfectly. The documentation for the upcoming Katello 4.8/Foreman 3.6 says that Puppet 6 is now EOL and deprecated, but your post is the only documentation I’ve found on actually updating to Puppet 7. Much appreciated!

1 Like

Thanks for sharing this - helped me a lot, I did run into an issue though. Foreman-installer returned an error:
[ERROR ] [pre] Failed to reinstall puppet-agent-oauth. Please check that the package is available from a repository.
I solved this by reinstalling the package:
yum -y reinstall puppet-agent-oauth-0.5.10-1.el8.noarch
After that, I re-ran the installer and it completed successfully