Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Ninja, choose your
weapon!
Puppet vs. Chef vs. Ansible vs. Salt
About me
Ant(on) Weiss
DevOps Evangelist&Enabler, CI/CD/ALM Expert
ant.weiss@gmail.com - twitter: @antweiss
http://otomato...
DevOps isn’t about
Tools
But they definitely help!
DevOps is all about
Tools
"We shape our tools. And then our tools shape us.”
Marshall McLuhan
Weapons of Mass
Configuration
• Manage configuration of thousands of servers
• Automation and orchestration
• Infrastructure...
Tools vs. no Tools
vs.
The Good Tool
• One we are comfortable with
• Flexible
• Extendable
• Scalable
• Community-supported
• Integrate-able
Puppet
Since: 2005
Written in: Ruby
Developed by: Puppetlabs
Configuration: Puppet-specific declarative language
(Ruby-based...
Puppet
Puppet master
agent agent agent
XMLRPC over HTTPS
report
report
report
Puppet Concepts
Resources: files, services, packages, users…
Manifests: Puppet programs
Classes: collections of resource de...
Puppet Features
• Configuration Management
• Automatic Discovery (MCollective)
• Orchestration (MCollective)
• Provisioning...
Puppet Code:
class ntp {
case $operatingsystem {
centos, redhat: {
$service_name = 'ntpd'
$conf_file = 'ntp.conf.el'
}
debi...
Puppet Web UI Options
• Puppet Enterprise (commercial for > 10 nodes)
• Foreman
• PuppetBoard ( reporting only )
Puppet in a Nutshell
• The Most Mature (of the four reviewed)
• ‘Pull’ mode of operation, but push also supported
• Enterp...
Chef
Since: 2009
Written in: Ruby+Erlang
Developed by: Chef ( formerly Opscode )
Configuration: pure Ruby DSL - procedural
Chef
Chef Concepts
Resources: files, services, packages, users…
Recipes: Chef programs
Cookbooks: recipes + accompanying data
Da...
Chef Code
case platform
when "ubuntu","debian"
default[:ntp][:service] = "ntp"
when "redhat","centos","fedora","scientific...
Chef Web UI Options
• OpenSource WebUI - deprecated
• Enterprise Chef - commercial, basic
Chef in a Nutshell
• Flexible, powerful
• Enterprise Features (HA, Analytics)
• Pure Ruby DSL
• Steep learning curve
• Pus...
Ansible
Since: 2012
Written in: Python
Developed by: Ansible Works inc.
Configuration: yaml+jinja
Motto: Simple IT Automati...
Ansible
Controlling
machine
node node node
report
report
json over ssh
Agentless!!!
Ansible Concepts
• Inventory: a list of hosts and host groups
• Ad-hoc commands: ansible all -a "/bin/echo hello"
• Playbo...
Ansible Code
hosts: all
#ntp service name defined in ntp.yml
vars_files: ntp.yml
tasks:
- name: Install ntp package
yum: nam...
Ansible Web UI
• Ansible Tower (commercial)
Ansible in a Nutshell
• Simple
• Lightweight
• Agentless (SSH)
• Windows support still immature.
• yaml DSL can be tricky ...
Salt
Since: 2011
Written in: Python
Developed by: SaltStack inc.
Configuration: yaml+jinja
Motto: Speed, scalability and fle...
Salt
master
minion minion minion
report
report
ZeroMq
Can also be masterless!
Salt Concepts
• Commands: salt '*' disk.usage
• Modules: control system resources and execute
commands. Written in Python ...
Salt Code
# Include :download:`map file <map.jinja>` of OS-specific package names and
# file paths. Values can be overridd...
Salt Web UI
• Halite: free, in pre-alpha
Salt in a Nutshell
• Fast
• Super-scalable
• Easily Extensible (renderers, returners, etc)
• Python API
• Push mode by def...
Summary
• Puppet: features, WebUI, maturity, ecosystem
• better for devs
• Chef: flexibility, Ruby
• better for devs
• Ansi...
Stop breaking your teeth!
vs.
Upcoming SlideShare
Loading in …5
×

Ninja, Choose Your Weapon!

917 views

Published on

Comparison Overview of the 4 Leading Weapons of Mass Configuration: Puppet vs. Chef vs. Ansible vs. Salt

Presented at vNess DevOps Conference.

Published in: Software
  • Be the first to comment

Ninja, Choose Your Weapon!

  1. 1. Ninja, choose your weapon! Puppet vs. Chef vs. Ansible vs. Salt
  2. 2. About me Ant(on) Weiss DevOps Evangelist&Enabler, CI/CD/ALM Expert ant.weiss@gmail.com - twitter: @antweiss http://otomato.wordpress.com
  3. 3. DevOps isn’t about Tools But they definitely help!
  4. 4. DevOps is all about Tools "We shape our tools. And then our tools shape us.” Marshall McLuhan
  5. 5. Weapons of Mass Configuration • Manage configuration of thousands of servers • Automation and orchestration • Infrastructure as Code
  6. 6. Tools vs. no Tools vs.
  7. 7. The Good Tool • One we are comfortable with • Flexible • Extendable • Scalable • Community-supported • Integrate-able
  8. 8. Puppet Since: 2005 Written in: Ruby Developed by: Puppetlabs Configuration: Puppet-specific declarative language (Ruby-based) or pure Ruby. Model-driven. Manages: > 10 mln nodes (acc. to Puppetlabs)
  9. 9. Puppet Puppet master agent agent agent XMLRPC over HTTPS report report report
  10. 10. Puppet Concepts Resources: files, services, packages, users… Manifests: Puppet programs Classes: collections of resource definitions Modules: classes + accompanying data Puppetforge.com: 3326 community modules
  11. 11. Puppet Features • Configuration Management • Automatic Discovery (MCollective) • Orchestration (MCollective) • Provisioning (w/Foreman or Razor)
  12. 12. Puppet Code: class ntp { case $operatingsystem { centos, redhat: { $service_name = 'ntpd' $conf_file = 'ntp.conf.el' } debian, ubuntu: { $service_name = 'ntp' $conf_file = 'ntp.conf.debian' } } package { 'ntp': ensure => installed, } file { 'ntp.conf': path => '/etc/ntp.conf', ensure => file, require => Package['ntp'], source => "/root/examples/answers/${conf_file}" } service { 'ntp': name => $service_name, ensure => running, enable => true, subscribe => File['ntp.conf'], } }
  13. 13. Puppet Web UI Options • Puppet Enterprise (commercial for > 10 nodes) • Foreman • PuppetBoard ( reporting only )
  14. 14. Puppet in a Nutshell • The Most Mature (of the four reviewed) • ‘Pull’ mode of operation, but push also supported • Enterprise Features • Largest Ecosystem (Foreman, PuppetBoard) • A Language of its Own • Less flexible • Easy to start with, gets complicated further along.
  15. 15. Chef Since: 2009 Written in: Ruby+Erlang Developed by: Chef ( formerly Opscode ) Configuration: pure Ruby DSL - procedural
  16. 16. Chef
  17. 17. Chef Concepts Resources: files, services, packages, users… Recipes: Chef programs Cookbooks: recipes + accompanying data Databags: global variables supermarket.chef.io: 2061 cookbooks
  18. 18. Chef Code case platform when "ubuntu","debian" default[:ntp][:service] = "ntp" when "redhat","centos","fedora","scientific" default[:ntp][:service] = "ntpd" end package "ntp" do action [:install] end template "/etc/ntp.conf" do source "ntp.conf.erb" variables( :ntp_server => "time.nist.gov" ) notifies :restart, "service[ntpd]" end service "ntpd" do action [:enable,:start] end
  19. 19. Chef Web UI Options • OpenSource WebUI - deprecated • Enterprise Chef - commercial, basic
  20. 20. Chef in a Nutshell • Flexible, powerful • Enterprise Features (HA, Analytics) • Pure Ruby DSL • Steep learning curve • Push feature still in beta
  21. 21. Ansible Since: 2012 Written in: Python Developed by: Ansible Works inc. Configuration: yaml+jinja Motto: Simple IT Automation
  22. 22. Ansible Controlling machine node node node report report json over ssh Agentless!!!
  23. 23. Ansible Concepts • Inventory: a list of hosts and host groups • Ad-hoc commands: ansible all -a "/bin/echo hello" • Playbooks: configuration scenarios • Modules: control system resources and execute commands. Can be written in any language! • Roles: playbook and accompanying data • ansible-galaxy.com: 3124 roles
  24. 24. Ansible Code hosts: all #ntp service name defined in ntp.yml vars_files: ntp.yml tasks: - name: Install ntp package yum: name=ntp state=latest sudo: yes - name: Starting ntp service service: name={{ ntp_service_name }} state=started sudo: yes
  25. 25. Ansible Web UI • Ansible Tower (commercial)
  26. 26. Ansible in a Nutshell • Simple • Lightweight • Agentless (SSH) • Windows support still immature. • yaml DSL can be tricky to use • Not the best performance. (Slow)
  27. 27. Salt Since: 2011 Written in: Python Developed by: SaltStack inc. Configuration: yaml+jinja Motto: Speed, scalability and flexibility
  28. 28. Salt master minion minion minion report report ZeroMq Can also be masterless!
  29. 29. Salt Concepts • Commands: salt '*' disk.usage • Modules: control system resources and execute commands. Written in Python or Cython. • States: configuration scenarios • Grains: facts about the managed nodes • Pillars: globally accessed data • Community State Trees & Modules: saltstarters.org
  30. 30. Salt Code # Include :download:`map file <map.jinja>` of OS-specific package names and # file paths. Values can be overridden using Pillar. {% from "ntp/map.jinja" import ntp with context %} ntp: pkg.installed: - name: {{ ntp.client }} {% set ntp_conf_src = salt['pillar.get']('ntp:ntp_conf') -%} {% if ntp_conf_src %} ntp_conf: file.managed: - name: {{ ntp.ntp_conf }} - template: jinja - source: {{ ntp_conf_src }} - require: - pkg: ntp {% endif %}
  31. 31. Salt Web UI • Halite: free, in pre-alpha
  32. 32. Salt in a Nutshell • Fast • Super-scalable • Easily Extensible (renderers, returners, etc) • Python API • Push mode by default • In Active Development • Documentation Needs Improvement
  33. 33. Summary • Puppet: features, WebUI, maturity, ecosystem • better for devs • Chef: flexibility, Ruby • better for devs • Ansible: simplicity, agentless, yaml, Python • better for ops • Salt: scalability, flexibility, robustness, Python • better for ops
  34. 34. Stop breaking your teeth! vs.

×