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

Docker, Get used to it !

33f4da946e4712d9aac7ea915fdc71e4?s=47 Julien Vey
December 03, 2013

Docker, Get used to it !

A presentation of Docker use-cases

33f4da946e4712d9aac7ea915fdc71e4?s=128

Julien Vey

December 03, 2013
Tweet

Transcript

  1. Get used to it !

  2. Julien Vey @julienvey

  3. Pierre Padrixe @undefd

  4. None
  5. What is Docker ?

  6. What is Docker ?

  7. When can I use Docker ?

  8. Sandbox

  9. $ ./install-XXX.sh !

  10. $ ./install-XXX.sh Error during install ! …

  11. $ ./install-XXX.sh Error during install ! … $ ./uninstall-XXX.sh !

  12. $ ./install-XXX.sh Error during install ! … $ ./uninstall-XXX.sh Could

    not remove file xxx !
  13. $ ./install-XXX.sh Error during install ! … $ ./uninstall-XXX.sh Could

    not remove file xxx ! ! FAIL !
  14. Please Docker, help me !

  15. $ docker run $ ./install-XXX.sh Error during install !

  16. $ docker run $ ./install-XXX.sh Error during install ! Try

    Again !
  17. $ docker run $ ./install-XXX.sh Error during install ! Try

    Again ! $ docker run $ echo "Some conf" > XXX.cfg $ ./install-XXX.sh Success !
  18. Repeatability

  19. $ ./myscript.sh !

  20. $ ./myscript.sh $ ./myotherscript.sh !

  21. $ ./myscript.sh $ ./myotherscript.sh $ rm -rf myscriptdir !

  22. $ ./myscript.sh $ ./myotherscript.sh $ rm -rf myscriptdir ! OOPS

    !
  23. Please Docker, help me !

  24. RUN ./myscript.sh

  25. RUN ./myscript.sh RUN ./myotherscript.sh

  26. RUN ./myscript.sh RUN rm -rf myscriptdir RUN ./myotherscript.sh

  27. RUN ./myscript.sh RUN rm -rf myscriptdir RUN ./myotherscript.sh OOPS ?

  28. RUN ./myscript.sh RUN rm -rf myscriptdir RUN ./myotherscript.sh $ docker

    commit $id me/snap $ docker commit $id me/snap $ docker run me/snap
  29. Setup your Development environment

  30. A development Environment Today

  31. Tomcat Vert.x NodeJS Apache PHP Mongo

  32. $ install $ install $ install $ install $ install

    $ install Tomcat Vert.x NodeJS Apache PHP Mongo
  33. Tomcat Vert.x NodeJS Apache PHP Mongo $ configure $ configure

    $ configure $ configure $ configure $ configure
  34. Do this for each Developer $ configure $ configure $

    configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure $ configure
  35. Too Many Steps !

  36. Please Docker, help me !

  37. Tomcat Vert.x NodeJS Apache PHP Mongo $ configure $ configure

    $ configure $ configure $ configure $ configure Configure a Container Once
  38. just run it for each developer $ docker run $

    configure $ configure $ configure $ configure $ configure $ configure $ docker run $ configure $ configure $ configure $ configure $ configure $ configure $ docker run $ configure $ configure $ configure $ configure $ configure $ configure
  39. On any (Linux) environment $ docker run $ configure $

    configure $ configure $ configure $ configure $ configure $ docker run $ configure $ configure $ configure $ configure $ configure $ configure $ docker run $ configure $ configure $ configure $ configure $ configure $ configure
  40. Or split by services $ docker run NodeJS $ configure

    Apache $ configure $ docker run MongoDB $ configure $ docker run
  41. Or split by services $ docker run NodeJS $ configure

    Apache $ configure $ docker run MongoDB $ configure $ docker run and run ONLY what you need
  42. PaaS Platform-as-a-Service

  43. a PaaS deploys your application

  44. your application needs Isolation

  45. your application needs Fast Startup Time

  46. Lucky you !

  47. Docker is isolated

  48. Docker is Fast

  49. PaaS Providers already use Containers

  50. OpenShift Heroku Docker INC use LXC

  51. Flynn Deis Dokku are built with Docker

  52. Isolation VS Performance

  53. Sometimes, a Virtual Machine is Not Enough

  54. You need Bare Metal Performance

  55. You need Bare Metal Performance

  56. But you Don’t want This Bare Metal Server

  57. You’d Prefer have This Bare Metal Server

  58. By Isolating your Apps in Containers, ! You provide Isolation

    without giving up Performance
  59. Continuous Deployment

  60. Deliver Code Test Deploy

  61. Deliver Code Test Deploy to Integration Deploy to Staging Deploy

    to Production
  62. Deliver Code Test Deploy to Integration Deploy to Staging Deploy

    to Production Install environment Configure Migration scripts Deploy deliverable Install environment Configure Migration scripts Deploy deliverable Install environment Configure Migration scripts Deploy deliverable
  63. We have to change the Delivery Unit

  64. Deliver a container

  65. Deliver a container Install environment Configure Migration scripts Deploy deliverable

  66. Deliver a container Test Deploy to Integration Deploy to Staging

    Deploy to Production
  67. Deliver a container Test Deploy to Integration Deploy to Staging

    Deploy to Production $ docker run $ docker run $ docker run Install environment Configure Migration scripts Deploy deliverable Install environment Configure Migration scripts Deploy deliverable Install environment Configure Migration scripts Deploy deliverable
  68. The Container is the new Delivery Unit

  69. Demo Time !

  70. User $git push triggers build - build project - build

    container deploys and run container
  71. User $git push triggers build - build project - build

    container deploys and run container Everything is a container
  72. in order to build the container $docker build <mycontainer> github.com/jpetazzo/dind

  73. What Else ?

  74. User $git push triggers build with Promoted Builds Plugin promote

    to staging promote to integration promote to production
  75. $ docker run base echo Questions?

  76. Thanks