Ansible

706 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
706
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
9
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Ansible

  1. 1. @tizianoperrucci Freelance software engineer with a passion in automation Working mostly for Startups often with Thursday, November 14, 13
  2. 2. Ansible A push model to avoid architectural overhead Thursday, November 14, 13
  3. 3. A tool that combines Ad hoc task execution Configuration management Multi-node software deployment Thursday, November 14, 13
  4. 4. Main characteristics Agentless: manages nodes over SSH Modular: shipped with a module library Uses YAML to describe systems Requires only Python ≥ 2.4 Thursday, November 14, 13
  5. 5. Tools’ diversity Thursday, November 14, 13
  6. 6. Pros for not having Agents Zero bootstrapping Avoid server and agent compatibility problems Avoid ‘thundering herd’ No daemons -> Improved resource utilization Thursday, November 14, 13
  7. 7. Security Ansible has a very low attack surface Just relying on SSH Log in remotely as any user account Credential segregation Thursday, November 14, 13
  8. 8. hosts: [webservers] vm1 vm2 vm3 site.yml: --- hosts: webservers user: tiziano tasks: - name: What is it? command: uname -a $ ansible-playbook -i hosts site.yml Thursday, November 14, 13
  9. 9. Ansible Modules Programs that can control system resources or execute system commands Modules are packaged with arguments and transferred to the host machine Ansible executes and removes them in one action The result is sent back in JSON Thursday, November 14, 13
  10. 10. What else Ansible offers? Tasks Conditionals Handlers Variables Templates ... Thursday, November 14, 13
  11. 11. Ansible Roles roles/ common/ tasks/ main.yml handlers/ main.yml templates/ ntp.conf.j2 files/ bar.txt foo.sh vars/ main.yml Thursday, November 14, 13 # this hierarchy represents a "role" # # <-- tasks file can include smaller files if warranted # # <-- handlers file # <-- files for use with the template resource # <------- templates end in .j2 # # <-- files for use with the copy resource # <-- script files for use with the script resource # # <-- variables associated with this role
  12. 12. Continuous Deployment Release early, release often Shorter feedback cycles Thursday, November 14, 13
  13. 13. The Continuous Integration system will invoke an Ansible playbook upon a successful build. Thursday, November 14, 13
  14. 14. Prudentia ® CLI for deployment based mostly on Ansible Bring simplicity and prudence when dealing with multiple IaaS providers Thursday, November 14, 13
  15. 15. Thanks! All the resources used in this presentation are available here: https:/ /github.com/TizianoPerrucci/devops-ansible Thursday, November 14, 13

×