Skip to main content

Upgrade to Chef Infra Server 13

[edit on GitHub]

The following sections describe the upgrade process for Chef Infra Server 13.

Note

Chef Infra Server 13 is governed by the EULA License Agreement. You will be required to accept these terms when using Chef Infra Server 13 for the first time.

Note

Back up the Chef Infra Server data before starting the upgrade process. We recommend using knife-ec-backup to back up Chef Infra Server.

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:

  1. Run the following command to make sure all services are in a sane state.

    chef-server-ctl reconfigure
    
  2. Download the desired Chef Infra Server version from the Chef Infra Server Downloads page.

  3. Stop the server:

    chef-server-ctl stop
    
  4. 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
    
  5. 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
    
  6. Start Chef Infra Server 13:

    chef-server-ctl start
    
  7. Upgrade the Chef Infra Server add-ons.

  8. 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

These instructions are primarily intended for existing users of the 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 Cluster

To upgrade to Chef Infra Server 13 from a tiered Chef Infra Server configuration, do the following:

  1. Run the following on all servers to make sure all services are in a sane state.

    chef-server-ctl reconfigure
    
  2. Download the desired Chef Infra Server version from the Chef Infra Server Downloads page, then copy it to each server.

  3. Stop all of the front end servers:

    chef-server-ctl stop
    
  4. 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
    
  5. Stop the back end server:

    chef-server-ctl stop
    
  6. 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
    
  7. 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
    
  8. Upgrade each of the front end servers:

    chef-server-ctl upgrade
    
  9. Run the following command on both the front end, and back end servers:

    chef-server-ctl start
    
  10. Upgrade the Chef Infra Server add-ons on each server.

  11. 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.

FeatureCommand

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:

sudo chef-server-ctl install chef-manage

then:

sudo chef-server-ctl reconfigure

and then:

sudo chef-manage-ctl reconfigure

To accept the Chef MLSA:

sudo chef-manage-ctl reconfigure --accept-license

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:

  1. Chef Infra Server < 12.17.15 -> Chef Infra Server 12.17.15
  2. Chef Infra Server 12.17.15 -> Chef Infra Server 13

Upgrading from Chef Infra Server 11

We recommend a stepwise upgrade:

  1. Chef Infra Server 11 -> Chef Infra Server 12.3.0
  2. Chef Infra Server 12.3.0 -> Chef Infra Server 12.17.15
  3. Chef Infra Server 12.17.15 -> Chef Infra Server 13