Upgrading Chef Analytics

[edit on GitHub]

Note

This documentation is meant to support existing Chef customers using Analytics.

If you are a new Chef customer, or are looking to gain better insight into your fleet, try Chef Automate. You’ll get a graphical interface and query language that gives you insight into operational, compliance, and workflow events. Download Chef Automate here.

Note

The upgrade process has changed for Chef Analytics 1.3.x. Please carefully read the following before upgrading. Some steps are marked as “(1.2.x -> 1.3.x upgrade only.)”. Only run those steps for upgrades of Chef Analytics 1.2.x to 1.3.x.

Prerequisites

This section describes the prerequisites for the upgrade process:

  1. The Chef server referenced by this Chef Analytics configuration should already have been upgraded to at least 12.0.3 or Enterprise Chef 11.3.
  2. The Chef server must have been reconfigured via the chef-server-ctl reconfigure command.
  3. The newly-generated /etc/opscode-analytics directory on the Chef server must have replaced the existing /etc/opscode-analytics directory and it’s contents on the Chef Analytics server. Specifically, the analytics-source.json file will have changed after being reconfigured by the later release of Chef server.

Standalone

There are two upgrade paths to Chef Analytics for 1.3.x: with or without partitions. pg_partman supported partitioning in the database was added in Chef Analytics 1.3.0 and is enabled by default. Using partitions is strongly recommended.

Upgrade with Partitions

Recommended. The following steps describe upgrading Chef Analytics with partitions enabled.

  1. Stop the services:

    $ opscode-analytics-ctl stop
    
  2. Run dpkg or RPM Package Manager. For dpkg:

    $ dpkg -i /path/to/opscode-analytics-<version>.deb
    

    For RPM Package Manager:

    $ rpm -Uvh /path/to/opscode-analytics-<version>.rpm
    
  3. Run the pre-flight check:

    $ opscode-analytics-ctl preflight-check
    
  4. Copy in the /etc/opscode-analytics directory from the Chef server.

  5. Reconfigure the services:

    $ opscode-analytics-ctl reconfigure
    

    Note

    Starting with Chef Analytics 1.4.0, the Chef MLSA must be accepted when reconfiguring the product. If the Chef MLSA has not already been accepted, the reconfigure process will prompt for a yes to accept it. Or run opscode-analytics-ctl reconfigure --accept-license to automatically accept the license.

  6. (1.2.x -> 1.3.x upgrade only.) Migrate to partitions:

    $ opscode-analytics-ctl migrate-partitions
    

    This step may take awhile. It is recommended you leave Chef Analytics down during this time.

  7. Start the services:

    $ opscode-analytics-ctl start
    

Upgrade without Partitions

The following steps describe upgrading Chef Analytics with partitions disabled.

  1. Stop the services:

    $ opscode-analytics-ctl stop
    
  2. Run dpkg or RPM Package Manager. For dpkg:

    $ dpkg -i /path/to/opscode-analytics-<version>.deb
    

    For RPM Package Manager:

    $ rpm -Uvh /path/to/opscode-analytics-<version>.rpm
    
  3. Run the pre-flight check:

    $ opscode-analytics-ctl preflight-check
    
  4. Copy in the /etc/opscode-analytics directory from the Chef server.

  5. Disable partitions. Add the following to your opscode-analytics.rb file:

    features['partitioning'] = false

  6. Reconfigure the services:

    $ opscode-analytics-ctl reconfigure
    

    Note

    Starting with Chef Analytics 1.4.0, the Chef MLSA must be accepted when reconfiguring the product. If the Chef MLSA has not already been accepted, the reconfigure process will prompt for a yes to accept it. Or run opscode-analytics-ctl reconfigure --accept-license to automatically accept the license.

  7. Start the services:

    $ opscode-analytics-ctl start
    
    $ opscode-analytics-ctl stop
    
  8. Run dpkg or RPM Package Manager. For dpkg:

    $ dpkg -i /path/to/opscode-analytics-<version>.deb
    

    For RPM Package Manager:

    $ rpm -Uvh /path/to/opscode-analytics-<version>.rpm
    
  9. Run the pre-flight check:

    $ opscode-analytics-ctl preflight-check
    
  10. Copy in the /etc/opscode-analytics directory from the Chef server.

  11. Stop the server:

    $ opscode-analytics-ctl stop
    
  12. Reconfigure the services:

    $ opscode-analytics-ctl reconfigure
    
  13. Start the services:

    $ opscode-analytics-ctl start