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

Vagrant is so last year why aren't you using docker yet?

Tim Haak
October 04, 2014

Vagrant is so last year why aren't you using docker yet?

Vagrant is so last year why aren't you using docker yet?

A look at what docker is and some of the problems it solves. Basically why are people talking about it so much at the moment.

Tim Haak

October 04, 2014
Tweet

Other Decks in Technology

Transcript

  1. or   Vagrant  is  so  last  year      

    Why  aren't  you  using   docker  yet?  
  2. Who  am  I       Tim  Haak   @>m_haak

      >[email protected]   hAps://github.com/>mhaak   phpsa2014_docker_talk     Company:  Afrihost   What  I  do:     Bit  of  everything  from  server  to  frontend  
  3. In  simple  terms  it’s   a  easy  way  to  

    create   containerized  Linux   based  applica>ons    
  4. Simple  deployment   •  MaAer  of  seconds  to  start  and

     image     – Same  speed  as  star>ng  the  programs  inside  the   image   •  Central  repository  for  images   – Similar  to  github   – Public,  Private  and  self  hosted  available  
  5. Simple  deployment   •  Can  start  mul>ple  copies  quickly  

    •  Simple  rollback     – With  in  reason   •  Oh  and  versioning  
  6. Repeatability   •  You  can  test  the  exact  image  that

     you  will  run  on  the   server   •  Allows  for  simpler  tes>ng   •  There  is  no  difference  between  tes>ng  and  dev.   •  It  should  remove  but  it  worked  on  my  pc  excuse   •  Documented  install  steps     – Stops  the  I  can’t  remember  what’s  installed  on   this  server  
  7. Simpler  to  scale   •  You  can  simply  move  mul>ple

     containers  on   one  server  to  many   •  If  you  follow  best  prac>ces   – This  should  be  obvious  but  we  all  know  how  it   goes   •  Allows  you  to  run  mul>ple  flavors  and   versions  of  Linux  on  one  server.    
  8. More  moving  parts   •  Can  add  complica>on  compared  to

     running  a   single  server   •  But  more  than  makes  up  for  it  as  you  scale   •  Not  as  simple  as  just  logging  into  a  server  to   check  how  its  working  
  9. Not  for  everything   •  Would  not  use  it  for

     larger  cri>cal  DB’s   – You  generally  want  to  be  a  close  to  the  metal  as   possible   •  Though  great  for  you  local  development  DB   – Though  needs  to  be  smaller  than  10G   – There  are  workarounds  for  this.    
  10. Biggest  problem   •  It  works  slightly  differently  and  people

     will   have  to  learn  something  new.   •  Worth  it  once  all  the  pieces  are  in  place.  
  11. Install  Docker   •  Get  Ubuntu  12.04/14.04   – Or  flavor

     of  choice   •  Follow  how  to  on  dockers  site   – hAps://docs.docker.com/   •  Done   – Very  good  documenta>on  
  12. But  I'm  on  Mac  or  Windows   • Vagrant   – hAp://www.vagrantup.com/

      • Boot2Docker   – hAps://github.com/boot2docker  
  13. Its  great  to  get  a  basic  system  up   and

     running.   But  that’s  where  you  should  stop.  
  14. Etcd   •  Simple,  curl-­‐able  API  (HTTP  +  JSON)  

    •  Op>onal  SSL  client  cert  authen>ca>on   •  Benchmarked  1000s  of  writes/s  per  instance   •  Properly  distributed  using  Rah  protocol  
  15. Etcd   •  Keys  support  TTL   •  Atomic  test

     and  set   •  Easily  listen  for  changes  to  a  prefix  via  HTTP   long-­‐polling  
  16. Some  >ps   •  Separate  your  programs   •  Don't

     repeat  step  build  a  base  image   •  Store  persistent  data  externally   •  Build  containers  to  be  thrown  away   •  Put  all  the  steps  in  the  Docker  file   •  Use  env  variables