Chapter 4. Upgrading Puppet
Red Hat Satellite 6.4 only supports Puppet 5. The migration path for Puppet 5 supports only Puppet 4 to Puppet 5 migrations. Therefore, if you are using a version of Puppet prior to version 4, you must upgrade to Puppet 4 prior to upgrading to Satellite 6.4. Satellite 6.3 includes an upgrade path to Puppet 4, for more information, see the Upgrading Puppet section in the Satellite 6.3 Upgrading and Updating Red Hat Satellite guide.
During the Satellite upgrade process, Puppet is upgraded from Puppet 4 to Puppet 5. It is not a separate process. This chapter describes the process of preparing for the upgrade from Puppet 4 to Puppet 5.
4.1. Upgrade Path
Before upgrading to Satellite 6.4, you must first review your Puppet modules, and make changes, to ensure they are compatible with Puppet 5. For information on the changes in Puppet 5, see the Puppet 5.0 Release Notes on the Puppet website.
Red Hat Satellite and Capsules do not have to be upgraded at the same time. You have the flexibility to upgrade Capsules depending on your progress with testing and upgrading Puppet modules. An alternative is to install new Capsules and move hosts to them after testing. You can use Satellite web UI, the Hammer CLI, or the bootstrap script to move hosts from a Puppet 4 Capsule to a Puppet 5 Capsule.
Cloning an existing Capsule to use for final testing of upgraded Puppet modules is also recommended. Cloning an existing Capsule can take a long time depending on the size of the repositories.
Using Parameters to Determine Puppet Versions
By default, Satellite 6.4 sets the global parameter enable-puppet5. Provisioning templates, such as Kickstart files, use enable-puppet5 to provision new hosts to use the Puppet 5 agent if available. However, if the Puppet 4 agent is in a Content View attached to a host, this will be used in place of Puppet 5. If you want hosts to use Puppet 5, you must update Content Views associated with the hosts to contain the Puppet 5 agent.
If you must provision new hosts to use Puppet 4, you can override the global parameter at the host group level.
- In the web UI, navigate to Configure > Host Groups and select the name of the host group you want to configure.
- Click the Parameters tab, and in the Host Group Parameters area, click Add Parameter.
-
In the Name field, enter
enable-puppet4and in the Value field, entertrue. - Click Submit to save the changes.
If you set the parameter enable-puppet4 in Satellite 6.3, it can now be safely removed.
- In the web UI, navigate to Configure > Host Groups and select the name of the host group you want to configure.
-
Click the Parameters tab, and in the Host Group Parameters area, locate
enable-puppet4. - In the Actions column, click Remove.
- Click Submit to save the changes.
You can also use a hammer command to remove it. For example:
# hammer hostgroup delete-parameter --hostgroup my_hostgroup --name enable-puppet44.2. Testing Puppet Modules
Use the Puppet 5.0 Release Notes on the Puppet website and the following guidelines to test your Puppet modules before you begin upgrading:
- Test Puppet modules first on a workstation, separate from Satellite.
-
Check the command syntax using the
puppet parser validatecommand. -
Check for capital letters in the name of a class reference because this is no longer supported. Change class names to lower case; for example, change
Class[MyClass]toClass[myclass]. -
If you have custom version comparison code in Ruby, note that the
Range#intersectioncode to handle SemVer range matches has been removed. -
If you have custom Ruby code that makes use of the deprecated string formatting methods in the
TypeCalculatorclass, change your code to use the replacementTypeFormatterclass because the string formatting methods in theTypeCalculatorhave been removed. For more information, see the Type mismatch describer should expand aliases issue on the Puppet website. -
Previously, if a class was defined more than once their bodies were merged. A warning or error was displayed depending on the status of the
--strictflag. Now, an error is always displayed except for the top scope class indicated by‘’(also known as‘main’).
4.3. Preparing for the Upgrade
Use this section to prepare Hosts for the upgrade to Puppet 5. Satellite Server and Capsule Server are upgraded to Puppet 5 as part of their respective upgrade procedures.
Before You Begin
- Ensure you complete the upgrade to Satellite 6.4 for Satellite Server.
- Ensure you complete the upgrade for the Capsule Server with the hosts attached that you want to upgrade.
- Ensure you have reviewed your Puppet modules and upgraded them where required for Puppet 5.
- Ensure the associated Content Views have been updated to include Puppet 5 agent.
-
Ensure there is no
enable-puppet4parameter set for the host or host group to override the globalenable-puppet5parameter.
Preparing a Host for Puppet 5
Disable the Puppet 4 repository:
The Puppet 4 repositories take the following form for desktop, server, and workstation:
rhel-X-platform-satellite-tools-6.3-puppet4-rpms
Where X is the major release version, and platform is
desktop,server, orworkstation.The Puppet 4 repositories take the following form for alternative architectures:
rhel-X-for-architecture-satellite-tools-6.3-puppet4-rpms
Where X is the major release version, and architecture is for example
arm,power,hpc-node, orsystem-z. Some repositories are for subscriptions with extended support. For example, Extended Update Support (EUS) is indicated byeusafter the architecture.For more information about types of extended support, see the Red Hat Knowledgebase article Red Hat Enterprise Linux - Top Support Policies.
On the content host, search for the Puppet 4 RPM repository:
# subscription-manager repos --list-enabled |grep puppet4
Disable the Puppet 4 repository you find on the host, for example:
# subscription-manager repos \ --disable=rhel-7-server-satellite-tools-6.3-puppet4-rpms
Update all packages:
# yum update

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.