Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker 1.12 and SwarmKit

374 views

Published on

Docker 1.12 and SwarmKit. Getting started with the new orchestration framework built-in Docker and main concepts.

Published in: Engineering
  • Be the first to comment

Docker 1.12 and SwarmKit

  1. 1. Docker 1.12, SwarmKit and orchestration
  2. 2. I’m Gianluca Software Engineer Docker Captain Open Source Developer DevOps Evangelist @gianarb
  3. 3. /begin{adv}
  4. 4. Drive your boat like a Captain Docker in Production http://scaledocker.com
  5. 5. /end{adv}
  6. 6. The evolution of Docker orchestration docker run nginx Swarm mode clustering + Docker Services in Engine ON-TRACK 2013-14 2014-present 2016 (Backed by docker/swarmkit)
  7. 7. Engine Swarm Mode $ docker swarm init
  8. 8. Engine Swarm Mode $ docker swarm init $ docker swarm join <IP of manager>:2377 Engine
  9. 9. Engine Engine Engine Engine Engine Engine Swarm Mode $ docker swarm init $ docker swarm join <IP of manager>:2377
  10. 10. Engine Engine Engine Engine Engine Engine Services $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest mynet
  11. 11. Engine Engine Engine Engine Engine Engine Services $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest $ docker service create --name redis --network mynet redis:latest mynet
  12. 12. Engine Engine Engine Engine Engine Engine Node Failure & Reconciliation $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest $ docker service create --name redis --network mynet redis:latest mynet
  13. 13. Engine Engine Engine Engine Engine Engine Node Failure & Reconciliation $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest $ docker service create --name redis --network mynet redis:latest mynet
  14. 14. Engine Engine Engine Engine Engine Desired State ≠ Actual State $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest $ docker service create --name redis --network mynet redis:latest mynet
  15. 15. Engine Engine Engine Engine Engine Converge Back to Desired State $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest $ docker service create --name redis --network mynet redis:latest mynet
  16. 16. Engine Engine Engine Engine Engine Scaling $ docker service update --replicas 6 frontend mynet
  17. 17. Engine Engine Engine Engine Engine Scaling $ docker service update --replicas 10 frontend mynet
  18. 18. Engine Engine Engine Engine Engine Global Services $ docker service create --mode=global --name prometheus prom/prometheus mynet
  19. 19. Engine Engine Engine Engine Engine Constraints Engine docker daemon --label com.example.storage="ssd" docker daemon --label com.example.storage="ssd"
  20. 20. Engine Engine Engine Engine Engine Constraints $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 --constraint engine.labels.com.example.storage==ssd frontend:latest Engine docker daemon --label com.example.storage="ssd" docker daemon --label com.example.storage="ssd"
  21. 21. Engine Engine Engine Engine Engine Constraints $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 --constraint engine.labels.com.example.storage==ssd frontend:latest $ docker service update --replicas 10 frontend Engine docker daemon --label com.example.storage="ssd" docker daemon --label com.example.storage="ssd"
  22. 22. Routing Mesh :8080 :8080 :8080 frontend frontend $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest frontend Load Balancer :8080 User browses to http://myapp.com Node 1 Node 2 Node 3 Node 4
  23. 23. Routing Mesh :8080 User browses to http://myapp.com :8080 :8080 frontend frontend $ docker service create --replicas 3 --name frontend --network mynet -p 8080:80 frontend:latest frontend External Load Balancer :8080 Node 1 Node 2 Node 3 Node 4
  24. 24. Secure by default • Out-of-the-box TLS encryption and mutual auth • Automatic cert rotation • External or self-signed root CA • Cryptographic node identity Certificate Authority TLS Certificate Authority TLS Certificate Authority TLS TLS TLSTLS
  25. 25. Topology: High Availability Manager Manager Manager Worker Worker Worker Worker Worker Worker Leader FollowerFollower Loss of Leader
  26. 26. Topology: High Availability Manager Manager Manager Worker Worker Worker Worker Worker Worker Leader FollowerFollower Loss of Leader
  27. 27. Topology: High Availability Manager Manager Manager Worker Worker Worker Worker Worker Worker Follower FollowerLeader
  28. 28. Topology: High Availability Manager Manager Manager Worker Worker Worker Worker Worker Worker Follower FollowerLeader
  29. 29. Demo
  30. 30. It’s time to think about Docker 1.13 • Secret Manager built-in (#27794) • Docker system command (#26108) • Allows a new client to talk to an old engine • Improved new plugins system • Docker Stats and Promethus (#25820)
  31. 31. Credits • Thanks Docker Inc. part of the slides are provided directly by them. • http://gianarb.it/planet/docker.html • https://scaledocker.com • https://github.com/docker/swarmkit • https://www.youtube.com/watch?v=h7a7vhzjElo • http://argh.gianarb.it/ Thanks!

×