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

Docker in Production (Docker Austin March 2015)

Docker in Production (Docker Austin March 2015)

Josh Butts

March 05, 2015
Tweet

More Decks by Josh Butts

Other Decks in Technology

Transcript

  1. About  Me • VP  of  Engineering,  offers.com   • Austin

     PHP  Organizer   • NOT  A  DOCKER  EXPERT   • Play  competitive  Skee  Ball   •              github.com/jimbojsb                                  @jimbojsb 2
  2. About  Offers.com • We  help  people  save  money   •

    Launched  in  2009   • 100k+  line  PHP  app   • Millions  of  Uniques  /  Month   • 1  DevOps  engineer 3
  3. Production  Infrastructure  in  2011 6 • 3x  m1.large  PHP/Nginx  

    • 3x  m1.xlarge  MySQL   • 1x  m1.large  “worker”   • Route  53  DNS   • Cloudfront  CDN
  4. Production  Infrastructure  in  2013 • 5x  c3.large  PHP/Nginx   •

    3x  2XL  RDS  Mysql  Multi-­‐AZ   • 1x  m3.xlarge  “worker”   • 1x  m3.4XL  “mailer”   • Route53   • Cloudfront 7
  5. Why  Docker? • It’s  cool  and  trendy   • Optimize

     software/hardware  density   • Pink  sombrero  problem   • Transient  nature  of  AWS  resources   • We  like  the  bleeding  edge 9
  6. Some  Details • Dockerfiles  based  on  phusion/baseimage   • Runit

     /  multiprocess   • Little  to  no  Fleet  or  Etcd   • Chronos  for  scheduling   • Known-­‐port  service  discovery 12
  7. Issues  We’ve  Had • Fleet  and  Etcd  are  VERY  sensitive

     to  DNS   problems   • PHP  memory_limit  vs  Marathon  limits  /  cgroups   • Containers  that  need  persistence  (elastic   search)   • Sometimes  we  need  to  ssh  into  production 13
  8. What’s  Next • Docker  for  development  &  CI  (currently  

    vagrant)   • Increase  usage  of  Chronos   • True  auto-­‐scaling   • Improve  metrics  /  reporting 14
  9. Links • Mesosphere  Digital  Ocean  cluster  create  tool  https:// digitalocean.mesosphere.com

      • Sample  PHP  app  used  for  Marathon  demo
 https://github.com/jimbojsb/dockeraustin   • Quay.io  Enterprise  Docker  Registry
 https://quay.io/repository/jimbojsb/dockeraustin 16