In Lab 3: Installing and Configuring Chef, participants typically focus on the installation and initial setup of Chef, an automation platform used for configuring and managing infrastructure as code. This lab involves installing the Chef Workstation on the local machine and configuring essential settings such as user credentials and organizational details. Participants may also explore the deployment of the Chef Infra Server, which acts as the central hub for storing and managing cookbooks and configurations. The lab aims to provide hands-on experience in setting up the Chef environment, enabling participants to automate infrastructure provisioning and configuration. Successful completion of Lab 3 equips participants with the foundational skills required to leverage Chef for streamlined and consistent infrastructure management within their DevOps workflows.
wget https://packages.chef.io/files/stable/chef-workstation/0.16.33/el/7/chef-workstation-0.16.33-1.el7.x86\_64.rpm
yum install chefdk-3.0.36-1.c17.x86\_64.rpm –y
chef –v
chef -- version
mkdir cookbooks
cd cookbooks
chef generate cookbook test-cookbook
ls
tree test-cookbook
cd test-cookbook
chef generate recipe test-recipe
cd ..
vi test-cookbook/recipes/test-recipe.rb
(Press i)
file ‘/myfile’ do
content “Welcome to RST Forum!!!”
action :create
end
(Press esc)
:wq!
chef exec ruby –c test-cookbook/recipes/test-recipe.rb
chef-client –zr “recipe\[test-cookbook::test-recipe\]”
ls /