How To Install Chef Workstation on CentOS 8

Install Chef Workstation on CentOS 8

In this tutorial, we will show you how to install Chef Workstation on CentOS 8. For those of you who didn’t know, A Chef is a configuration management tool that simplifies the manual and repetitive tasks for infrastructure management. With the Chef users can easily manage, configure and deploy the resources across the network from the centralized location irrespective of the environment (cloud, on-premises, or hybrid).

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step-by-step install of the Chef Workstation on CentOS 8.

Install Chef Workstation on CentOS 8

Step 1. First, let’s start by ensuring your system is up-to-date.

sudo dnf clean all
sudo dnf update

Step 2. Installing Chef Workstation on CentOS 8.

Now we download the latest release on the Chef Workstation releases page:

wget https://packages.chef.io/files/stable/chefdk/4.13.3/el/8/chefdk-4.13.3-1.el7.x86_64.rpm

Then, use the following rpm command to install Chef as shown:

rpm -ivh chefdk-4.13.3-1.el7.x86_64.rpm

To verify the installation, run:

$ chef -v
 Chef Workstation version: 0.9.31
 Chef Infra Client version: 15.3.14
 Chef InSpec version: 4.16.0
 Chef CLI version: 1.0.13
 Test Kitchen version: 2.3.2
 Cookstyle version: 5.6.2

Next, we will validate the workstation by simple recipe. Here, we are going to create a text file test.txt which should contain “Welcome to idr00t” using Chef.

nano idrootchef.rb

Add the following code:

file 'text.txt' do
    content 'Welcome to idr00t'
end

Then, run the recipe using the below command:

chef-apply idrootchef.rb

Congratulations! You have successfully installed Chef Workstation. Thanks for using this tutorial for installing the Chef Workstation on CentOS 8 systems. For additional help or useful information, we recommend you check the official Chef website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!