Docker Engine: from one to hundreds nodes

Docker Engine: from one to hundreds nodes

# Docker Engine: from one to hundreds nodes.
## An introduction to the new Docker Engine "Swarm mode".

The recent DockerCon in Seattle has been really amazing.
Among the many announcements made by the Docker team, for sure the most incredible one has been the presentation of the new Docker Engine "Swarm mode" that will be shipped in Docker 1.12.
This feature has really shocked the container orchestration solutions community pushing Docker Swarm from a follower technology to be a potential leader of the competition.
In this talk we will dive into the features of the new Docker Engine "Swarm mode" comparing it to the previous implementation of Docker Swarm.
We will also talk about tools and tips to test the "Swarm Mode" at scale.

540c59627eb80644f4859bebafa5f185?s=128

Andrea Tosatto

July 07, 2016
Tweet

Transcript

  1. Docker Engine From one to hundres nodes Andrea Tosatto -

    @_hilbert_ 07/07/2016 - 1st Docker Rome Meetup
  2. Docker Engine From one to hundres nodes Andrea Tosatto -

    @_hilbert_ 07/07/2016 - 1st Docker Rome Meetup An introduction to the new Docker Engine “Swarm Mode”
  3. Docker Engine From one to hundres nodes Andrea Tosatto -

    @_hilbert_ 07/07/2016 - 1st Docker Rome Meetup Why the new Docker Engine “Swarm Mode” is so cool
  4. $ whoami > Andrea Tosatto § System and Platform Operations

    @ http://www.purpleocean.it/ § OpenSource Code Monkey @ https://github.com/opsfactory
  5. $ whoami > Andrea Tosatto § https://twitter.com/_hilbert_ § https://github.com/atosatto §

    http://www.meetup.com/Milano-DevOps
  6. # outline

  7. None
  8. None
  9. None
  10. $ history

  11. # orchestration without orchestrators $ cat docker-up.sh for i in

    {0..10} do ssh dck-dev$(printf %02d $i) \ docker run --name myapp -d myapp:latest done
  12. # orchestration without orchestrators $ cat playbook.yml --- - name:

    "Provision myapp" hosts: dckdev tasks: - name: "run myapp with docker" docker: name: myapp image: myapp:latest state: started
  13. # orchestrators without orchestration github.com/toscanini/maestro

  14. github.com/spotify/helios # orchestrators without orchestration

  15. # the ecosystem’s big-bang github.com/coreos/fleet

  16. # the ecosystem’s big-bang github.com/rancher/rancher

  17. # the ecosystem’s big-bang github.com/mesosphere/marathon

  18. # the ecosystem’s big-bang github.com/kubernetes/kubernetes

  19. github.com/hashicorp/nomad # the ecosystem’s big-bang

  20. # the ecosystem’s big-bang

  21. $ docker

  22. None
  23. # docker swarm github.com/docker/swarm

  24. # docker swarm # Run the consul to act as

    swarm key/value backend $ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap # Initialize the first swarm manager $ docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise <manager0_ip>: 4000 consul://<consul_ip>:8500 # Initialize another swarm manager $ docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise <manager1_ip>: 4000 consul://<consul_ip>:8500 # Join a worker node to the cluster $ docker run -d swarm join --advertise=<node_ip>:2375 consul://<consul_ip>:8500
  25. # docker swarm

  26. # docker swarm

  27. # so then?!

  28. None
  29. None
  30. None
  31. $ docker swarm

  32. # docker “swarm mode” github.com/docker/swarmkit

  33. # docker “swarm mode”

  34. # docker “swarm mode” # init a new swarm cluster

    $ docker swarm init # join the node as a manager $ docker swarm join --manager <leader_ip>:2377 # join the node as worker $ docker swarm join <leader_ip>:2377
  35. # docker “swarm mode” # accept a new joining manager

    $ docker node accept <node_id> # list cluster nodes $ docker node ls
  36. # docker “swarm mode”

  37. # docker “swarm mode”

  38. $ docker service

  39. # docker “swarm mode” # cluster level overlay networking $

    docker network create -d overlay <netname> # new clustered application creation $ docker service create --name <svcname> --network <netname> -p <portmapping> <image> # listing all the application in the cluster $ docker service ls
  40. # docker “swarm mode” # swarmkit’s tasks !!!!! :-) $

    docker service tasks <svcname> # up&down scaling $ docker service update --replicas 30 <svcname> # build-in routing mesh $ curl http://<any-node-ip>:<public-port>/
  41. # what’s next?

  42. # what’s next? § docker 1.12 is still rc3 $

    kubernetes 1.3 has been released with improved scaling and autoscaling support http://blog.kubernetes.io/2016/07/kubernetes-1.3-bridging-cloud-native-and-enterprise- workloads.html § hashicorp is pushing nomad claiming it can scale millions of containers on 5k hosts under 5 minutes https://www.hashicorp.com/c1m.html
  43. # what’s next? "We believe that we can provide a

    better user experience by integrating orchestration features into the platform itself" Mike Goelzer, Product lead for Docker Core
  44. # what’s next?

  45. # thank you

  46. # demo https://asciinema.org/a/6xvacwh5mura4zw924as9rabv