

Upgrading agents
source link: https://puppet.com/docs/pe/2017.3/upgrading_agents.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Upgrading agents
Upgrade your agents as new versions of Puppet Enterprise become available. The upgrade method you use depends on the agent operating system and the method used to install the agent.
Upgrade *nix or Windows agents using the puppet_agent module
The puppetlabs-puppet_agent module, available from the Forge, enables you to upgrade multiple agents at once. The module handles all the latest version to version upgrades.
When upgrading agents, first test the upgrade on a subset of agents, and after you verify the upgrade, upgrade remaining agents.
- On your master, download and install the puppetlabs-puppet_agent module:
puppet module install puppetlabs-puppet_agent
- Configure the master to download the agent version you want to upgrade.
- In the console, click Classification, and in the PE Infrastructure group, select the PE Master group.
- On the Configuration tab, in the Add a new class field, enter
pe_repo
, and select the appropriate repo class from the list of classes.Repo classes are listed as
pe_repo::platform::<AGENT_OS_VERSION_ARCHITECTURE>
. - Click Add class and commit changes.
- On your master, run Puppet to configure the newly assigned class:
puppet agent -t
The new repo is created in
/opt/puppetlabs/server/data/packages/public/<PE VERSION>/<PLATFORM>/
.
- Click Classification, click Add group, specify options for a new upgrade node group, and then click Add.
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 the agents that you want to upgrade to this group, click Add Rule, and then commit changes. For example:
Fact — osfamily
Operator — =
Value — RedHat
- Still in the agent upgrade group, click the Configuration tab, and in the Add new class field, add the puppet_agent class, and click Add class. 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_repo class in your PE Master node group, set the puppet-agent source parameter of the upgrade group to https://<MASTER HOSTNAME>:8140/<Prefix>.
- In the puppet_agent class, specify the version of the
puppet-agent
package version that you want to install, then commit changes.Parameter Value package_version Thepuppet-agent
package version to install, for example 5.3.3. - On the agents that you're upgrading, run Puppet:
/opt/puppet/bin/puppet agent -t
After the Puppet run, you can verify the upgrade with /opt/puppetlabs/bin/puppet --version
Upgrade *nix or Windows agents using PE package management
The master hosts a package repository used to install or upgrade agents in your infrastructure.
If you're using PE package management, the pe_repo
, hosted on the master, is upgraded when you upgrade the master.
/opt/puppetlabs/puppet/bin/openssl version
and the agent's version with openssl version
.Upgrade *nix agents installed with the installation script using PE package management
If you installed your agents with the installation script, you can use the same script to upgrade them.
- SSH into the agent node you want to upgrade.
- Run the upgrade command appropriate to the operating system.
- Most *nix
/opt/puppetlabs/puppet/bin/curl --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem https://<MASTER HOSTNAME>:8140/packages/current/install.bash | sudo bash
- Mac OS X, Solaris, and AIX
curl --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem https://<MASTER HOSTNAME>:8140/packages/current/install.bash | sudo bash
- Most *nix
PE services restarts automatically after upgrade.
Upgrade *nix agents installed without the installation script using PE package management
If you did not install your agents with the installation script, you can still use it to upgrade, but you must first configure your master to download the agent upgrade version.
- Configure the master to download the agent version you want to upgrade.
- In the console, click Classification, and in the PE Infrastructure group, select the PE Master group.
- On the Configuration tab, in the Add a new class field, enter
pe_repo
, and select the appropriate repo class from the list of classes.Repo classes are listed as
pe_repo::platform::<AGENT_OS_VERSION_ARCHITECTURE>
. - Click Add class and commit changes.
- On your master, run Puppet to configure the newly assigned class:
puppet agent -t
The new repo is created in
/opt/puppetlabs/server/data/packages/public/<PE VERSION>/<PLATFORM>/
.
- Run the upgrade command appropriate to the operating system.
- Most *nix
/opt/puppetlabs/puppet/bin/curl --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem https://<MASTER HOSTNAME>:8140/packages/current/install.bash | sudo bash
- Mac OS X, Solaris, and AIX
curl --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem https://<MASTER HOSTNAME>:8140/packages/current/install.bash | sudo bash
- Most *nix
PE services restarts automatically after upgrade.
Upgrade Windows agents using PE package management
If you used PE package management to install Windows agents, you can use the same method to upgrade them.
<MASTER HOSTNAME>
portion of the installer script—as provided in the following example—refers to the FQDN of the master. The FQDN must be fully resolvable by the machine on which you're installing or upgrading the agent.[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; $webClient = New-Object System.Net.WebClient; $webClient.DownloadFile('https://<MASTER HOSTNAME>:8140/packages/current/install.ps1', 'install.ps1'); .\install.ps1
Upgrade Windows agents using the .msi package
You can use the Windows agent .msi package to upgrade.
- Download the appropriate new version of the .msi package.
- Follow the installer dialog.
The agent service restarts automatically after upgrade.
Recommend
-
42
AI driven virtual agents by MicrosoftProvide exceptional support to customers and employees with AI-driven virtual agents. Easily create and maintain bots with a no-code interface.
-
56
An Introductory Tutorial to TF-Agents Sacha...
-
28
During this holiday season, I am revisiting some of the most important AI papers of the last few months.
-
17
Recently someone brought the concept of Remembrance Agents to my attention. Remembrance Agents are programs which augment the human memory by displaying documents, such as notes and emails, that are potentially relevant to the current context. T...
-
23
An Introduction to Unity ML-Agents Train a reinforcement learning agent to jump over walls.
-
39
Unity-ML Agents Course Diving deeper into Unity-ML Agents Train a curious agent to destroy Pyramids....
-
23
Unity-ML Agents Course Unity-ML Agents: The Mayan Adventure Train an agent to get the golden statue in this...
-
6
Posted by Pascal Widdershoven on 25-4-2019 Recently whi...
-
11
puppet_agent Table of Contents Overview A module for upgrading Puppet agents. Supports upgrading from Puppet 4 puppet-agent packages to later versions including Puppet 4, Puppet 5, and Puppet 6. Previous rel...
-
11
FBSim: football-playing AI agents in Rust computerwit Rust November 22, 2020Nov...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK