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)

44a352b02a91a9e841da7533bc5d9b8e?s=128

Josh Butts

March 05, 2015
Tweet

Transcript

  1. Docker  in  Production Josh Butts VP of Engineering

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

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

    Launched  in  2009   • 100k+  line  PHP  app   • Millions  of  Uniques  /  Month   • 1  DevOps  engineer 3
  4. A  BRIEF  HISTORY Before  we  start… 4

  5. Production  Infrastructure  in  2009 5

  6. Production  Infrastructure  in  2011 6 • 3x  m1.large  PHP/Nginx  

    • 3x  m1.xlarge  MySQL   • 1x  m1.large  “worker”   • Route  53  DNS   • Cloudfront  CDN
  7. 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
  8. DOCKER And  then  we  moved  to 8

  9. 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
  10. Our  Stack 10

  11. Pretty  Pictures 11

  12. Some  Details • Dockerfiles  based  on  phusion/baseimage   • Runit

     /  multiprocess   • Little  to  no  Fleet  or  Etcd   • Chronos  for  scheduling   • Known-­‐port  service  discovery 12
  13. 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
  14. What’s  Next • Docker  for  development  &  CI  (currently  

    vagrant)   • Increase  usage  of  Chronos   • True  auto-­‐scaling   • Improve  metrics  /  reporting 14
  15. QUESTIONS? Anyone  have 15

  16. 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