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

Martin Ahrer on Continuous Delivery Infrastructure With Docker

Martin Ahrer on Continuous Delivery Infrastructure With Docker

More Decks by Enterprise Java User Group Austria

Other Decks in Technology

Transcript

  1. About me Co-founder Enterprise Java User Group Austria Partner @

    Java Developer with strong focus on continuous delivery and Docker. Member of #dockermentor Software Craftsmen Gmbh & Co KG 1 . 2 Martin Ahrer
  2. The goal for this presentation Create a build infrastructure geared

    for a continuous delivery pipeline and have a walkthrough of the most important techniques used. Setup a build pipeline to build a Spring Boot application, Docker images and run integration tests. Eat your own dog food: this AsciiDoc slides are served from a Docker container running node.js + reveal.js. 1 . 3 just for the buzzwords …
  3. Some Docker myths 3 . 1 or I can’t use

    Docker because … and other excuses
  4. Docker replaces virtualization Containers are no virtualization technology, they do

    not use a hypervisor. Container != Virtual Server Containers and hypervisor virtualization can co-exist 3 . 2
  5. Docker is a platform lock-in Runs on any Linux distribution

    Is supported by Windows Server 2016+ (Windows Containers) Has been integrated into major cloud providers 3 . 3
  6. Containers add resource management overhead A docker container is represented

    by a single process Containers are managed by namespaces and cgroups → Containers run as secure, isolated processes A single Docker host can run hundreds of containers, resources are managed more efficiently 3 . 4
  7. Containers are much faster than virtual machines Modern hypervisors add

    little execution overhead Containers just provide better resource utilization Containers start up much faster than virtual servers Container provisioning is much faster than virtual server provisioning → Containers scale better with increasing number of builds/hr 3 . 6
  8. Summary Docker replaces virtualization Docker is a platform lock-in Containers

    are much faster than virtual machines Containers add resource management overhead In the context of continuous delivery, container provisioning and startup time is mostly relevant. € 3 . 7
  9. Jenkins Build Pipeline The Jenkins master container has been omitted

    in the above diagram as it is only responsible for scheduling the pipeline instance on a matching agent. 5 . 4
  10. Docker In Docker ( DinD ) Docker image for the

    agent provides Docker CLI from base image docker-compose CLI Jenkins Swarm Agent CLI for library/docker agent auto- discovery 6 . 2
  11. Docker Volumes Persist infrastructure data to survive container updates Provide

    /var/run/docker.sock to the agent container Provide build workspace filesystem to the agent container Provide gradle build cache volume reusable across builds 6 . 3 for data management
  12. Docker Software Defined Networks bridge network separated networks for infrastructure

    and app port mapping bind exposed container ports to host 6 . 4 a.k.a Docker networks
  13. docker-compose Eliminate shell scripting Makes managing multi-container applications simple Isolate

    environments running on a single host Makes data volumes survive container updates 6 . 5 is optional, just for convenience