Contenu connexe
Similaire à Zuehlke Camp 2017: Chef vs Ansible session (20)
Zuehlke Camp 2017: Chef vs Ansible session
- 2. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 2
Gemeinsamkeiten: Chef und Ansible
§ Beide sind Configuration Management Tools
§ Gleiche Konzepte (heissen nur anders ;-))
§ Beide bieten eine DSL zum Beschreiben des Zielzustands
§ Beide sind “idempotent”
§ Beide bieten Tools / Frameworks zum Testen und für’s Depenedency Management
§ Beide unterstützen Wiederverwendbarkeit
- 3. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 3
High-level Unterschiede
Chef
§ Ruby Ökosystem
§ Interne DSL in Ruby
§ Agent-based (chef-client)
§ Pull-based
§ Schlanker Kern
§ Funktioniert gut auf Windows
Worin unterscheiden sie sich dann?
Ansible
§ Python Ökosystem
§ Externe DSL in YAML (+ Jinja2)
§ Agent-less (SSH reicht aus)
§ Push-based
§ Fetter Kern
§ Eingeschränkter Windows Support
- 4. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 4
Terminologie Chef vs Ansible
§ Chef Cookbook vs Ansible Role
§ Chef Recipes vs Ansible Tasks
§ Chef Resource vs Ansible Module
§ Chef Attribute vs Ansible Vars
§ Chef ohai vs Ansible setup
§ Chef Supermarket vs. Ansible Galaxy
§ Chef Server vs Ansible Tower
See https://docs.ansible.com/ansible/glossary.html
See https://docs.chef.io/glossary.html
Eigentlich ist doch alles das gleiche, heisst nur anders!
- 5. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 5
Toolchain Chef vs Ansible
Chef Ökosystem (Ruby-based)
§ berkshelf - a dependency manager for
Chef cookbooks
§ foodcritic - a lint tool for Chef cookbooks
§ chefspec - unit testing for Chef cookbooks
§ serverspec - rspec based framework for
testing servers
§ test-kitchen - a test driver for orchestrating
and testing infrastructure
Für fast jedes Tool in Chef gibt es ein Äquivalent in Ansible
Ansible Ökosystem (Python-based)
§ ansible-galaxy - a dependency manager for
Ansible roles
§ ansible-lint - a lint tool for Ansible roles
§ (Lücke)
§ testinfra - a pytest based framework for
testing servers
§ molecule - a test driver for orchestrating
and testing infrastructure
- 7. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 7
Entwicklungsumgebung: Linus Kitchen v0.3
https://github.com/tknerr/linus-kitchen/releases
- 8. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 8
Entwicklungsumgebung: Linus Kitchen v0.3
1. Download the VMware VM image from the releases page:
https://github.com/tknerr/linus-kitchen/releases/tag/v0.3
2. Import VM to Vmware
3. Follow the instructions in the README on the Desktop
4. Start Hacking!
Note: if you have v0.2 already simply run: update-vm --pull
Getting Started
- 9. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 9
Demo Repository
Repository
https://github.com/tknerr/zcamp2017-demo-repo
Szenario
§ Minimalbeispiel für eine “Web Applikation”
§ Apache2 Installieren, vorgefertigte HTML Seite hinterlegen, das ganze Testen!
§ myapp_chef vs myapp_ansible
Chef vs Ansible am Beispiel
- 11. © Zühlke 2017#ZCamp2017 – Chef vs Ansible 31. Mai 2017 Folie 11
Discussion Time!
Berkshelf, Galaxy,
Testinfra,
Serverspec,…
DevOps, NoOps,
Blablabla
Vagrant, Chef,
Ansible, usw
Ruby vs Python
Und was ist jetzt
besser!?