Problem:
Now that Puppet 8 is officially supported with Foreman 3.12/Katello 4.14 and Puppet 7 is EOL soon, I wonder what I have to do exactly to switch my existing foreman servers and proxies with puppet 7 to puppet 8.
I haven’t really found anything in the docs for the switch, only for a new installation. Is there a guide somewhere how to switch to puppet 8 without breaking everything?
Yepp, just update the packages to the puppet 8 ones and run installer, you should be good.
(that’s also what our pipelines do when they test upgrades from 3.11 to 3.12+)
Thanks for all the answers. Switching the puppet repository to puppet8 was really everything needed. Updated packages and ran foreman-installer to make sure everything is correctly configured.
Of course, a few puppet8 changes hit some of our own modules, e.g. the deprecation of $::fqdn…
Noticed I also was using the puppet 7 repo so switched to 8. I however does not use puppet on my Foreman server and seen that the only package that was updated was puppet-agent.
Do I even need that package from the yum.puppet.com repo?
If you don’t use the puppet server, then the repository is only used by foreman-installer itself. foreman-installer is puppet. Thus you always need the puppet-agent packaged installed because that is needed to run foreman-installer and install foreman. The puppet.service doesn’t need to run if you don’t use puppet for your configuration management.
I followed the same and today upgraded foreman from 3.11 to 3.12 along with puppet from 7 to 8
But the puppet agent runs fail as it’s now unable to recognize the foreman location variables. Any idea how to fix it?
# puppet agent -tv
Info: Using environment 'development'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Notice: Requesting catalog from XXX:8140 (x.x.x.x)
Notice: Catalog compiled by XXX
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, uninitialized constant Puppet::Parser::Functions::PSON (file: /etc/puppetlabs/code/environments/development/manifests/002_dns.pp, line: 5, column: 17) on node XXX
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Puppet manifest
# cat /etc/puppetlabs/code/environments/development/manifests/002_dns.pp
# Enforce local DNS resolver configuration based on host's location set in Puppet "$location" variable
# This code uses module "saz-resolv_conf" module
class {'resolv_conf':
nameservers => [ "$dns1", "$dns2"],
searchpath => parsejson($dns_search_path),
options => [ "rotate" ],
}
And dns_search_path is a location parameter defined in Foreman.
The stdlib version is 6.5.0 so I don’t think it’s a problem with Foreman.
I need to work on updating all the puppet modules so they are compatible with Puppet 8.