Docker

 Docker

Continuous Delivery w/ Docker and 12factor principles.

Fcebe976d7c72e909e987826f4a07eb8?s=128

Hannes Moser

June 16, 2016
Tweet

Transcript

  1. Hannes Moser 2016 – @eliias

  2. Hello • Web Development for 10+ years • Webservices, Applications

    and DevOps • Teaching: University of Applied Sciences Salzburg • Working: Die Netzarchitekten Hannes Moser 2016 – @eliias
  3. History of Deployments • FTP/SFTP • rsync/SCP • GIT/CVS •

    Archives (tar, jar, …) Hannes Moser 2016 – @eliias
  4. Hannes Moser 2016 – @eliias

  5. Deployment & Delivery Challenges – Web Development • Lots of

    and small changes • Heterogenous platforms and languages • Environments (Dev, Stage, Production) • Zero Downtime • Rollback Hannes Moser 2016 – @eliias
  6. Hannes Moser 2016 – @eliias

  7. …and • Monitoring • Infrastructure as Code • Continuous Delivery

    • Infrastructure and Application Metrics Hannes Moser 2016 – @eliias
  8. …and • Dev and Ops Collaboration and Cooperation • Dealing

    with unexpected traffic • Fail beautifully • Security Hannes Moser 2016 – @eliias
  9. The Twelve-Factor App1 ! Best practices and methodology for building

    apps: • Software-as-a-service (Saas) • Any programing language (PHP, JavaScript, Ruby, Java, …) • Any combination of backing services (database, queue, cache, …) 1 The Twelve-Factor App Hannes Moser 2016 – @eliias
  10. Basic Rules • Declarative formats for setup automation • Clean

    contract w/ underlying operating system • Ready for cloud platforms • Minimizing divergence between dev and production • Scale up w/o significant changes Hannes Moser 2016 – @eliias
  11. Hannes Moser 2016 – @eliias

  12. The twelve factors – Part 1 1. Codebase 2. Dependencies

    3. Config 4. Backing services Hannes Moser 2016 – @eliias
  13. The twelve factors – Part 2 1. Build, release, run

    2. Processes 3. Port binding 4. Concurrency Hannes Moser 2016 – @eliias
  14. The twelve factors – Part 3 1. Disposability 2. Dev/prod

    parity 3. Logs 4. Admin processes Hannes Moser 2016 – @eliias
  15. What we actually want A single deployable file, which is

    under version control, verified by a checksum and simply runs w/o any additional dependencies → ! Hannes Moser 2016 – @eliias
  16. Docker ! Docker allows you to package an application with

    all of its dependencies into a standardized unit for software development. — docker.com Hannes Moser 2016 – @eliias
  17. Docker vs Virtual Machines Hannes Moser 2016 – @eliias

  18. Docker vs Virtual Machines Hannes Moser 2016 – @eliias

  19. Docker in a nutshell • Docker has images • An

    instance of an image is a container • Container == Sandboxed Process Hannes Moser 2016 – @eliias
  20. The docker ecosystem • Engine • Compose • Registry •

    Swarm • Machine Hannes Moser 2016 – @eliias
  21. Create your first docker app Every app has its own

    Dockerfile FROM mhart/alpine-node:6 WORKDIR /app COPY ./src /app RUN npm install --production CMD ["npm", "start"] Hannes Moser 2016 – @eliias
  22. Create the image docker build -t meetup/hello-world . Hannes Moser

    2016 – @eliias
  23. Run it docker run -p 5555:3000 \ --name meetup-hello-world \

    meetup/hello-world Hannes Moser 2016 – @eliias
  24. Run community images ! Pull and run MySQL, Redis, Mong

    w/ a single command: docker run \ --name clustar-db \ mysql/mysql-server:5.7 Hannes Moser 2016 – @eliias
  25. Real World • Connecting multiple services • Continuous Delivery •

    Update images (Registry) • Zero Downtime Hannes Moser 2016 – @eliias
  26. Real World Demo Hannes Moser 2016 – @eliias

  27. Hannes Moser 2016 – @eliias

  28. Real World • Red Bull Content Pool • clustar Hannes

    Moser 2016 – @eliias
  29. Interested? • Continuous Delivery is part of the new MMT

    master • We are willing to organize a workshop @Barcamp Salzburg • Good intro by Laura Frank @concat2015 • Ask me @eliias Hannes Moser 2016 – @eliias
  30. Thank You Questions? Hannes Moser 2016 – @eliias