Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Orchestration with Ansible at Fedora Project
Aditya Patawari
Fedora Ambassador and Contributor to Fedora Infra
Cloud and I...
Topics
Challenges faced by a System Administrator
Why scripts fail to scale
Ansible to the Rescue!
Ansible vs Puppet (or C...
Challenges Faced By A System Administrator
New servers. New applications. Updates.
Is it a cloud? Is it a colo? Is it a hy...
Why Scripts Fail To Scale
Looks Dirty, specially when exceed 1000 lines (50 for perl)
Code repetition multitude of times
H...
Ansible to the Rescue!
YAML awesomeness
OpenSSH as transport
Parallel-ordered execution
No agent required on servers!
Adit...
Ansible vs Puppet (or Chef)
No agent requirement
Based on Python, can run on minimalistic systems like Xen
YAML is lot eas...
Ansible Installation And Configuration
yum, apt, pip
If you can ssh, you can run Ansible
Run ad-hoc or scripted commands
In...
Inventory file
$ cat /etc/ansible/hosts
[webservers]
web1.example.com
web2.example.com
[databases]
db1.example.com
db2.exam...
Ad-Hoc Stuff 1
$ ansible webservers -m ping
web1.example.com | success >> {
"changed": false,
"ping": "pong"
}
web2.example...
Ad-Hoc Stuff 2
$ ansible all -m command -a ’echo hello’
web1.example.com | success | rc=0 >>
hello
web2.example.com | succe...
Scripted Stuff
$ cat sample_playbook.yml
- name: that awesome service
hosts: databases
tasks:
- name: put config
copy: src=...
No Agent = True Decentralization
Anyone with right authorization can execute
No more ”Damn! Orchestration server went down...
Ansible @ Fedora Infra
Creating from scratch = easy-peasy, moving from Puppet =
”Kill me now!”
Focus on idempotent playboo...
Contribute @ Fedora Infra
Fedora = Bleeding Edge, leading by example
Help us port Puppet modules to Ansible
Easyfix modules...
Questions?
Now is your chance :)
Aditya Patawari Orchestration with Ansible at Fedora Project
Prochain SlideShare
Chargement dans…5
×

Orchestration with Ansible at Fedora Project

4 592 vues

Publié le

Publié dans : Technologie

Orchestration with Ansible at Fedora Project

  1. 1. Orchestration with Ansible at Fedora Project Aditya Patawari Fedora Ambassador and Contributor to Fedora Infra Cloud and Infra Engineer at BrowserStack.com aditya@adityapatawari.com adimania on freenode irc http://blog.adityapatawati.com February 24, 2014 Aditya Patawari Orchestration with Ansible at Fedora Project
  2. 2. Topics Challenges faced by a System Administrator Why scripts fail to scale Ansible to the Rescue! Ansible vs Puppet (or Chef) Ad-Hoc Stuff Scripted Stuff No Agent = True Decentralization Ansible @ Fedora Infra Contribute @ Fedora Infra Aditya Patawari Orchestration with Ansible at Fedora Project
  3. 3. Challenges Faced By A System Administrator New servers. New applications. Updates. Is it a cloud? Is it a colo? Is it a hybrid? Initial Configuration. Management. Replication. New joinees. People leaving. Read Again from first bullet. Essentially ”SyaAd Loop” Aditya Patawari Orchestration with Ansible at Fedora Project
  4. 4. Why Scripts Fail To Scale Looks Dirty, specially when exceed 1000 lines (50 for perl) Code repetition multitude of times Hard to remember the order of execution Do you like to Document? Aditya Patawari Orchestration with Ansible at Fedora Project
  5. 5. Ansible to the Rescue! YAML awesomeness OpenSSH as transport Parallel-ordered execution No agent required on servers! Aditya Patawari Orchestration with Ansible at Fedora Project
  6. 6. Ansible vs Puppet (or Chef) No agent requirement Based on Python, can run on minimalistic systems like Xen YAML is lot easier to read Derived from my experience with Puppet, criticism welcomed Aditya Patawari Orchestration with Ansible at Fedora Project
  7. 7. Ansible Installation And Configuration yum, apt, pip If you can ssh, you can run Ansible Run ad-hoc or scripted commands Inventory file: hosts Aditya Patawari Orchestration with Ansible at Fedora Project
  8. 8. Inventory file $ cat /etc/ansible/hosts [webservers] web1.example.com web2.example.com [databases] db1.example.com db2.example.com [smtp] web1.example.com Aditya Patawari Orchestration with Ansible at Fedora Project
  9. 9. Ad-Hoc Stuff 1 $ ansible webservers -m ping web1.example.com | success >> { "changed": false, "ping": "pong" } web2.example.com | success >> { "changed": false, "ping": "pong" } Aditya Patawari Orchestration with Ansible at Fedora Project
  10. 10. Ad-Hoc Stuff 2 $ ansible all -m command -a ’echo hello’ web1.example.com | success | rc=0 >> hello web2.example.com | success | rc=0 >> hello db1.example.com | success | rc=0 >> hello db2.example.com | success | rc=0 >> hello Aditya Patawari Orchestration with Ansible at Fedora Project
  11. 11. Scripted Stuff $ cat sample_playbook.yml - name: that awesome service hosts: databases tasks: - name: put config copy: src=config/my.conf dest=/etc/mysql/my.conf notify: - restart MySQL handlers: - name: restart MySQL command: service mysqld restart Aditya Patawari Orchestration with Ansible at Fedora Project
  12. 12. No Agent = True Decentralization Anyone with right authorization can execute No more ”Damn! Orchestration server went down :(” One less server to manage Works from anywhere, anytime Aditya Patawari Orchestration with Ansible at Fedora Project
  13. 13. Ansible @ Fedora Infra Creating from scratch = easy-peasy, moving from Puppet = ”Kill me now!” Focus on idempotent playbooks Turbo charged with Accelerate mode Learn what not to do Aditya Patawari Orchestration with Ansible at Fedora Project
  14. 14. Contribute @ Fedora Infra Fedora = Bleeding Edge, leading by example Help us port Puppet modules to Ansible Easyfix modules for beginners Lots of helpful people on IRC and mailing list. Talk to us at #fedora-admin on IRC Aditya Patawari Orchestration with Ansible at Fedora Project
  15. 15. Questions? Now is your chance :) Aditya Patawari Orchestration with Ansible at Fedora Project

×