Chef Software Packages
Packages for Chef Software products may be installed using platform-native package repositories or the Chef Software Install script. Both installation methods support the following release channels:
Channel | Description |
---|---|
stable | A build from this channel is an "official" release that has passed full user acceptance testing. Artifacts in this channel are retained indefinitely. |
current | A build from this channel is an "integration" build that has passed full testing, but has not been officially released. Artifacts in this channel are retained for 30 days and then removed automatically. |
Chef recommends using the stable channel when installing any of these products on production systems.
Package Repositories
The stable
and current
release channels support the following
package repositories:
- Apt (Debian and Ubuntu platforms)
- Yum (Enterprise Linux platforms)
Chef Software’s GPG public key can be downloaded here.
Debian / Ubuntu
To set up an Apt package repository for Debian and Ubuntu platforms:
Enable Apt to fetch packages over HTTPS:
sudo apt-get install apt-transport-https
Install the public key for Chef Software:
wget -qO - https://packages.chef.io/chef.asc | sudo apt-key add -
Create the Apt repository source file:
echo "deb https://packages.chef.io/repos/apt/<CHANNEL> <DISTRIBUTION> main" > chef-<CHANNEL>.list
Replace
<CHANNEL>
with the release channel:stable
orcurrent
.Replace
<DISTRIBUTION>
with the appropriate distribution name:- For Debian 9:
stretch
- For Debian 10:
buster
- For Debian 11:
bullseye
- For Ubuntu 18.04:
bionic
- For Ubuntu 20.04:
focal
- For Debian 9:
Update the package repository list:
sudo mv chef-stable.list /etc/apt/sources.list.d/
Update the cache for the package repository:
sudo apt-get update
Enterprise Linux
To set up a Yum package repository for Enterprise Linux platforms:
Install the public key for Chef Software:
sudo rpm --import https://packages.chef.io/chef.asc
Create the Yum repository source file:
cat >chef-<CHANNEL>.repo <<EOL [chef-<CHANNEL>] name=chef-<CHANNEL> baseurl=https://packages.chef.io/repos/yum/<CHANNEL>/el/<VERSION>/\$basearch/ gpgcheck=1 # No auto-upgrade, as there are manual steps needed for Chef Infra Server upgrades enabled=0 EOL
Replace
<CHANNEL>
with the release channel:stable
orcurrent
.Replace
<VERSION>
with your Enterprise Linux version; the allowable versions are6
,7
, or8
.Update the package repository list:
sudo yum-config-manager --add-repo chef-stable.repo
Note that the
yum-config-manager
command requires theyum-utils
package, which is not installed on CentOS by default. You can install the package by runningsudo yum install yum-utils
, or you can use themv
command to add the repository to the/etc/yum.repos.d/
directory:sudo mv chef-stable.repo /etc/yum.repos.d/
Chef Software Install Script
The Chef Software install script can be used to install any Chef Software, including things like Chef Infra Client, Chef Infra Server, Chef InSpec. This script does the following:
- Detects the platform, version, and architecture of the machine on which the installer is being executed
- Fetches the appropriate package, for the requested product and version
- Validates the package content by comparing SHA-256 checksums
- Installs the package
Run the Chef Software Install Script
The Chef Software Install script can be run on UNIX, Linux, and Windows platforms. The terms ‘omnibus’ and ‘omnitruck’ are only relevant to the build processes used internally at Chef Software.UNIX and Linux
On UNIX, Linux, and macOS systems, invoke the Chef Software Install script with:
curl -L https://omnitruck.chef.io/install.sh | sudo bash
and then enter the local password when prompted.
Windows
On Windows systems, invoke the Chef Software Install script using Windows PowerShell:
. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install
Chef Software Install Script Options
In addition to the default install behavior, the Chef Software Install script supports the following options:
-c
(-channel
on Windows)The release channel from which a package is pulled. Possible values:
current
orstable
. Default value:stable
.-d
(-download_directory
on Windows)The directory into which a package is downloaded. When a package already exists in this directory and the checksum matches, the package is not re-downloaded. When
-d
and-f
are not specified, a package is downloaded to a temporary directory.-f
(-filename
on Windows)The name of the file and the path at which that file is located. When a filename already exists at this path and the checksum matches, the package is not re-downloaded. When
-d
and-f
are not specified, a package is downloaded to a temporary directory.-P
(-project
on Windows)The product name to install. Supported versions of Chef products are
automate
,chef
,chef-server
,inspec
,chef-workstation
,chefdk
,supermarket
,chef-backend
,push-jobs-client
, andpush-jobs-server
. Default value:chef
.-s
(-install_strategy
on Windows)The method of package installations. The default strategy is to always install when the install.sh script runs. Set to “once” to skip installation if the product is already installed on the node.
-l
(-download_url_override
on Windows)Install package downloaded from a direct URL.
-a
(-checksum
on Windows)The SHA256 for download_url_override
-v
(-version
on Windows)The version of the package to be installed. A version always takes the form x.y.z, where x, y, and z are decimal numbers that are used to represent major (x), minor (y), and patch (z) versions. A two-part version (x.y) is also allowed. For more information about application versioning, see https://semver.org/.
Examples
The following examples show how to use the Chef Software Install script.
To install Chef Infra Client 15.8.23:
curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -v 15.8.23
To install the latest version of Chef Workstation on Windows
from the current
channel:
. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel current -project chef-workstation