Upgrading

To upgrade your deployment, you must upgrade both the infrastructure components and agents.

The order in which you upgrade components is important. Always upgrade Puppet Server and PuppetDB simultaneously, including the puppetdb-termini package on Puppet Server nodes, and always upgrade them before you upgrade agent nodes. Do not run different major versions on your Puppet primary servers (including Server) and PuppetDB nodes.

Important: Any time the puppet-agent package is updated, make sure to restart the puppetserver service afterward.
Note: These instructions cover upgrades in the versions 5 and 6 series. For instructions on upgrading from version 3.8.x, see previous versions of the documentation.

Upgrade Puppet Server

Upgrade Puppet Server to adopt features and functionality of newer versions.

Upgrading the puppetserver package effectively upgrades Puppet Server. The puppetserver package, in turn, depends on the puppet-agent package, and your node’s package manager automatically upgrades puppet-agent if the new version of puppetserver requires it.

Important: During an upgrade, Puppet Server doesn't perform its usual functions, including maintaining your site's infrastructure. If you use a single primary server, plan the timing of your upgrade accordingly and avoid reconfiguring any managed servers until your primary server is back up. If you use multiple load-balanced servers, upgrade them individually to avoid downtime or problems synchronizing configurations.
  1. On your Puppet Server node, run the command appropriate to your package installer:
    Yum:
    yum update puppetserver
    Apt:
    apt-get update
    apt-get install --only-upgrade puppetserver
  2. If you pinned Puppet packages to a specific version, remove the pins.

    For yum packages locked with the versionlock plugin, edit /etc/yum/pluginconf.d/versionlock.list to remove the lock.

    On apt systems, remove .pref files from /etc/apt/preferences.d/ that pin packages, and use the apt-mark unhold command on each held package.
  3. After upgrading the puppet-agent package, make sure to restart the puppetserver service.

Upgrade agents

Regularly upgrade agents to keep your systems running smoothly.

Before you begin

Upgrade Puppet Server.

Upgrade agents using the puppet_agent module

Upgrade your Puppet agents using the puppetlabs/puppet_agent module.

Before you begin
Install the puppetlabs/puppet_agent module. Read about installing modules in the following docs:

The puppet_agent module supports upgrading open source Puppet agents on *nix, Windows, and macOS.

  1. Add the puppet_agent class to agents you want to upgrade.
  2. Specify the desired puppet_agent package version and any other desired parameters described in the Forge.
    Note: The collection parameter is required in Open Source Puppet.
    For example:
    class {'::puppet_agent':
      package_version => '5.5.17',
      service_names   => ['puppet'],
      collection      => 'puppet5',
    }

Upgrade *nix agents

To upgrade *nix nodes, use the update command.

On the agent node, run the command appropriate to your package installer:
Yum:
yum update puppet-agent
Apt:
apt-get update
apt-get install --only-upgrade puppet-agent

Upgrade Windows agents

To upgrade Windows agents, reinstall the agent using the installation instructions. You don't need to uninstall the agent before reinstalling unless you’re upgrading from 32-bit Puppet to the 64-bit version.

Upgrade macOS agents

Use the puppet resource command to upgrade macOS agents.

Before you begin

Download the appropriate agent tarball.

Use the package resource provider for macOS to install the agent from a disk image:
sudo puppet resource package "<NAME>.dmg" ensure=present source=<FULL PATH TO DMG>

Upgrade PuppetDB

Upgrade PuppetDB to get the newest features available.

  1. Follow these steps, depending on whether you want to automate upgrade or manually upgrade.
    • To automate upgrade, specify the version parameter of the puppetlabs/puppetdb module’s puppetdb::globals class.

    • To manually upgrade, on the PuppetDB node, run the command appropriate to your package installer:

      Yum:
      yum update puppetdb
      Apt:
      apt-get update
      apt-get install --only-upgrade puppetdb
  2. On your primary server, upgrade the puppetdb-termini package by running the command appropriate to your package installer:
    Yum:
    yum update puppetdb-termini
    Apt:
    apt-get update
    apt-get install --only-upgrade puppetdb-termini