Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install CHEF Workstation in RHEL and CentOS 8/7 - DesignLinux

Mar 05 2021
designlinux 0 Comments

Chef is one of the popular configuration management tools, which is used to rapidly automate deployment, configurations, and management of the entire IT infrastructure environment.

In the first part of this Chef series, we’ve explained Chef concepts, which consists of three important components: Chef Workstation, Chef Server & Chef Client/Node.

In this article, you will learn how to install and test Chef Workstation in RHEL/CentOS 8/7 Linux distributions.

Installing Chef Workstation in CentOS/RHEL

Chef Workstation is the Machine where the admin will work to create recipes, cookbooks. With Chef Workstation, Developers/Admins can make Infrastructure as Code. All the development and testing processes can be done in the Chef Workstation. It can be installed in Windows, macOS, Redhat, Ubuntu & Debian. It consists of all the necessary packages, tools, and dependencies like Chef-CLI, Knife, Chef Infra Client, etc., to develop tests.

1. Go to the Chef Workstation downloads page and grab the appropriate package for your distribution release version or use the following wget command to download directly on the terminal.

------ On CentOS / RHEL 7 ------ 
# wget https://packages.chef.io/files/stable/chefdk/4.13.3/el/7/chefdk-4.13.3-1.el7.x86_64.rpm

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

2. Next, use the following rpm command to install ChefDK as shown.

# rpm -ivh chefdk-4.13.3-1.el7.x86_64.rpm
Install Chefdk in CentOS
Install Chefdk in CentOS

3. Verify the ChefDK installation using the following command.

# chef -v
Check Chef Version
Check Chef Version

4. 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 Tecmint” using Chef.

# vi tecmintchef.rb

Add the following code.

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

5. Run the recipe using the below command. While running the first time, it will ask you to accept the Licence.

# chef-apply tecmintchef.rb
Run Chef Recipe
Run Chef Recipe

Your file test.txt is created and you can verify it by running the ls command as shown.

# ll
Verify File Creation
Verify File Creation

Uninstall Chef Workstation

6. Run the following command to uninstall Chef Workstation from the system.

# rpm -e chefdk

That’s It! In this article, we have gone through Chef Workstation installation and testing. We will see the Chef client-server model in the upcoming articles.

Related

Tags: CentOS Tips, Chef Tips, Linux Automation Tools, RHEL Tips

Setup Remote Development in VSCode via Remote-SSH Plugin

Prev Post

How to Use Heredoc in Shell Scripting

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 259
  • 614,631

DesignLinux.com © All rights reserved

Go to mobile version