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

Understanding Docker Swarm Mode

Understanding Docker Swarm Mode

Talk I gave at the Athens Docker Meetup on Docker's new SwarmKit, Docker Swarm mode and how you can use it to orchestrate containers in your infrastructure. http://www.meetup.com/Docker-Athens/events/234638645/

Antonis Kalipetis

October 19, 2016
Tweet

More Decks by Antonis Kalipetis

Other Decks in Technology

Transcript

  1. ANTONIS KALIPETIS @AKALIPETIS ▸ Docker Captain and early user ▸

    Python lover and developer ▸ Technology lead at SourceLair / stolos.io I love automating stuff and sharing knowledge around all things containers, DevOps and optimizing developer workflows.
  2. UNDERSTANDING DOCKER SWARM AGENDA ▸ Docker: a brief intro ▸

    [Classic] Docker Swarm ▸ Orchestrating the ‘ SwarmKit and Docker Swarm Mode ▸ Services ▸ DAB Files ▸ Demo time!
  3. THE DOCKER ENGINE ANATOMY OF THE ENGINE runc - low

    level plumbing dockerd - Docker Daemon docker - Docker Client
  4. THE NEED FOR MANAGING A BUNCH CONTAINERS DOCKER COMPOSE ▸

    Containers need special configuration, depending on the actual application ▸ Containers need to connect with each other in a semantic way ▸ Containers have dependencies
  5. UPS AND DOWNS [CLASSIC] SWARM ▸ 100% compatible with the

    Docker API ▸ Compatible with Docker Compose ▸ Hard to scale model ▸ First take on multi-host networking ▸ Volume management across a cluster ▸ Missing high-level orchestration concepts
  6. SAY HELLO TO DOCKER NATIVE ORCHESTRATION DOCKER SWARM MODE ▸

    Secure by default ▸ Integrated load balancing and service discovery ▸ High-level orchestration concepts ▸ Backwards compatible
  7. ANATOMY OF THE SWARM DOCKER SWARM CLUSTER ARCHITECTURE Manager Manager

    Manager Worker Worker Worker Worker Worker Worker Worker Internal Distributed State Store
  8. UNDERSTANDING DOCKER SWARM DESIGN PRINCIPLES ▸ Push (vs pull) model

    ▸ Integrated data store ▸ Highly available ▸ Orchestrating least privilege ▸ Integrated CA and certificate rotation
  9. UNDERSTANDING DOCKER SWARM SERVICES ▸ Declarative definition of desired state

    ▸ Replicas ▸ Global vs replicated ▸ Deploy / restart strategies ▸ Health checks ▸ docker service create [OPTIONS] IMAGE [COMMAND] [ARG...]
  10. UNDERSTANDING DOCKER SWARM [EXPERIMENTAL] DOCKER STACKS AND DISTRIBUTED APPLICATION BUNDLES

    ▸ Create from existing Docker Compose files ▸ Verify image checksums ▸ Perfect for production parity safety ▸ Rolling updates of services docker deploy [OPTIONS] STACK Manage DAB files: https://github.com/mantika/whaleprint