Ansible PyWAW

1,190 views

Published on

Another lightning talk about Ansible, delivered at PyWaw

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Ansible PyWAW

  1. 1. | Ansible @ PyWaw Ansible Grzegorz Nosek PyWaw 21.01.2013
  2. 2. | Ansible @ PyWaw Ansible Grzegorz Nosek PyWaw 21.01.2013
  3. 3. | Ansible @ PyWaw Ansible fictitious machine capable of instantaneous or superluminal communication – http://en.wikipedia.org/wiki/Ansible
  4. 4. | Ansible @ PyWaw Ansible the easiest way to deploy, manage, and orchestrate computer systems you've ever seen – http://ansible.cc/
  5. 5. | Ansible @ PyWaw www1 ssh www2 master db1 db2
  6. 6. | Ansible @ PyWaw # pip install ansible # mkdir /etc/ansible # cat > /etc/ansible/hosts << EOF master master [www] www1 www2 [db] db1 db2 EOF
  7. 7. | Ansible @ PyWaw www1 www2 . python (2.6) . authorized_keys db1 db2
  8. 8. | Ansible @ PyWaw mass ssh ansible all -m ping ansible www -m service -a „name=nginx state=restarted” ansible db1 -m command -a „killall pgdump”
  9. 9. | Ansible @ PyWaw deploy (fabric) ansible-playbook deploy.yml --- hosts: www actions: - action: git repo=... dest=... notify: restart gunicorn handlers: - name: restart gunicorn action: service name=gunicorn state=restarted - hosts: db actions: - ...
  10. 10. | Ansible @ PyWaw deploy (fabric) + declarative + idempotent wget ./configure && make make install template src=... dest=... service foo state=started
  11. 11. | Ansible @ PyWaw config mgmt (puppet) --- hosts: www actions: - action: apt pkg=$item with_items: - nginx - python-virtualenv - action: template src=... dest=... - action: command foo creates=/etc/bar
  12. 12. | Ansible @ PyWaw config mgmt (puppet) + imperative + non-idempotent + cross-machine
  13. 13. | Ansible @ PyWaw provisioning . EC2 . VMWare . VirtualBox . HP iLO . ...
  14. 14. | Ansible @ PyWaw Ansible modules . command . git . fetch . template . service . +∞
  15. 15. „ | Ansible @ PyWaw Boże, żebyśmy my to mieli w $(job-1) – Marcin, nasz nowy admin :)
  16. 16. | Ansible @ PyWaw http://ansible.cc/ QA?

×