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

Docker

 Docker

Continuous Delivery w/ Docker and 12factor principles.

Hannes Moser

June 16, 2016
Tweet

More Decks by Hannes Moser

Other Decks in Technology

Transcript

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

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

    Archives (tar, jar, …) Hannes Moser 2016 – @eliias
  3. 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
  4. …and • Monitoring • Infrastructure as Code • Continuous Delivery

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

    with unexpected traffic • Fail beautifully • Security Hannes Moser 2016 – @eliias
  6. 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
  7. 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
  8. The twelve factors – Part 1 1. Codebase 2. Dependencies

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

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

    parity 3. Logs 4. Admin processes Hannes Moser 2016 – @eliias
  11. 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
  12. 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
  13. Docker in a nutshell • Docker has images • An

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

    Swarm • Machine Hannes Moser 2016 – @eliias
  15. 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
  16. Run it docker run -p 5555:3000 \ --name meetup-hello-world \

    meetup/hello-world Hannes Moser 2016 – @eliias
  17. 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
  18. Real World • Connecting multiple services • Continuous Delivery •

    Update images (Registry) • Zero Downtime Hannes Moser 2016 – @eliias
  19. 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