The Chef development kit contains all the tools you need to develop and test your infrastructure, built by the awesome Chef community. Chef is an open source configuration management tool written in Ruby and Erlang. The Chef DK workstation is the location where users interact with Chef.
If you don’t have Chef Server installed, check: How to install Chef Automation Server on Ubuntu
On the workstation users author and test cookbooks using tools such as Test Kitchen and interact with the Chef server using the knife and chef command line tools.
There are two ways to install Chef Development Kit on Ubuntu 18.04:
- Install Chef DK using omnitruck setup script
- Install Chef Development Kit from Debian package
Install Chef DK using the setup script
This is the easiest and quickest method to install Chef Development Kit on Ubuntu 18.04 server. Open your terminal and run the commands below as root user:
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chefdk -c stable
This will install the latest, stable release.
Install Chef DK from .deb package
Visit Chef Downloads page to check the current releases of Chef DK.
As of this writing, the latest version is
4.13.3. Download it using the wget command.
VER=4.13.3 wget https://packages.chef.io/files/stable/chefdk/$VER/ubuntu/20.04/chefdk_$VER-1_amd64.deb
VER=4.13.3 wget https://packages.chef.io/files/stable/chefdk/4.13.3/ubuntu/18.04/chefdk_4.13.3-1_amd64.deb
Wait for the download to finish then install the package with
sudo apt install ./chefdk_$VER-1_amd64.deb
To use the Chef development kit version of Ruby as the default Ruby, you’ll need to edit your $PATH and GEM environment variables to include paths to the Chef development kit.
For Bash use:
echo 'eval "$(chef shell-init bash)"' >> ~/.bash_profile
~/.bash_profile represent name of the shell and its configuration file.
If you’re using zsh shell, then run:
echo 'eval "$(chef shell-init zsh)"' >> ~/.zshrc
Source your .rc file and check the ruby location.
$ source ~/.zshrc #or $ source ~/.bash_profile
Installation of Chef Development Kit will provide the following command line tools:
Click on the item link to learn more about what it does, and how it works. More ChefDK setup guides are available on Chef Documentation page.
Install Chef Workstation from .deb package
Chef Workstation gives you everything you need to get started with Chef. Start scanning and configuring your environments today with InSpec and chef-run.
Check the latest version from the Downloads page
VER="21.12.720" wget https://packages.chef.io/files/stable/chef-workstation/$VER/ubuntu/20.04/chef-workstation_$VER-1_amd64.deb
VER="21.12.720" wget https://packages.chef.io/files/stable/chef-workstation/$VER/ubuntu/18.04/chef-workstation_$VER-1_amd64.deb
Install the package:
sudo apt install ./chef-workstation_$VER-1_amd64.deb
Thanks for using our guide to install Chef Workstation / Chef Development Kit.