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.

  1. In the web UI, navigate to Configure > Host Groups and select the name of the host group you want to configure.
  2. Click the Parameters tab, and in the Host Group Parameters area, click Add Parameter.
  3. In the Name field, enter enable-puppet4 and in the Value field, enter true.
  4. Click Submit to save the changes.

If you set the parameter enable-puppet4 in Satellite 6.3, it can now be safely removed.

  1. In the web UI, navigate to Configure > Host Groups and select the name of the host group you want to configure.
  2. Click the Parameters tab, and in the Host Group Parameters area, locate enable-puppet4.
  3. In the Actions column, click Remove.
  4. 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-puppet4

4.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 validate command.
  • 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] to Class[myclass].
  • If you have custom version comparison code in Ruby, note that the Range#intersection code 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 TypeCalculator class, change your code to use the replacement TypeFormatter class because the string formatting methods in the TypeCalculator have 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 --strict flag. 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-puppet4 parameter set for the host or host group to override the global enable-puppet5 parameter.

Preparing a Host for Puppet 5

  1. 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, or workstation.

    • 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, or system-z. Some repositories are for subscriptions with extended support. For example, Extended Update Support (EUS) is indicated by eus after the architecture.

      For more information about types of extended support, see the Red Hat Knowledgebase article Red Hat Enterprise Linux - Top Support Policies.

  1. On the content host, search for the Puppet 4 RPM repository:

    # subscription-manager repos --list-enabled |grep puppet4
  2. 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
  3. Update all packages:

    # yum update