How to Install Chef Workstation on Ubuntu 18.04 | 20.04

How to Install Chef Workstation on Ubuntu 18.04 20.04

In this article, we are going to shows that how to Install Chef Workstation on Ubuntu 18.04 | 20.04.

Chef is a configuration management tool based on Ruby and Erlang that is designed to transform your infrastructure into a code. It is allows IT operators that how the infrastructure is deployed, configured, and managed.

It has basically three main components: 

  • Chef Workstation
  • Chef Server
  • Chef Client/Node

In this post, we discussing only about installing Chef Workstation. It allows IT operators and developers to build and test processes.

Chef Workstation comes with all the necessary packages and tools such as Chef-CLI, Knife, Chef Infra Client and more. These packages and tools are combined into packages for common operating systems and include all the dependencies you need to get started.


Install Chef Workstation on Ubuntu 18.04 | 20.04

Simply follow below steps to Install Chef Workstation on Ubuntu 18.04 | 20.04:

In this article, we are going to install Chef Workstation using two methods:

  1. install Chef Workstation via its APT Repository.
  2. Using script.

Method : 1 – install Chef Workstation via its APT Repository

To install it via its APT Repository, first you will need to enable Apt to fetch packages over HTTPS. To do that run the command below:

sudo apt update
sudo apt-get install apt-transport-https

After that, install the public key for Chef software using command below:

wget -qO - https://packages.chef.io/chef.asc | sudo apt-key add -

Now, run the command below to add Chef repository:

echo "deb https://packages.chef.io/repos/apt/<CHANNEL> <DISTRIBUTION> main" > chef-<CHANNEL>.list

Replace <CHANNEL> with the release channel: stable or current:

  • Stable: Passed full user acceptance testing and official released. 
  • Current: Passed full testing, but not officially released.

Replace < DISTRIBUTION> with the distribution name:

  • For Ubuntu 16.04 distribution: xenial
  • Ubuntu 18.04 distribution: bionic
  • For Ubuntu 20.04 distribution: focal

In this article, we are going to install stable channel on Ubuntu 20.04, so now command above looks similar below:

echo "deb https://packages.chef.io/repos/apt/stable focal main" > chef-stable.list

Now, you will need to update the package repository list by running below command:

sudo mv chef-stable.list /etc/apt/sources.list.d/

After update the repository list, run the commands below to update and install Chef Workstation on ubuntu:

sudo apt update
sudo apt install chef-workstation

Method : 2 – install Chef Workstation from Scrip

To install Chef Workstation using its script, run the commands below:

curl -L https://omnitruck.chef.io/install.sh | sudo bash

The command above prompt you to enter your password. After successful authentication, it will download and install all dependencies and Chef packages.

To check status of Chef , run the commands below:

chef -v

That’s all.

If you face any error and issue in above steps , please use comment box below to report.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top