Slide 1

Slide 1 text

Hello  Ansible adventures  in  infrastructure  automa4on   from  a  developer’s  perspec4ve Shared  by  Baraa  Basata  at  self.conference  2014  in  Detroit

Slide 2

Slide 2 text

“a  radically  simple
 IT  automa4on  pla;orm
 that  makes  your  applica4ons  and  systems
 easier  to  deploy”

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

700+  contributors “@ansible  gets  a  new  contributor  every  1.18  days”   -­‐  Michael  DeHaan,  3/28/2014

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

let’s  meet  Ansible write  a  “playbook”  to  deploy  a  PHP  web  app
 with  zero  manual  steps  

Slide 7

Slide 7 text

a  server  farm

Slide 8

Slide 8 text

let’s  automate!

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

agentless the  servers  don’t  even  know  that  Ansible  exists.   only  the  control  machine  has  Ansible  installed.

Slide 15

Slide 15 text

a  limited  syntax embrace  constraints.   this  is  different  from  wri4ng  code.   this  is  different  from  wri4ng  second-­‐class  automa4on  code.   dev  &  ops  can  share!

Slide 16

Slide 16 text

integra4ng  diverse   services

Slide 17

Slide 17 text

dynamic  inventory when  our  inventory  is  maintained  in  another  system   ! ansible-playbook -i farm site.yml -> ansible-playbook -i ec2.py site.yml

Slide 18

Slide 18 text

yum,  apt,  homebrew,   gem add,  remove,  or  upgrade  packages  using  your  package   manager  of  choice

Slide 19

Slide 19 text

git,  subversion,  hg deploy  soYware  from  a  source  control  repository

Slide 20

Slide 20 text

get_url download  files  from  a  given  URL  onto  the  remote  hosts

Slide 21

Slide 21 text

campfire,  hipchat,  slack,   newrelic_deployment send  no4fica4ons  to  one  of  these  (and  more)  services

Slide 22

Slide 22 text

uri interact  with  any  web  service,  e.g.  to  send  no4fica4ons  or   to  trigger  other  ac4vi4es

Slide 23

Slide 23 text

integra4ng  services   ! yum,  apt,  homebrew,  gem   git,  subversion,  hg   campfire,  hipchat,  slack,  newrelic_deployment   AWS,  Google  Compute  Engine,  and  many  more  

Slide 24

Slide 24 text

our  journey

Slide 25

Slide 25 text

where  we  started,   1  year  ago

Slide 26

Slide 26 text

the  journey  begins  with   con4nuous  integra4on  (CI)

Slide 27

Slide 27 text

building  the  first  cloud   environment

Slide 28

Slide 28 text

Packer   ! a  stock  machine  image   +  our  Ansible  playbooks  for  base  machine  configura4on   -­‐>  a  custom  base  machine  image

Slide 29

Slide 29 text

con4nuously  deploying   from  CI  to  the  cloud   environment

Slide 30

Slide 30 text

launching  the  second   cloud  environment

Slide 31

Slide 31 text

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*  

Slide 32

Slide 32 text

where  we  are  now

Slide 33

Slide 33 text

it’s  never  been  easier  to   start  automa4ng