DockerでPaaSをつくる #ylug_111

DockerでPaaSをつくる #ylug_111

Ecb3acc2d246962361a4f8b3f7a6dd12?s=128

taichi nakashima

May 30, 2014
Tweet

Transcript

  1. Build your own PaaS by Docker

  2. I’m Taichi Nakashima Twitter ID is @deeeet

  3. http://deeeet.com/writing

  4. DockerΛ࢖ͬͯOSSͳPaaSΛߏங͢Δ ϓϩδΣΫτͷ঺հ

  5. Why PaaS by ?

  6. ࣮ߦ؀ڥ: Dyno (base on LXC) Ϗϧυ: Slug compiler (buidpack) ىಈ:

    Procfile $ git push heroku master
  7. • ContainerܕԾ૝Խ͕؆୯ʹͳͬͨ • ʢ Buildpack͕ެ։͞Ε͍ͯΔʣ Why ?

  8. Ruby https://github.com/heroku/heroku-buildpack-ruby Node.js https://github.com/heroku/heroku-buildpack-nodejs Clojure https://github.com/heroku/heroku-buildpack-clojure Python https://github.com/heroku/heroku-buildpack-python Java https://github.com/heroku/heroku-buildpack-java

    Gradle https://github.com/heroku/heroku-buildpack-gradle Scala https://github.com/heroku/heroku-buildpack-scala Play https://github.com/heroku/heroku-buildpack-play Buildpack
  9. Flynn Building https://github.com/CenturyLinkLabs/building https://flynn.io/ dokku https://github.com/progrium/dokku

  10. dokku Docker ʹΑΔmini-Heroku 100ߦͷBashͰॻ͔ΕͨγϯϓϧͳPaaS࣮૷

  11. ࣮ߦ؀ڥ: Dyno (base on LXC) Ϗϧυ: Slug compiler (buidpack) ىಈ:

    Procfile $ git push heroku master ࣮ߦ؀ڥ: Docker (progrium/buildstep) Ϗϧυ: builderεΫϦϓτ (buidpack) ىಈ: Procfile $ git push dokku master dokku
  12. Building buildpackΛ࢖ͬͨDocker Containerͷ࡞੒ ΧδϡΞϧʹHeroku on DockerΛ࣮ݱ͢Δ

  13. ࣮ߦ؀ڥ: Docker (ctlc/buildstep) Ϗϧυ: builderεΫϦϓτ (buidpack) ىಈ: Procfile $ building

    -p 3000 tcnksm/myapp ࣮ߦ؀ڥ: Docker (progrium/buildstep) Ϗϧυ: builderεΫϦϓτ (buidpack) ىಈ: Procfile $ git push dokku master Building dokku
  14. Prepare $ gem install building Building

  15. Run $ cd your-application $ building -p 3000 tcnksm/myapp 1.

    ઐ༻ͷDockerfileͷੜ੒ 2. ImageͷϏϧυ 3. Containerͷىಈ Building
  16. Dockerfile FROM ctlc/buildstep ! ADD . /app #1)ΞϓϦέʔγϣϯͷ௥Ճ RUN /build/builder

    #2)ΞϓϦέʔγϣϯͷ൑ผ/Ϗϧυ CMD /start web #3) Procfileʹج͖ͮΞϓϦέʔγϣϯͷىಈ
  17. ++

  18. Flynn Next generation open source Platform as a Service (PaaS)

  19. • 12 factor AppͷΑ͏ͳαʔϏεΛ࡞Δ • 2ͭͷlayerͰߏ੒͞ΕΔ • CoreOSͷetcdʹΑΔαʔϏεσΟεΧόϦ૚ (layer0) •

    HerokuͷΑ͏ͳΞϓϦέʔγϣϯͷσϓϩΠ/Ϗϧυ૚ (layer1) • Herokuͷ؆ศ͞ͱEC2ͷࣗ༝౓Λ݉Ͷඋ͑Δ Flynn
  20. DockerΛ࢖ͬͯOSSͳPaaSΛߏங͢Δ ϓϩδΣΫτͷ঺հ Conclusion

  21. Reference • Inside Dokku in 5 minutes • http://banyan.me/slides/20140116/slides.html •

    The Start of the Age of Flynn • http://progrium.com/blog/2014/02/06/the-start-of-the-age-of-flynn/ • Flynn vs. Deis: The Tale of Two Docker Micro-PaaS • http://www.centurylinklabs.com/flynn-vs-deis-the-tale-of-two-docker-micro-paas-technologies/