Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hello Ansible: adventures in infrastructure aut...

Hello Ansible: adventures in infrastructure automation from a developer’s perspective

Shared at self.conference 2014 in Detroit (http://selfconference.org)

The worked example is at: https://github.com/bbasata/hello-ansible

Baraa Basata

May 30, 2014
Tweet

Other Decks in Programming

Transcript

  1. Hello  Ansible adventures  in  infrastructure  automa4on   from  a  developer’s

     perspec4ve Shared  by  Baraa  Basata  at  self.conference  2014  in  Detroit
  2. write  a  “playbook”  to  deploy  a  PHP  web  app
 with

     zero  manual  steps   ! see  how  Ansible  helps  you  to  integrate  with  diverse  services
 share  our  automa4on  journey-­‐in-­‐progress
 with  using  Amazon  Web  Services there  are  good  tutorials  out  there.  this  is  more  of  a  show-­‐and-­‐tell.
  3. agentless the  servers  don’t  even  know  that  Ansible  exists.  

    only  the  control  machine  has  Ansible  installed.
  4. a  limited  syntax embrace  constraints.   this  is  different  from

     wri4ng  code.   this  is  different  from  wri4ng  second-­‐class  automa4on  code.   dev  &  ops  can  share!
  5. dynamic  inventory when  our  inventory  is  maintained  in  another  system

      ! ansible-playbook -i farm site.yml -> ansible-playbook -i ec2.py site.yml
  6. yum,  apt,  homebrew,   gem add,  remove,  or  upgrade  packages

     using  your  package   manager  of  choice
  7. integra4ng  services   ! yum,  apt,  homebrew,  gem   git,

     subversion,  hg   campfire,  hipchat,  slack,  newrelic_deployment   AWS,  Google  Compute  Engine,  and  many  more  
  8. Packer   ! a  stock  machine  image   +  our

     Ansible  playbooks  for  base  machine  configura4on   -­‐>  a  custom  base  machine  image
  9. CloudForma4on   ! JSON  descrip4on  of  all  AWS  resources  that

     make  up  an   environment   +  our  custom  machine  images  (build  with  Ansible+Packer)   +  our  Ansible  playbooks  to  deploy  the  applica4on   -­‐>  launch  a  new  environment  with  one  click*