This presentation on Chef will help you understand why Chef is needed, what is Chef, what is configuration management, infrastructure as code, components of Chef, Chef architecture & how it works, and you will also see a demo on Chef. Chef is an open source tool developed by Opscode. It is written in Ruby and Erlang. It automates the configuration and maintenance of multiple servers. Configuration management is a collection of engineering practices that provides a systematic way to manage entities for efficient deployment. These entities include code, infrastructure and people. Now let us get started and understand Chef in detail.
Below topics are explained in this Chef presentation:
1. Why Chef?
2. What is Chef?
3. Configuration management
4. Infrastructure as code
5. Components of Chef
6. Chef architecture
7. Flavors of Chef
8. Chef demo
Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. You’ll become en expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at: https://www.simplilearn.com/
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps Tools | Simplilearn
1.
2. What’s in it for you?
Chef demo
Chef architecture
Why use Chef?
What is Chef?
Configuration Management
Components of Chef
Infrastructure as Code
Flavours of Chef
4. Large companies have a constantly changing
infrastructure that requires to be configured and
maintained time to time
Why use Chef?
5. Large companies have a constantly changing
infrastructure that requires to be configured and
maintained time to time
Why use Chef?
New nodes may get added
Existing systems may fail
6. Large companies have a constantly changing
infrastructure that requires to be configured and
maintained time to time
Why use Chef?
New nodes may get added
Existing systems may fail
I can’t do it all by myself..
7. Large companies have a constantly changing
infrastructure that requires to be configured and
maintained time to time
Why use Chef?
This is where Chef comes in and automates the entire
process
8. Continuous deployment:
-Software is deployed continuously enabling a company to keep in
pace with the market requirements
Why use Chef?
Chef provides:
9. Continuous deployment:
-Software is deployed continuously enabling a company to keep in
pace with the market requirements
Increase system robustness:
-Infrastructure automation ensures all bugs are caught and removed
before deploying the software
Why use Chef?
Chef provides:
10. Continuous deployment:
-Software is deployed continuously enabling a company to keep in
pace with the market requirements
Increase system robustness:
-Infrastructure automation ensures all bugs are caught and removed
before deploying the software
Adapt to the Cloud:
-Chef easily integrates with infrastructure on cloud
Why use Chef?
Chef provides:
12. Chef is an open source tool developed by OpsCode
What is Chef?
13. Chef is an open source tool developed by OpsCode
What is Chef?
It is written in Ruby and Erlang
14. Chef is an open source tool developed by OpsCode
It is written in Ruby and Erlang
It automates configuration and maintenance of multiple servers
What is Chef?
17. Code Infrastructure people
Configuration Management
Configuration management is a collection of engineering practices that provides a systematic
way to manage entities for efficient deployment.These entities include
24. Infrastructure as code
I must set up a server and install 20
software applications over it
Server is set up
25. Infrastructure as code
I must set up a server and install 20
software applications over it
Server is set up
It will take me all night to install all 20
software applications though
26. Infrastructure as code
Server is set up
This wouldn’t be the case if i had a code for installing all
the software rather than doing it manually
I must set up a server and install 20
software applications over it
It will take me all night to install all 20
software applications though
30. Infrastructure as code
Policies and configurations Code
written as
This makes configuration management simpler and
more efficient
Infrastructure as code is a type of it infrastructure where the operations
team manages the code rather than a manual procedure
32. workstation
The code for configuring and managing the infrastructure is
created here
Knife is a command line tool that uploads the cookbook to the server
Components of Chef
33. SERVER
The server is where the Cookbooks are stored
It provides tools required to drive the node configurations
Server may be hosted local or remote
The server is the middle man between workstation and the nodes
Components of Chef
34. node
Ohai fetches the current state of the node it’s located in
Chef client is responsible for the communication with the server
Each node can have a different configuration requirement
Nodes are the systems that require the configuration
Components of Chef
36. Recipes are created at the workstation
Chef architecture
Template ‘etc/simplilearn’ do
source ‘simplilearn1.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
workstation SERVER
node
node
37. Recipes are created at the workstation
Chef architecture
workstation SERVER
node
node
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Recipes
38. Chef architecture
Collection of recipes forms a cookbook
workstation SERVER
node
node
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
39. The Cookbook is uploaded to the server using the knife
Chef architecture
workstation SERVER
node
nodeKnife
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
40. The Cookbook is uploaded to the server using the knife
Chef architecture
workstation
Knife
SERVER
node
node
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
$ knife upload simpli-db
41. Ohai, a component of the node checks the system’s
state and sends it to the chef client
Chef architecture
ohai
workstation
ohai
Knife
SERVER
node
node
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
$ knife upload simpli-db
42. Chef architecture
$ chef-client
The chef client ensures that the node’s state is
consistent with the cookbook
ohai
workstation
ohai
Knife
SERVER
node
node
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
$ knife upload simpli-db
43. Chef architecture
If not, the client pulls the cookbook from the server
ohai
workstation
ohai
Knife
SERVER
node
node
$ chef-client
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
$ knife upload simpli-db
44. Chef architecture
The node then configures itself with respect to the
cookbook to the right state
ohai
workstation
ohai
Knife
SERVER
node
node
$ chef-client
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
$ knife upload simpli-db
45. Chef architecture
The node then configures itself with respect to the
cookbook to the right state
ohai
workstation
ohai
Knife
SERVER
node
node
$ chef-client
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn2.erb’
owner ‘root’
group ‘root’
mode ‘0655’
end
Template ‘etc/simplilearn’ do
source ‘simplilearn3.erb’
owner ‘root’
group ‘root’
mode ‘0755’
end
Recipes
$ knife upload simpli-db
47. Chef solo has no remote server.The cookbooks are located at the local site itself
Chef server is provided as a service on the cloud.Thus, there is no need to setup a
server yourselfHosted chef
Flavours of Chef
workstation
server
Node
Chef solo
48. Chef client/server
This is the traditional chef architecture where a remote server is hosted that
communicates between workstation and node
Flavours of Chef
workstation server
workstation server node
node
private chef
This is the enterprise version of chef where the server is hosted within the
enterprise infrastructure
51. Chef demo
Download and install Chefdk
on workstation
Make a cookbook and write
the recipe
Set up the server
Link the workstation and upload
the recipe to the server
Configure the node
52. Key Takeaways
Why use chef? What is chef?
Infrastructure as codeConfiguration management