Introduction
Hey Ninjas!! Welcome to another article on Puppet. Today we will learn about Upgrading Puppet Enterprise. Puppet Enterprise allows users to understand the configuration of your infrastructure. It includes all physical components of your data center, cloud infrastructure, and everything running in containers. Puppet automatically maintains the appropriate working state while giving you full authority to make required changes. This ensures consistency and keeps you in compliance.

Without further ado, let's get started.
Upgrade Puppet Enterprise
You can easily upgrade your Puppet Enterprise infrastructural components. Upgrades are required to ensure that all infrastructure nodes are working properly.
Configure a non-production environment for infrastructure nodes
You can manually configure PE to use your preferred Environment before upgrading. This is beneficial when infrastructure nodes are not in a production environment.
- In pe.conf, set both of the parameters to the Environment in which your infrastructure nodes are located:
pe_install::install::classification::pe_node_group_environment
puppet_enterprise::master::recover_configuration::pe_environment
- Execute the Command:
puppet-enterprise-installer -- --pe-environment <env>
Upgrade a standard installation
Follow the following steps to upgrade a standard installation:
-
Download the tarball for your operating system.
- Execute the command:
tar -xf <TARBALL>
This command unpacks the installation tarball.
- From the installer directory on your main server, run the command:
sudo ./puppet-enterprise-installer
This command starts the installer.
-
Follow the CLI instructions to finish your server upgrade.
If the pe.conf file is different from the existing file, use the -c flag.
Command:
sudo ./puppet-enterprise-installer -c <FULL_PATH_TO_pe.conf>
This flag will tell the installer to back up the last used ‘pe.conf’ file to ‘/etc/puppetlabs/enterprise/conf.d/<TIMESTAMP>.conf’. Create a brand new ‘pe.conf’ file at ‘/etc/puppetlabs/enterprise/conf.d/pe.conf’.
-
Upgrade the following additional PE infrastructure components:
-
Agents
-
Puppet Enterprise client tools: You must reinstall the client tools version corresponding to the Puppet Enterprise version. The Client tools on managed and infrastructure nodes are automatically updated.
-
Agents
- Upgrade your replica in disaster recovery installations.
During this step, the replica is temporarily unavailable to serve as a backup. So, upgrade your replica as fast as possible to minimise the risk.
- Run the following command your main server logged in as root.
Command:
sudo puppet infrastructure upgrade replica <REPLICA_FQDN>
- If you want to mention an authentication token other than the default, run the following command:
Command:
sudo puppet infrastructure upgrade replica <REPLICA_FQDN> --token-file <PATH_TO_TOKEN>
- Then verify that primary and replica services are operational.
Command:
sudo /opt/puppetlabs/bin/puppet-infra status
- If your replica shows errors, then reinitialize the replica. On your replica, run the command:
sudo /opt/puppetlabs/bin/puppet-infra reinitialize replica -y
- By default, all packages older than the current version are removed. To remove particular versions, append pe_version=<VERSION_NUMBER> to the command.
Upgrade a large installation
Follow the following steps to upgrade a large installation:
-
Download the tarball for your operating system.
- Execute the command:
tar -xf <TARBALL>
-
This command unpacks the installation tarball.
- From the installer directory on your main server, run the command:
sudo ./puppet-enterprise-installer
-
This command starts the installer.
-
Follow the CLI instructions to finish your server upgrade.
Use the command for a different pe.config file:
sudo ./puppet-enterprise-installer -c <FULL_PATH_TO_pe.conf>
This flag will tell the installer to back up the last used pe.conf file to /etc/puppetlabs/enterprise/conf.d/<TIMESTAMP>.conf. Create a brand new pe.conf file at /etc/puppetlabs/enterprise/conf.d/pe.conf.
-
For upgrading the compilers, log in to your main server as root and run one of the following commands:
- The following command upgrades specific compilers:
sudo puppet infrastructure upgrade compiler <COMPILER_FQDN-1>,<COMPILER_FQDN-2>
- The following command upgrades all compilers simultaneously:
sudo puppet infrastructure upgrade compiler --all
- You can include --token-file <PATH_TO_TOKEN> in the command. It is used to mention an authentication token location other than the default location. Example:
sudo puppet infrastructure upgrade compiler <COMPILER_FQDN> --token-file <PATH_TO_TOKEN>
-
Upgrade the following additional PE infrastructure components:
-
Agents
-
Puppet Enterprise client tools: You must reinstall the client tools version corresponding to the Puppet Enterprise version. The Client tools on managed and infrastructure nodes are automatically updated.
-
Agents
- Upgrade your replica in disaster recovery installations. During this step, the replica is temporarily unavailable to serve as a backup. So, upgrade your replica as fast as possible to minimize the risk.
- On your main server logged in as root, run the command:
sudo puppet infrastructure upgrade replica <REPLICA_FQDN>
- If you want to mention an authentication token other than the default, run the command:
sudo puppet infrastructure upgrade replica <REPLICA_FQDN> --token-file <PATH_TO_TOKEN>
Then verify that primary and replica services which are operational.
Command:
sudo /opt/puppetlabs/bin/puppet-infra status
- If your replica shows errors, then reinitialize the replica. Run the command:
sudo /opt/puppetlabs/bin/puppet-infra reinitialize replica -y
- By default, all packages older than the current version are removed. To remove particular versions, append the statement pe_version=<VERSION_NUMBER> to the command.
Upgrade a standalone Puppet Enterprise - PostgreSQL installation
Follow the following steps to upgrade a standalone Puppet Enterprise:
-
Download the tarball for your operating system.
- Execute the command:
tar -xf <TARBALL>
- This command unpacks the installation tarball.
- From the installer directory on your main server, run the command:
sudo ./puppet-enterprise-installer
This command starts the installer.
-
Follow the CLI instructions to finish your server upgrade.
Run the following command if pe.conf file is different than the existing file:
sudo ./puppet-enterprise-installer -c <FULL_PATH_TO_pe.conf>
This flag will tell the installer to back up the last used pe.conf file. The backup is stored at:
/etc/puppetlabs/enterprise/conf.d/<TIMESTAMP>.conf. Create a brand new pe.conf file at the location: /etc/puppetlabs/enterprise/conf.d/pe.conf.
-
Log in to your primary server as root.
-
Run one of these commands. This will upgrade your compiler.
- The following command upgrades specific compilers:
sudo puppet infrastructure upgrade compiler <COMPILER_FQDN-1>,<COMPILER_FQDN-2>
- The following command upgrades all compilers simultaneously:
sudo puppet infrastructure upgrade compiler --all
-
To specify an authentication token location other than the default location, include --token-file <PATH_TO_TOKEN> in the command.
Example:
sudo puppet infrastructure upgrade compiler <COMPILER_FQDN> --token-file <PATH_TO_TOKEN>
-
Upgrade the following additional PE infrastructure components:
- Agents
-
Puppet Enterprise client tools: You must reinstall the client tools version corresponding to the Puppet Enterprise version. The Client tools on managed and infrastructure nodes are automatically updated.
- All packages which were older than the current version is removed by default. To remove specific versions, append pe_version=<VERSION_NUMBER> to the command.






