This DevOps Tutorial takes you through what is Configuration Management all about and basic concepts of Infrastructure as code. It also compares the four most widely used Configuration Management tools i.e. Chef, Puppet, Ansible and SaltStack.
Check our complete DevOps YouTube playlist here: http://goo.gl/O2vo13
DevOps Tutorial Blog Series here: https://goo.gl/P0zAfF
2. www.edureka.co/devops
Do You Know?
Which are the tools used
in DevOps Lifecycle?
What is DevOps
Lifecycle?
Chef | Puppet | Ansible | SaltStack
– On What factors to compare?
Which tools are used for
Configuration Management (CM) and
Deployment? And Why?
1
2
4
3
7. www.edureka.co/devops
Scenario 1: Mass Deployment
Deploy the application on
5 VMs
Deploy the application on
500 VMs
It is not possible for a human to deploy application on 500 VMs quickly,
We need a tool that can do this job.
8. www.edureka.co/devops
Scenario 2: Migrating from Test to Production
Everything was fine in TEST!
What happened now???
Due to test/production environment difference, few applications work on test but not
on production. There should be a tool to handle the environment differences.
9. www.edureka.co/devops
Scenario 3: Application Failure
Why the hell app has
stopped working,
what did you do???
No Idea, Sir!
I haven’t done
anything wrong.
There is no way to review change logs, complex way to roll back. There should be a tool
which should roll back the application automatically to stable version in case of failures.
10. www.edureka.co/devops
Case Study on Scenario 3
Top travel booking website in UK, 1.2 Billion pounds annual revenue, 9+ million visits per month
1 2 3
Huge money loss due to downtime!
Reference: www.SoftwareOperability.com
13. www.edureka.co/devops
Infrastructure as Code (IaC)
DEV
TEST
PROD
IaC is automation of IT operations
(build, deploy, manage) by provisioning
of code , rather than manual process
Provisioning of Dev, Test and Prod environment
by writing code in one centralized location
Code for the
infrastructure
14. www.edureka.co/devops
Infrastructure as Code (IaC)
echo
“spock:*:1010:1010:Spock:
/home/spock:/bin/sh” >>
/etc/passwd
(the user spock is added
to passwd file)
Shell Script
user { “spock”:
ensure => present,
gid => “science”,
home => “/home/spock”,
shell => “/bin/sh”
}
CM Tool Script
✓ In shell script, you need to write automation script from
scratch but in CM (configuration management) tool 80%
things are already available
✓ In shell script, you need to define the workflows whereas in
CM tool the workflows are already available
✓ You have UI (user interface) in CM tools to ease your job for
automating the tasks but you don’t have UI in shell scripting
CM Tools
15. www.edureka.co/devops
Puppet vs Chef vs SaltStack vs Ansible
Scalability
Ease of Setup
Availability
Management
Interoperability
We will evaluate the above tools on below parameters:
17. www.edureka.co/devops
Ease of Setup
Master-Agent
Puppet server runs on master machine and
Puppet clients runs as agent on each client
machine
Master-Agent
Chef server runs on master machine and
Chef clients runs as agent on each client
machine
Master-Agent
Here Server is called as master and clients
are called as minions which run as agents
in client machine
Master-Node
It has only master running on server
machine, but no agents running on client
machine, uses ssh to login to client systems
Client machine VM requires no special setup,
hence it is faster to setup
Scalability
Ease of Setup
Availability
Management
Interoperability
18. www.edureka.co/devops
Availability
Highly Available
Runs with a single active node, called the
Primary instance, if primary goes down,
there is Secondary instance to take its place
Highly Available
When there is failure in the primary server
i.e. chef sever, it has a backup server to
take the place of primary server
Highly Available
It has multi-master architecture, if the active
master goes down, the other master takes
the active master place
Highly Available
It can have multiple masters configured, if
one master is down, agents connect with
the other master in the list
Scalability
Ease of Setup
Availability
Management
Interoperability
19. www.edureka.co/devops
Management
Not very easy to learn to manage the
configurations as it uses its own language
called Puppet DSL. Client pulls the
configurations from the Server
Non-Immediate remote execution
You need to be a programmer to manage the
configurations as it offers configurations in
Ruby DSL. Client pulls the configurations from
the Server
Easy to learn to manage the configurations
Server pushes configurations to all the clients
Immediate remote execution
Easy to learn to manage the configurations
Server pushes configurations to all the nodes
Good for real-time application
Immediate remote execution
Scalability
Ease of Setup
Availability
Management
Interoperability
20. www.edureka.co/devops
Interoperability
Scalability
Ease of Setup
Availability
Management
Interoperability Ansible supports windows machines
as well but the Ansible server has to
be in Linux/Unix machine
Chef Server works only in Linux/Unix
but Chef Client and Workstation can
be on windows as well
Salt Master works only on Linux/Unix
but Salt minions can work on windows
as well
Puppet Master works only on
Linux/Unix but Puppet Agent also
works on windows
23. www.edureka.co/devops
Configuration Language
Configuration : DSL (Puppet DSL)
Not easy to learn, administrator oriented
Configuration : DSL (Ruby)
Steep Learning Curve, developer oriented
Configuration : YAML (Python)
Easy to learn, administrator oriented
Python is inbuilt into most Unix and Linux
deployments nowadays, so setting the tool
up and running is quicker
Configuration : YAML (Python)
Easy to learn, administrator oriented
Python is inbuilt into most Unix and Linux
deployments nowadays, so setting the tool
up and running is quicker
• DSL : Domain Specific Language
• YAML : Yet Another Markup Language
Conf. Lang.
GitHub Activity
Enterprise Cost
Success Story
Popularity
25. www.edureka.co/devops
Enterprise Cost for 100 Nodes Per Year
Puppet Enterprise : $12,000
Chef Enterprise : $7,200
SaltStack Enterprise : $15,000
Ansible Enterprise Tower : $10,000
Reference: www.ansible.com/pricing
GitHub Activity
Enterprise Cost
Success Story
Reference: www.puppet.com/support-services/customer-support/support-plans
Reference: www.chef.io/pricing/
Reference: www.saltstack.com/enterprise/
Conf. Lang.
Popularity
26. www.edureka.co/devops
Popularity : Google Trend (Past 5 Years)
✓ Puppet and Chef are old players, puppet has wider adoption
✓ SaltStack and Ansible are new players, and Ansible looks very
promising with the growing trend
GitHub Activity
Enterprise Cost
Popularity
Success Story
Conf. Lang.
27. www.edureka.co/devops
Success Story
“75% of ICE’s(Intercontinental Exchange)
20,000 servers are managed by Puppet
Enterprise. They increased from 300 servers
per admin to 700 servers per admin.
Provisioning dev environments reduced
from 1 or 2 days to just 21 minutes.”
“Chef has increased the effectiveness and
the speed of our development cycle.
30% of Gannett's technology organization
used Chef but Gannett has aggressive
plans for 100% adoption this year 2016.”
“Using Ansible, we’ve been able to cut
down certain processes from 17 hours to
3 minutes. Ansible is unquantifiable in
its benefit.”
“LinkedIn had about 5,000 Salt Minions
under management 4 years ago. That
number has ballooned to more than 70,000
today to manage their infrastructure.”
Reference: www.ansible.com/success-stories/fatmap
GitHub Activity
Enterprise Cost
Success Story
Reference: www.saltstack.com/saltstack-at-web-scale-better-stronger-faster/
Reference: www.chef.io/customers/gannett/
Reference: www.puppet.com/resources/customer-stories/nyse
Conf. Lang.
Popularity
28. www.edureka.co/devops
Conclusion
✓ By now, you would have selected your tool,
remember, there is nothing called best tool
for configuration management in DevOps
✓ You should choose the tool as per your
organization’s need and environment