There are two paths to choose from when upgrading your Puppet agents:
The puppetlabs-puppet_agent module allows you to upgrade several agents at once, as described in Upgrade agents using the puppet_agent module. This module supports upgrades of agents running 3.8 or later.
You can use the
pe_repoto upgrade individual agents, as described in Upgrade agents using
pe_repo. If you’re upgrading 3.8 agents, use the puppet_agent module.
Upgrade agents using the puppet_agent module
To upgrade your Puppet agents, download and install the puppetlabs-puppet_agent module. We created this module to handle some of the heavy-lifting in the move to the “AIO” Puppet agent. This module automates important path and configuration changes to make the upgrade process much easier.
Tip: When upgrading your agents to PE 2015.2, we recommend that you first upgrade a subset of your agents, and once you’ve verified the install, upgrade your remaining agents. The following procedure assumes you will do this.
To upgrade your Puppet agents:
- Upgrade your monolithic or split Puppet master.
Ensure your Puppet master is classified with the appropriate repos that correspond to the platforms and architectures and architectures of your agents.
a. Navigate to the PE Masters group.
b. Click the Classes tab.
c. In the Class name field, begin typing
pe_repo, and select the repo class from the list of classes.
The repo classes are listed as
Note: If you need to add any repo classes, you need to run Puppet on the Puppet master before those changes will be available in the classifier.
On your Puppet master, download and install the puppetlabs-puppet_agent module. Run
puppet module install puppetlabs-puppet_agent.
In the PE console, create a classification node group and a rule to pull in the subset of nodes you want to upgrade. In this example, we create a rule to upgrade all agents running the RedHat OS.
In the PE console, click Nodes > Classification, then click Add group.
Specify options for the new node group:
Parent name – Select the name of the classification node group that you want to set as the parent to this group, in this case, All Nodes.
Group name – Enter a name that describes the role of this classification node group, for example, agent_upgrade.
Environment – Select the environment your agents are in.
Environment group – Do not select this option.
Click the link to add membership rules, classes and variables.
On the Rules tab, create a rule to add agents to this group:
Fact – Select osfamily.
Operator – Select =.
Value – Enter RedHat.
Click Add rule, then commit changes.
Your RedHat agents are now pinned to the upgrade group.
Still in the group you’ve created, click the Classes tab, and in the Add new class field, add the
If you don’t immediately see the class, click Refresh to update the classifier.
Note: If you’ve changed the prefix parameter of the
pe_repoclass in your PE Master node group, set the
puppet-agent sourceparameter of the upgrade group to
Click Add class, and then click the Commit changes button.
- On the Puppet agents you are upgrading, run Puppet with
/opt/puppet/bin/puppet agent -t.
After Puppet runs, you can verify the upgrade by running
Upgrade agents using pe_repo
Before upgrading your agents, check the Agent Components table to ensure your AIO Puppet agent version is correct for the PE version you’re upgrading to.
If you are using the PE package repo (
pe_repo) hosted on the Puppet master, it will get upgraded when you upgrade the Puppet master.
To upgrade your Puppet agents:
- Upgrade your Puppet master.
Follow the instructions for using the agent install script to upgrade your agents.
a. If the OS/architecture of your Puppet master is the same as your agents, choose scenario 1.
b. If the OS/architecture of your Puppet master is different than your agents, choose scenario 2.
If you are using your own package manager (e.g., Satellite), the simplest way to upgrade agents is to upgrade the
puppet_agent package in the repo your package manager (e.g., Satellite) is using.
PE services should restart automatically after the upgrade. But if you want to check that everything is working correctly, you can run
puppet agent -t on your agents to ensure that everything is behaving as it was before upgrading. Generally speaking, it’s a good idea to run Puppet right away after an upgrade to make sure everything is hooked and has the latest configuration.
Upgrading agents in a Puppet Enterprise infrastructure without internet access
If your PE infrastructure does not have access to the outside internet, to upgrade your agents you should:
- Follow Option 1 or Option 3 in installing agents without internet access to get the agent packages into your infrastructure.
- Download the puppetlabs-apt, puppetlabs-inifile, puppetlabs-stdlib and puppetlabs-puppet_agent modules from the Puppet Forge, and transfer them your Puppet master.
- Follow the Puppet agent instructions provided above.