If you used Razor in a previous Puppet Enterprise (PE) environment, upgrade Razor to keep your PE and Razor versions synched.
After a PE upgrade, your
pe_razor class continues to operate normally, but we recommend upgrading Razor as soon as possible to avoid unintended effects.
Note: If nodes are actively provisioning during upgrade, provisioning might fail. You can resume provisioning after
pe-razor-serverrestarts and – for upgrade from 3.8.x only – after a Puppet run completes.
The upgrade process varies by PE version.
An upgrade script handles upgrading Razor from PE 3.8.x to any later version. The script carries out these tasks:
puppet-agentclass is installed. The script exits if not.
Backs up the
pe-razor-server PostgreSQLpostgres database.
Note: This might take up to several minutes for larger databases.
pe-postgresqlservices and restores the backed up database.
Follow these steps to prepare to upgrade:
Verify that the Razor server has access to the internet.
Tip: If you want to upgrade Razor offline, follow the instructions here.
Verify that no services are active on the agent or Razor server. Services are stopped during upgrade.
Ensure that no custom or modified tasks, brokers, or hooks exist inside
/opt/puppetlabs. If they do, move them to a directory in the appropriate class parameter (
hook_path) of the
pe_razor class. By default, the paths for these objects are:
The Razor upgrade script upgrades your Razor server node to match the version of PE you’re running.
razor-servernode, then run
sudo bash /opt/puppet/razor/upgrade/upgrade.bash.
Upgrading from 2015.2.x or later is a mostly automated process that replaces the software repository, installs software packages, and migrates the Razor database.
Upgrading to 2016.2 or later requires manual migration of any custom configuration from your config.yaml file to class parameters in the
Before you begin: If you’re upgrading to PE 2016.2 or later and you’ve modified your config.yaml file – for example, by changing
protect_new_nodesor customizing tasks, brokers, or hooks – make a note of the modified settings.
Upgrade the agent on the Razor server node.
pe-razor-server service automatically restarts.
(Optional) If you’re upgrading to 2016.2 or later, transfer any customized configurations to class parameters in the
Note: To prevent accidentally overwriting machines during upgrade, the default for
protect_new_nodes was changed to
true in PE 2016.2 and later. If your environment and workflows rely on provisioning all new nodes, you must manually change
false after upgrade, then run Puppet and restart the pe-razor-server service.
Tip: You can run
razor --versionto verify that the upgrade was successful.