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

Docker Meetup Tokyo #4 - Docker at Wantedly

Docker Meetup Tokyo #4 - Docker at Wantedly

2015/01/17 Docker Meetup Tokyo 第 4 回での発表資料。
Wantedly が Docker の本番運用から学んだことについて発表しました。
スライドだけだと分かりづらいかもしれません。
以下発表時の動画です。
https://www.youtube.com/watch?v=ia5w5UBic2E

Seigo Uchida

January 19, 2015
Tweet

More Decks by Seigo Uchida

Other Decks in Programming

Transcript

  1. Docker
    @ ANTELDY
    W

    View full-size slide

  2. ಺ా ੣ޛ

    View full-size slide

  3. Wantedly ʹ͍ͭͯ

    View full-size slide

  4. ݟ͚ͭΔ৔ॴ
    Λ࣋ͬͯऔΓ૊Ή࢓ࣄΛ
    ৘೤

    View full-size slide

  5. 150,000 Ϣʔβʔ!
    5,000 ࣾ!
    30 ਓ͘Β͍
    2015/01/17ݱࡏ

    View full-size slide

  6. 2 (2) Rails!
    4 iOS!
    1 Android!
    1 (1) Infrastructure
    2015/01/17ݱࡏ

    View full-size slide

  7. ͔ΒֶΜͩ͜ͱ
    Docker
    in production

    View full-size slide

  8. heroku
    2011 Ն ~ 2014 Ն

    View full-size slide

  9. web!
    worker!
    scheduler!
    on-off

    View full-size slide

  10. ଞ͸શ෦ AWS

    View full-size slide

  11. Search!
    Database!
    Storage!
    Image distribute!
    etc…

    View full-size slide

  12. Chef Ͱ؅ཧ

    View full-size slide

  13. NewRelic!
    Logentries!
    Wercker!
    DNSimple!
    etc…

    View full-size slide

  14. heroku࣌୅

    View full-size slide

  15. heroku࣌୅
    σϓϩΠ଎͍ʢ2෼ʣ
    εέʔϧ଎͍ʢ1෼ʣ
    Dyno ͷૢ࡞؆୯

    View full-size slide

  16. ౦ژϦʔδϣϯ͕ͳ͍
    ͚ͩͲ…

    View full-size slide

  17. Docker
    2014 Ն ~

    View full-size slide

  18. ͳ͍ͨ͘͠
    ౦ւ؛΁ߦͬͯؼͬͯΛ

    View full-size slide

  19. AWS Ҡߦ + Docker

    View full-size slide

  20. Rails Λ heroku !
    ͔Β Docker ΁

    View full-size slide

  21. ৭ʑࢼͯ͠:
    Elastic beanstalk
    Centurion
    Chef with Docker

    View full-size slide

  22. ͜Εʹͨ͠:
    Capistrano3
    Chef
    Packer

    View full-size slide

  23. Dockerϗετ
    Ubuntu 14.04LTS

    View full-size slide

  24. DockerϨδετϦ
    Private Registry (S3)

    View full-size slide

  25. DockerϨδετϦ
    ೝূճආͱՄ༻ੑͷͨΊ!
    શϗετʹ഑උ

    View full-size slide

  26. Capistrano Ͱ
    “ελςΟοΫ”!
    ΦʔέετϨʔγϣϯ

    View full-size slide

  27. σϓϩΠ!
    ίϯςφͷૢ࡞!
    ϗετͷૢ࡞!
    etc…

    View full-size slide

  28. σϓϩΠ
    Dockerfile ͰϏϧυ
    Nginx Ͱ৽چίϯςφ੾Γସ͑

    View full-size slide

  29. Chef ͱ Packer Ͱ
    ϏϧυʢҰ෦ʣ

    View full-size slide

  30. DockerϗετAMI!
    “base” Πϝʔδ!
    “ruby” Πϝʔδ!
    etc…

    View full-size slide

  31. Datadog Ͱ
    ϞχλϦϯά

    View full-size slide

  32. Logentries gemͰ
    ϩάऩू

    View full-size slide

  33. DockerϏϧυ
    Dockerfileͦͷ··࢖͓͏

    View full-size slide

  34. Chef+Packer ͰϏϧυ!
    →Ωϟογϡཉ͍͠!
    →ඞཁͳπʔϧ͕ଟ͍

    View full-size slide

  35. Dockerfile ಈతੜ੒!
    →ཧղͮ͠Β͍

    View full-size slide

  36. DockerfileͰॻ͘ͷ͸ਏ͍!
    ෳࡶͳΞϓϦέʔγϣϯ!
    →͓ͦΒ͘ίϯςφʹ޲͔ͳ͍!
    →VM ޲͖͔΋

    View full-size slide

  37. γϯϓϧ͞ΛอͭͨΊ
    ͷ੍໿Λड͚ೖΕΔ

    View full-size slide

  38. Dockerϗετ
    ϗετ͸ܰྔʹ͓ͯ͘͠

    View full-size slide

  39. ϗετ͸AMIম͍ͯΔ!
    →Կ͔ม͍͑ͨ!
    →AMIম͘!
    →docker pull ΍Γ௚͠!
    →ϗετ͝ͱ blue-green!
    →݁ߏେม

    View full-size slide

  40. ϗετʹ৭ʑೖΕͯΔͱ!
    ୯७ʹ؅ཧ୆਺ഒ૿͢Δ

    View full-size slide

  41. ڈ೥৭ʑେมͩͬͨ…

    View full-size slide

  42. ίϯςφͷ࢖͍ํ
    heroku ͔Βֶ΅͏

    View full-size slide

  43. heroku ࢖ͬͯαʔϏε
    ӡ༻ͨ͠ܦݧ͕ྑ͔ͬͨ

    View full-size slide

  44. one-off ίϯςφͱ͍͏࢖͍ํ!
    ৗʹ“ࣺͯΒΕΔ”Α͏ʹ͓ͯ͘͠!
    ઃఆ͸؀ڥม਺Ͱ౉͢!
    ίϯςφΛࡌͤΔج൫ʹඞཁͳ΋ͷ!
    etc…

    View full-size slide

  45. ͦͷଞ
    1 ίϯςφ 1 ϓϩηε!
    ϩά͸ stdout/stderr ΁!
    ϞχλϦϯάɾϩάऩू͸ઐ༻ίϯςφͰ!
    restart Φϓγϣϯ࢖͏!
    ग़དྷΔ͚ͩશͯίϯςφͰ΍Δ!
    Private Registry Φεεϝ͠ͳ͍!
    etc…

    View full-size slide

  46. CoreOS
    2015 ౙ ~ ?

    View full-size slide

  47. ϗετΛܰྔʹ͍ͨ͠

    View full-size slide

  48. capistrano͸୆਺૿͑Δͱ஗͍

    View full-size slide

  49. Rails ίϯςφҎ֎΋ࡌ͍ͤͨ
    etc…

    View full-size slide

  50. CoreOS ಋೖʹ
    νϟϨϯδத

    View full-size slide

  51. WebPରԠը૾αʔόʔ!
    ίϯςφͷςετ
    nginx-image-server

    View full-size slide

  52. etcd / fleet Λϕʔεʹͨ͠!
    ΦʔέετϨʔγϣϯπʔϧ
    kujiraʢࣾ಺πʔϧ։ൃதʣ

    View full-size slide

  53. ֶΜͩ͜ͱ
    ࣗಈΞοϓσʔτ͸·ͩෆ҆ఆ, off ͕ແ೉!
    fleet ͸Ϧιʔε؅ཧ͠ͳ͍ͷͰμΠφϛο
    ΫΦʔέετϨʔγϣϯ͸஫ҙ͢΂͖!
    k8s ͷ Pod ͷ֓೦͕ඞཁʹͳΔཧ༝!
    cloud-config ͸࠷খݶʹͯ͠ fleet ࢖͏!
    etc…

    View full-size slide

  54. ֶΜͰΔ͜ͱ
    ίϯςφΦʔέετϨʔγϣϯ!
    fleet ʹ͓͚ΔϦιʔε؅ཧ!
    etcd ͷΫϥελӡ༻ϊ΢ϋ΢!
    systemd ͷৄ͍͠࢖͍ํ!
    etc…

    View full-size slide

  55. ·ͱΊ
    ໎ͬͨΒγϯϓϧͳํʂ!
    Docker & CoreOS ָ͍͠ʂ!
    ҙݟަ׵͠·͠ΐ͏ʂ

    View full-size slide