11

Install Chef Development Kit / Workstation on Ubuntu 20.04|18.04

 2 years ago
source link: https://computingforgeeks.com/how-to-install-chef-development-kit-workstation-on-ubuntu/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Workstation on Ubuntu 20.04|18.04

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:

  1. Install Chef DK using omnitruck setup script
  2. 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.9.7. Download it using the wget command.

VER=4.9.7
wget https://packages.chef.io/files/stable/chefdk/${VER}/ubuntu/20.04/chefdk_${VER}-1_amd64.deb

Wait for the download to finish then install the package with dpkg

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 and ~/.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="20.7.96"
wget https://packages.chef.io/files/stable/chef-workstation/${VER}/ubuntu/20.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.

Chef Learning course:

Also read:

How to configure Chef Knife, Upload Cookbooks and Run a recipe on Chef Client Nodes


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK