Save 37% off PRO during our Black Friday Sale! »

12 months of Production Time with Docker

6e1b896f6c4807aa4223acc428c57760?s=47 Gerhard Lazu
September 12, 2014

12 months of Production Time with Docker

Docker is fast, deterministic, and delivers really well on promises, but it’s just a small piece of the puzzle. This talk is about the other missing pieces for a successful production environment run entirely in Docker containers, on dedicated hardware, with no PXE magic.

Talk given at the first Docker conference in London, Container Camp, 12 September 2014

http://container.camp/talks/12-months-of-production-time-with-docker/

6e1b896f6c4807aa4223acc428c57760?s=128

Gerhard Lazu

September 12, 2014
Tweet

Transcript

  1. 12 months of Production Time with

  2. Production Always raw hardware for best performance.

  3. Staging Raw hardware for quick feedback loops.

  4. Fast. Repeatable. Easy.

  5. Fast. Repeatable. Easy. But it only solves 1 problem well,

    as all real Unix tools do.
  6. [x] Gerhard [x] Platform

  7. [x] Gerhard [x] Platform

  8. WWGD? Does things as I would do them: in a

    shell, over SSH.
  9. Declarative nature Easy to follow & debug

  10. Thin abstractions Fast feedback

  11. Batteries included Point and... play!

  12. $ ./bin/p $ p $ p -t docker,registry $ p

    -t juicer $ p -t focus -l disco -vvv
  13. $ ./bin/p $ p $ p -t docker,registry $ p

    -t juicer $ p -t focus -l disco -vvv
  14. $ ./bin/p $ p $ p -t docker,registry $ p

    -t juicer $ p -t focus -l disco -vvv
  15. $ ./bin/p $ p $ p -t docker,registry $ p

    -t juicer $ p -t focus -l disco -vvv
  16. $ ./bin/p $ p $ p -t docker,registry $ p

    -t juicer $ p -t focus -l disco -vvv
  17. $ which gp > aliased to git push $ which

    d > aliased to docker $ which dr > aliased to docker run
  18. $ which gp > aliased to git push $ which

    d > aliased to docker $ which dr > aliased to docker run
  19. $ which gp > aliased to git push $ which

    d > aliased to docker $ which dr > aliased to docker run
  20. The Gerhard Platform Simple solutions to production Docker challenges

  21. $ which gp > aliased to git push $ which

    d > aliased to docker $ which dr > aliased to docker run
  22. Image management dr registry localhost:5000/nginx:1.6.1

  23. Service dependencies ansible-playbook runsv

  24. Container supervision dr --restart runsv

  25. Log management dr -v /mnt/log/nginx svlogd

  26. Raw network I/O dr --net host

  27. Raw disk I/O dr -v /mnt/mysql LVM... with snapshots o.O

  28. Service discovery dr -p 127.0.0.1:60000:3000 SO_REUSEPORT

  29. Service discovery dr -p 127.0.0.1:60000:3000 SO_REUSEPORT

  30. Firewall dr -p 127.0.0.1::3306 iptables & ferm

  31. Config templating dr -v /opt/nginx/conf pkill -HUP -f nginx.*master

  32. App runtimes localhost:5000/ruby:2.1.2 dr -v /mnt/[app]

  33. Monitoring dr --privileged New Relic & Linode Longview

  34. Sysadmin tools dr --privileged htop, ntop, iptraf, dstat, vnstat ...

  35. The Gerhard Platform Just how fast is it? Very.

  36. The Gerhard Platform Just how fast is it? Very

  37. 5 minutes 14.04 base provision

  38. 10 minutes Cold production setup

  39. 2.5 minutes Warm production setup

  40. 15 minutes Re-create production

  41. Thank you Docker For enabling my next generation Gerhard Platform

  42. Thank you Ansible For letting me learn and iterate quickly,

    even in production
  43. Perfect software is the one that you don't know well

    enough.
  44. gerhardlazu