Chef is a popular configuration management tool that allows IT admins to automate the deployment, management, and secure maintenance of IT resources across in an environment. Chef has three components: Chef Workstation or Desktop, Chef Server, and Chef Client/Node. Because this post is about installing Check Workstation or Desktop, we’ll be discussing that only. The chef workstation is the computer or system where the system admin creates recipes, cookbooks, and other development work. Check workstation is where admin and developers build and test processes. It is cross-platform which means it can be installed on Linux, Mac OS, and Windows. It also contains all the necessary packages and tools like Chef-CLI, Knife, Chef Infra Client, and others. To get started with installing Chef Workstation in Ubuntu, follow the steps below. There are multiple ways to install Chef on Ubuntu. One can install Chef Workstation via its APT Repository and use a script.

Installing Chef via APT Repository

One way to install the Chef Workstation is via its APT Repository. Chef packages come in two flavors:

Stable: A build from this channel is an “official” release that has passed full user acceptance testing.  Current: A build from this channel is an “integration” build that has passed full testing, but has not been officially released.

To install from either branch above, run the commands below to enable Apt to fetch packages over HTTPS. Next, run the commands below to install the public key for Chef software. After that, run the commands below to add the Chef repository. Replace with the release channel: stable or current. Replace < DISTRIBUTION> with the appropriate distribution name:

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

For example, if you’re installing from the stable channel on Ubuntu 20.04 the commands would be like this: After adding the repository file, run the commands below to update the package repository list. Finally, run the commands below to update and install the Chef Workstation. That’s how to install Chef Workstation via its APT Repository.

Install from Script

If you want to quickly and easily install Chef from its scripts, use this method. Either method should work. However, the script is the fastest. To install via Chef script, simply run the commands below: Enter your password when prompted. This script will download and install all dependencies, prepare your machine and install Chef packages. To verify the version of Chef installed, simply run the commands below: That should display similar lines as below: That’s it! Conclusion: This post showed you how to install the Chef Workstation on Ubuntu 20.04 | 18.04. If you find any error above, please use the form below to report.