Upgrade to Chef Infra Server 13
The following sections describe the upgrade process for Chef Infra Server 13.
Note
Note
From Chef Infra Server 12.17.15 or later
There are three upgrade scenarios for upgrades from later versions of Chef Infra Server 12 to Chef Infra Server 13:
Note
As of version 12.14, Chef Infra Server will not render passwords outside of
the /etc/opscode
directory by default. If you are not using any Chef
Infra Server add-ons, or you’re using the latest add-on versions, you
can set insecure_addon_compat
to false
in
/etc/opscode/chef-server.rb
. With this option set to false
, Chef
Infra Server writes all credentials to a single location. Note that this
setting should only be applied after both the Chef Infra Server and its
add-ons have been upgraded to compatible versions.
For additional information on this change, including a list of supported add-on versions, see Chef Infra Server Credentials Management.
Standalone
This section describes the upgrade process for a standalone configuration. The upgrade process will require downtime equal to the amount of time it takes to stop the server, run dpkg or RPM Package Manager, and then upgrade the server.
To upgrade to Chef Infra Server 13 from a standalone Chef Infra Server, do the following:
Run the following command to make sure all services are in a sane state.
chef-server-ctl reconfigure
Download the desired Chef Infra Server version from the Chef Infra Server Downloads page.
Stop the server:
chef-server-ctl stop
Run dpkg or RPM Package Manager.
For dpkg:
dpkg -i /path/to/chef-server-core-<version>.deb
For RPM Package Manager:
rpm -Uvh --nopostun /path/to/chef-server-core-<version>.rpm
Upgrade the server with the following command. You will need to type
Yes
to accept the Chef License for version 13.chef-server-ctl upgrade
To accept the license and upgrade to version 13 in one command:
CHEF_LICENSE='accept' chef-server-ctl upgrade
Start Chef Infra Server 13:
chef-server-ctl start
Upgrade the Chef Infra Server add-ons.
After the upgrade process is complete and everything is tested and verified to be working properly, clean up the server by removing all of the old data:
chef-server-ctl cleanup
High Availability: Chef Backend
The Chef Infra Server can operate in a high availability configuration that provides automated load balancing and failover for stateful components in the system architecture.
To upgrade your Chef Backend installation, see High Availability: Upgrade to Chef Backend 2. The upgrade process will require downtime equal to the amount of time it takes to stop the server, run dpkg or RPM Package Manager, and then upgrade the server.
To upgrade Chef Backend from an existing DRBD/keepalived configuration, see the Best Best Practices for Migrating Your Chef Server webinar from the Chef Blog
Tiered
This section describes the upgrade process from a tiered server configuration. The upgrade process will require downtime equal to the amount of time it takes to stop the server, run dpkg or RPM Package Manager, and then upgrade the server.
Note
tier
Chef Infra Server topology. For the latest information on high
availability and how to set up a highly-available server cluster, see
High Availability: Backend ClusterTo upgrade to Chef Infra Server 13 from a tiered Chef Infra Server configuration, do the following:
Run the following on all servers to make sure all services are in a sane state.
chef-server-ctl reconfigure
Download the desired Chef Infra Server version from the Chef Infra Server Downloads page, then copy it to each server.
Stop all of the front end servers:
chef-server-ctl stop
Run dpkg or RPM Package Manager on all servers.
For dpkg:
dpkg -i /path/to/chef-server-core-<version>.deb
For RPM Package Manager:
rpm -Uvh --nopostun /path/to/chef-server-core-<version>.rpm
Stop the back end server:
chef-server-ctl stop
Upgrade the backend server with the following command. You will need to type
Yes
to accept Chef License for version 13.chef-server-ctl upgrade
To accept the license and upgrade to version 13 in one command:
CHEF_LICENSE='accept' chef-server-ctl upgrade
Copy the entire
/etc/opscode
directory from the back end server to all front end servers:scp -r /etc/opscode <each server's IP>:/etc
Upgrade each of the front end servers:
chef-server-ctl upgrade
Run the following command on both the front end, and back end servers:
chef-server-ctl start
Upgrade the Chef Infra Server add-ons on each server.
After the upgrade process is complete, the state of the system after the upgrade has been tested and verified, and everything looks satisfactory, remove old data, services, and configuration by running the following command on each server:
chef-server-ctl cleanup
Upgrading Add-ons
This section details the process for upgrading additional features after the Chef Infra Server has been upgraded.
Use Downloads
The install
subcommand downloads packages from
https://packages.chef.io/ by default. For systems that are not behind
a firewall (and have connectivity to https://packages.chef.io/), these
packages can be installed as described below.
Feature | Command |
---|---|
Chef Manage | Use Chef management console to manage data bags, attributes, run-lists, roles, environments, and cookbooks from a web user interface. On the Chef Infra Server, run: then: and then: To accept the Chef MLSA: |
Use Local Packages
The install
subcommand is used to install premium features of the Chef
server: Chef management console(chef-manage
) and push
jobs(opscode-push-jobs-server
).
sudo chef-server-ctl install PACKAGE_NAME --path /path/to/package/directory
For example:
sudo chef-server-ctl install chef-manage --path /root/packages
The chef-server-ctl
command will install the first chef-manage
package found in the /root/packages
directory.
Upgrading from older versions to Chef Infra Server 13
Upgrading from version between 12.0.0 - 12.17.15
We recommend a stepwise upgrade:
- Chef Infra Server < 12.17.15 -> Chef Infra Server 12.17.15
- Chef Infra Server 12.17.15 -> Chef Infra Server 13
Upgrading from Chef Infra Server 11
We recommend a stepwise upgrade:
- Chef Infra Server 11 -> Chef Infra Server 12.3.0
- Chef Infra Server 12.3.0 -> Chef Infra Server 12.17.15
- Chef Infra Server 12.17.15 -> Chef Infra Server 13