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/

Ae7266b2a8b6a0fc8df19a3d732d6223?s=128

Antonis Kalipetis

October 19, 2016
Tweet

Transcript

  1. UNDERSTANDING DOCKER SWARM ANTONIS KALIPETIS - @AKALIPETIS

  2. 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.
  3. UNDERSTANDING DOCKER SWARM AGENDA ▸ Docker: a brief intro ▸

    [Classic] Docker Swarm ▸ Orchestrating the ‘ SwarmKit and Docker Swarm Mode ▸ Services ▸ DAB Files ▸ Demo time!
  4. CLOUD AN OPERATING SYSTEM FOR ΤΗΕ

  5. None
  6. THE DOCKER ENGINE ANATOMY OF THE ENGINE runc - low

    level plumbing dockerd - Docker Daemon docker - Docker Client
  7. 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
  8. [CLASSIC] SWARM

  9. Docker CLI Docker Hub Token service etcd consul zookeeper Machine

    discovery libkv
  10. 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
  11. SWARMKIT AND DOCKER SWARM MODE

  12. SAY HELLO TO DOCKER NATIVE ORCHESTRATION DOCKER SWARM MODE ▸

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

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

    ▸ Integrated data store ▸ Highly available ▸ Orchestrating least privilege ▸ Integrated CA and certificate rotation
  15. 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...]
  16. UNDERSTANDING DOCKER SWARM TASKS ▸ The actual end-result ▸ Created

    from services ▸ Scheduled to nodes
  17. 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
  18. DEMO TIME!

  19. THANKS ANTONIS KALIPETIS - @AKALIPETIS