Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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”

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

$ whoami > Andrea Tosatto § System and Platform Operations @ http://www.purpleocean.it/ § OpenSource Code Monkey @ https://github.com/opsfactory

Slide 5

Slide 5 text

$ whoami > Andrea Tosatto § https://twitter.com/_hilbert_ § https://github.com/atosatto § http://www.meetup.com/Milano-DevOps

Slide 6

Slide 6 text

# outline

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

$ history

Slide 11

Slide 11 text

# 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

Slide 12

Slide 12 text

# 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

Slide 13

Slide 13 text

# orchestrators without orchestration github.com/toscanini/maestro

Slide 14

Slide 14 text

github.com/spotify/helios # orchestrators without orchestration

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

# the ecosystem’s big-bang

Slide 21

Slide 21 text

$ docker

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

# docker swarm github.com/docker/swarm

Slide 24

Slide 24 text

# 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 : 4000 consul://:8500 # Initialize another swarm manager $ docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise : 4000 consul://:8500 # Join a worker node to the cluster $ docker run -d swarm join --advertise=:2375 consul://:8500

Slide 25

Slide 25 text

# docker swarm

Slide 26

Slide 26 text

# docker swarm

Slide 27

Slide 27 text

# so then?!

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

$ docker swarm

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

# docker “swarm mode”

Slide 34

Slide 34 text

# docker “swarm mode” # init a new swarm cluster $ docker swarm init # join the node as a manager $ docker swarm join --manager :2377 # join the node as worker $ docker swarm join :2377

Slide 35

Slide 35 text

# docker “swarm mode” # accept a new joining manager $ docker node accept # list cluster nodes $ docker node ls

Slide 36

Slide 36 text

# docker “swarm mode”

Slide 37

Slide 37 text

# docker “swarm mode”

Slide 38

Slide 38 text

$ docker service

Slide 39

Slide 39 text

# docker “swarm mode” # cluster level overlay networking $ docker network create -d overlay # new clustered application creation $ docker service create --name --network -p # listing all the application in the cluster $ docker service ls

Slide 40

Slide 40 text

# docker “swarm mode” # swarmkit’s tasks !!!!! :-) $ docker service tasks # up&down scaling $ docker service update --replicas 30 # build-in routing mesh $ curl http://:/

Slide 41

Slide 41 text

# what’s next?

Slide 42

Slide 42 text

# 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

Slide 43

Slide 43 text

# 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

Slide 44

Slide 44 text

# what’s next?

Slide 45

Slide 45 text

# thank you

Slide 46

Slide 46 text

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