TDP DevOps – Day 5 Assignment 1
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
1)What is Chef?
Chef is an automation tool that let’s to automate processes. It’s a Configuration Management (CM) application that allows you to automate procedures and operations across a company’s servers and other devices in a few simple steps. This automation solution avoids the need for sophisticated and lengthy code scripts that could cause problems in the long term. You can deploy and manage software programs across all devices in your organization with only a few clicks.
2) 10 Advantages of Chef ?
- Consistency
- Scalability
- Faster deployments
- Reduced risks
- Integration with any cloud technology
- Increasing Service Resiliency
- Reduced IT Costs
- Accelerating Software Delivery
- Managing Both Data Center and Cloud Environments
- Delivering All Your Infrastructure from any app, everywhere, continuously
3) How to install Chef Workstation?
- Go to chef workstation page
- click on the package for window/linux or any other version we want.
- You will get a link post clicking on download button.
- wget https://packages.chef.io/files/stable/chef-workstation/22.5.923/el/7/chef-workstation-22.5.923-1.el7.x86_64.rpm
- Copy the above command and execute in putty. mingw server and download the packages of the chef.
- workstation will be installed.
4) One Example Program of Recipe?
file.rb
file ‘/opt/first.txt’
file ‘/opt/first.txt’ do
action :delete
end
file ‘/opt/content.txt’ do
content “Hi this Sathvika”
mode 755
owner Sathvika
end
httpd
create a index.html
copy index.htmkl
start
package ‘name’ do
package_name “httpd”
end
file ‘index.html’ do
content “<h1>Welcome to DevOpsSchool Chef Class</h1>”
end
bash ‘extract_module’ do
code <<-EOH
cp index.html /var/www/html/
EOH
end
service ‘httpd’ do
service_name “httpd”
action :start
end