SlideShare a Scribd company logo
Docker Orchestration
An Overview
Dr. Halil-Cem Gürsoy
@hgutwit
adesso AG - Dortmund, Germany
About myself…
► Principal Architect @ adesso AG, DE
► since more than 15 years in commercial

software development
> before that, wrote science software

► Large distributed enterprise systems
► Persistence, build’n deployment
2
“It is not the
strongest or the
most intelligent who
will survive but
those who can best
manage change.”
C. Darwin
Why Docker orchestration?
4
https://www.flickr.com/photos/matijagrguric/4437187539
Why Docker orchestration?
5
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
https://www.flickr.com/photos/matijagrguric/4437187539
Why Docker orchestration?
► Containers has to talk to each over
► Think about a microservice architecture with dozens of
containers
► And they have to find each other
6
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
Poor mans orchestration with Docker link
► The easiest way was to use Docker link functionality
docker run –d --name db42 dbimg
docker run –d --name app42 --link db42:db appimg
► But that about multiple Docker hosts?
7
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
Poor mans orchestration with Docker link
8
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
www.flickr.com/photos/matijagrguric/4437187539/
https://www.flickr.com/photos/zunami/3780220955/
You can implement your own network…
10
http://www.opencontrail.org/wp-content/uploads/2014/09/opencontrail-docker-figure-1.png
https://www.flickr.com/photos/r_rose/102766969/
Build-in solutions - Docker Machine
► Docker Machine as the lowest building block
► only needed for development environments
► in production you’ll provision with other tools…
docker-machine create 

  --driver digitalocean 

  --digitalocean-access-token=$DIGITAL_OCEAN_TOKEN 

  machine-1

► You can create as many docker hosts as you want (and
have resources / money)
12
Docker orchestration   voxxed days berlin 2016
Docker Swarm
► Docker Swarm is the ‚built-in’ clustering solution
► Supports new overlay network (based on VXLAN)
► Easy to set up with Docker Machine
docker-machine create --driver digitalocean 

  --digitalocean-access-token=$DIGITAL_OCEAN_TOKEN 

  --swarm --swarm-master 

  --swarm-discovery token://$SWARM_ID 

swarm-master

docker-machine create --driver digitalocean 

  --digitalocean-access-token=$DIGITAL_OCEAN_TOKEN 

  --swarm --swarm-discovery token://$SWARM_ID 

  swarm-node-01
14
Docker Swarm - Manager
► Manager needs a Discovery Service to handle nodes
> Consul, etcd, Zookeeper, static files, IP ranges etc.
► Acts like a proxy, implementing the Docker Remote API
► Manages distribution of starting containers to nodes
> Depending on CPU and / or memory constraints
> … labels on Docker hosts
> … affinity to ressources and other containers
15
Docker Swarm - Scheduler strategies
► Scheduler ranks nodes while starting containers
► Different strategies
> binpack
> spread (default)
> random
► binpack and spread depend on current node utilization
16
Docker Swarm - Filters
► The scheduler has various filters to choose a node
> Constraint - a label on a Docker host
> Affinity - be together with a specific resource
> Port - is a specific port free?
> Dependency - together with another container
> Health
$ docker daemon --label storage=ssd
$ docker run -d -P -e constraint:storage==ssd ...
17
Docker Swarm - Missing stuff
► Swarm is simply the low level clustering for Docker nodes
► Self healing / resilience
> restarting containers on other nodes on node failure
> comes with 1.1.0 (already included in RC, experimental)
► Moving containers during runtime
> only with 3rd party tools
► Auto-Scaling, may come with Docker Compose
► Monitoring
18
Taking a little trip: Overlay Network
► Allows communication between containers in the cluster
► Using libnetwork, based on vxlan
> uses plugin system: overlay, weave
► For overlay driver you need min Kernel 3.16
> have to be careful on Ubuntu
► Needs a K/V store like etcd, Zookeeper or Consul
► All containers attached to that network get an entry in

/etc/hosts on all containers
19
Another trip: Discovery Services
► You may need a Discovery Service in a Microservice
architecture regardless of Docker
► ‚Did I need a Discovery Service even then I’ve a overlay
network?‘
> YES, you do!
> beyond ‚Hello World’ examples the challenge is the same
to find services in a large scale distributed system
20
Service Discovery
► Consider using registrator
> registers starting containers in Consul, etcd or SkyDNS
> but doesn’t work currently with overlay network
► Inject needed data into your container using something like
consul-template / envconsul, confd, Spring Cloud, …
21
http://github.com/hcguersoy/swarm-elastic-demo
https://www.flickr.com/photos/schwaber/3238977103
Docker Compose
► Former ‚Fig‘ project, now part of Docker’s core ecosystem
► implemented in Python
► „Compose is a tool for defining and running multi-container
applications with Docker.“
► Can be used to set up complex environments
► Using Docker Swarm as the low level clustering of the
Docker Hosts, Compose is for the orchestration of the
containers
23
Docker Compose
► Configuration using YAML:
myapp:
build: .
ports:
- "8080:8080"
volumes:
- ./conf:/etc/myapp/conf
links:
- mysql
mysql:
image: mysql
► Links supported only on single host system
► But latest version supports overlay network (experimental)
24
Docker Compose
► a more complex example: Kubernetes on top of Swarm
etcd:
image: gcr.io/google_containers/etcd:2.0.13
container_name: etcd
command: ['/usr/local/bin/etcd', '--bind-addr=0.0.0.0:4001', '--data-dir=/var/etcd/
data']
apiserver:
image: gcr.io/google_containers/hyperkube:v1.0.7
container_name: apiserver
ports:
- "8080"
command: ["/hyperkube", "apiserver", "--service-cluster-ip-range=172.17.17.1/24", "--
address=0.0.0.0", "--etcd_servers=http://etcd:4001", "--cluster_name=kubernetes", "--
v=2"]
controller:
image: gcr.io/google_containers/hyperkube:v1.0.7
command: ["/hyperkube", "controller-manager", "--address=0.0.0.0", "--master=http://
apiserver:8080", "--v=2"]
environment:
- "affinity:container==*apiserver*"
...
Source 'Swarm Frontend’ (https://github.com/docker/swarm-frontends)
25
https://www.flickr.com/photos/tomwahlin/with/3167491292/
Kubernetes
► Created by Google
► build to manage ‚oceans of user containers‘
► Cloud agnostics, supports different cloud and virtualization
platform
> but results in different installation directives
> easy playground setup using Docker Compose (s. above)
on top of Swarm
27
Kubernetes - Key components
► Kubernetes consists of different key components
► Master Server
> the main management system
> is build up using different tools
– etcd
– API Server, providing REST interface
– Controller Server
– Scheduler Server
28
Kubernetes - Key components
► Minion
> the work units in Kubernetes, executing the commands
coming from the master server
> runs a Docker daemon
> Kubelete service
> Proxy Service
> cAdvisior
29
Kubernetes - Key components
► Pod
> the smallest logical unit in Kubernetes
> containers belonging together are defined in a Pod - a
logical collection
> All containers of a Pod run on one Minion ( = one Host)
30
Kubernetes - System Arcitecture
31
Source: http://releases.k8s.io/release-1.1/docs/design/architecture.md
Kubernetes
► Build in resource monitoring, fail over 

and rescheduling
► Uses different API then Docker
► Uses different configuration files as Compose
► Complex architecture
► IMHO not very usable for ‚small‘ setups due to the overhead
> but may be very useful then you get really large
32
Spotify Helios
► Builds a cluster spanning multiple Docker hosts
► deploys and manages containers in this cluster
► Developed before rise of Swarm but does similar stuff
> …and still actively developed
> used by Spotify in production
► But missing something like Compose above this low layer
33
Apache Mesos / Marathon
► Apache Mesos is a ‚kernel‘ to set up large scale distributed
systems
> e.g. large Hadoop Clusters
► Comes with an 0.20.0 with Docker Containerizer
> still some limitations
► May be used together with Marathon
> e.g. supplies rescheduler
34
…and much more
► There is a whole bunch of more orchestration solutions
> Crane
> CoresOS / Fleetd
> RancherOS
> …
► …and much more hosted solutions
> Giantswarm (still alpha), Amazon ECS, Google CE
35
Summing up
► Docker Swarm together with Compose is a lightweight way
to orchestrate containers
> but need some maturity and additional features / services
► Kubernetes is the opposite, heavy weight solution
> good for large scenarios, but oversized for small setups
> breaks with Docker CLI
► Mesos / Marathon
> useful for some scenarios, breaks with Docker CLI
36
http://www.flickr.com/photos/an_untrained_eye/6630719431
http://www.flickr.com/photos/tcmorgan/7372944070
halil-cem.guersoy@adesso.de
https://twitter.com/hgutwit

More Related Content

PPTX
Docker and kubernetes
PDF
The state of the swarm
PDF
Docker puebla bday #4 celebration
PPTX
Hands on introduction to docker security for docker newbies
PDF
From zero to Docker
PDF
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
PDF
Rooting Out Root: User namespaces in Docker
PDF
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Docker and kubernetes
The state of the swarm
Docker puebla bday #4 celebration
Hands on introduction to docker security for docker newbies
From zero to Docker
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Rooting Out Root: User namespaces in Docker
Tokyo OpenStack Summit 2015: Unraveling Docker Security

What's hot (20)

PDF
Docker Swarm & Machine
PDF
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
PDF
Docker
PDF
JOSA TechTalk: Taking Docker to Production
PDF
Docker containerization cookbook
PPTX
Surveillance on slam technology
PPTX
Docker and the Container Ecosystem
PDF
Docker from A to Z, including Swarm and OCCS
PDF
Docker From Scratch
PDF
Orchestrating Docker containers at scale
PDF
[DockerCon 2019] Hardening Docker daemon with Rootless mode
PDF
What's new in kubernetes 1.3?
PPTX
Introduction To Docker
PPTX
Kubernetes Introduction
PDF
Dessi docker kubernetes paas cloud
PDF
Rootless Containers & Unresolved issues
PDF
Docker dDessi november 2015
PDF
Docker, Docker Swarm mangement tool - Gorae
PDF
Podman rootless containers
PDF
Containers: The What, Why, and How
Docker Swarm & Machine
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Docker
JOSA TechTalk: Taking Docker to Production
Docker containerization cookbook
Surveillance on slam technology
Docker and the Container Ecosystem
Docker from A to Z, including Swarm and OCCS
Docker From Scratch
Orchestrating Docker containers at scale
[DockerCon 2019] Hardening Docker daemon with Rootless mode
What's new in kubernetes 1.3?
Introduction To Docker
Kubernetes Introduction
Dessi docker kubernetes paas cloud
Rootless Containers & Unresolved issues
Docker dDessi november 2015
Docker, Docker Swarm mangement tool - Gorae
Podman rootless containers
Containers: The What, Why, and How
Ad

Viewers also liked (20)

PDF
Spring 4.3-component-design
PDF
Voxxed berlin2016profilers|
PDF
Paolucci voxxed-days-berlin-2016-age-of-orchestration
PDF
The internet of (lego) trains
PDF
Cassandra and materialized views
PDF
Advanced akka features
PDF
OrientDB - Voxxed Days Berlin 2016
PDF
Size does matter - How to cut (micro-)services correctly
PDF
Rise of the Machines - Automate your Development
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Baum3
PPTX
Reflection on integrating the internet safely and ethically
PDF
แต่ง Photo
PPTX
The Flying Scotsman - Trailer em fotos
PDF
Fornitura E Finanziamento Di Materiale Per Impianti Fotovoltaici
PPT
Cine
DOCX
Home Seller's Guide
PPT
Sfama 12209-1232733566144121-2
PDF
Option 110413222536-phpapp02
PDF
Газовый настенный котел Baxi Main Four 24
Spring 4.3-component-design
Voxxed berlin2016profilers|
Paolucci voxxed-days-berlin-2016-age-of-orchestration
The internet of (lego) trains
Cassandra and materialized views
Advanced akka features
OrientDB - Voxxed Days Berlin 2016
Size does matter - How to cut (micro-)services correctly
Rise of the Machines - Automate your Development
Microservices with Java, Spring Boot and Spring Cloud
Baum3
Reflection on integrating the internet safely and ethically
แต่ง Photo
The Flying Scotsman - Trailer em fotos
Fornitura E Finanziamento Di Materiale Per Impianti Fotovoltaici
Cine
Home Seller's Guide
Sfama 12209-1232733566144121-2
Option 110413222536-phpapp02
Газовый настенный котел Baxi Main Four 24
Ad

Similar to Docker orchestration voxxed days berlin 2016 (20)

PPTX
A docker love story
PDF
Higher order infrastructure: from Docker basics to cluster management - Nicol...
PDF
Alibaba Cloud Conference 2016 - Docker Enterprise
PDF
Docker Online Meetup #3: Docker in Production
PDF
Orchestrating Linux Containers while tolerating failures
PDF
Orchestrating Linux Containers
PDF
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
PDF
Container orchestration
PDF
11thDockerMeetupSwitzerland
PDF
Shipping Applications to Production in Containers with Docker
PDF
DEVOPS UNIT 4 docker and services commands
PPTX
Docker Basic to Advance
PDF
Introduction to Docker and Monitoring with InfluxData
PDF
Characterizing and contrasting kuhn tey-ner awr-kuh-streyt-ors
PDF
Alibaba Cloud Conference 2016 - Docker Open Source
PPTX
Introduction To Docker, Docker Compose, Docker Swarm
PPTX
Container Orchestration with Docker Swarm and Kubernetes
PDF
Swarm: Native Docker Clustering
PDF
Docker Essentials Workshop— Innovation Labs July 2020
PPTX
Everything you need to know about Docker
A docker love story
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Alibaba Cloud Conference 2016 - Docker Enterprise
Docker Online Meetup #3: Docker in Production
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Container orchestration
11thDockerMeetupSwitzerland
Shipping Applications to Production in Containers with Docker
DEVOPS UNIT 4 docker and services commands
Docker Basic to Advance
Introduction to Docker and Monitoring with InfluxData
Characterizing and contrasting kuhn tey-ner awr-kuh-streyt-ors
Alibaba Cloud Conference 2016 - Docker Open Source
Introduction To Docker, Docker Compose, Docker Swarm
Container Orchestration with Docker Swarm and Kubernetes
Swarm: Native Docker Clustering
Docker Essentials Workshop— Innovation Labs July 2020
Everything you need to know about Docker

Recently uploaded (20)

PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
ai tools demonstartion for schools and inter college
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
medical staffing services at VALiNTRY
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Nekopoi APK 2025 free lastest update
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
AI in Product Development-omnex systems
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administraation Chapter 3
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Introduction to Artificial Intelligence
PDF
Understanding Forklifts - TECH EHS Solution
Odoo POS Development Services by CandidRoot Solutions
ai tools demonstartion for schools and inter college
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Upgrade and Innovation Strategies for SAP ERP Customers
medical staffing services at VALiNTRY
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Nekopoi APK 2025 free lastest update
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Operating system designcfffgfgggggggvggggggggg
AI in Product Development-omnex systems
Navsoft: AI-Powered Business Solutions & Custom Software Development
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administraation Chapter 3
Design an Analysis of Algorithms II-SECS-1021-03
Introduction to Artificial Intelligence
Understanding Forklifts - TECH EHS Solution

Docker orchestration voxxed days berlin 2016

  • 1. Docker Orchestration An Overview Dr. Halil-Cem Gürsoy @hgutwit adesso AG - Dortmund, Germany
  • 2. About myself… ► Principal Architect @ adesso AG, DE ► since more than 15 years in commercial
 software development > before that, wrote science software
 ► Large distributed enterprise systems ► Persistence, build’n deployment 2
  • 3. “It is not the strongest or the most intelligent who will survive but those who can best manage change.” C. Darwin
  • 6. Why Docker orchestration? ► Containers has to talk to each over ► Think about a microservice architecture with dozens of containers ► And they have to find each other 6 www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
  • 7. Poor mans orchestration with Docker link ► The easiest way was to use Docker link functionality docker run –d --name db42 dbimg docker run –d --name app42 --link db42:db appimg ► But that about multiple Docker hosts? 7 www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
  • 8. Poor mans orchestration with Docker link 8 www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/ www.flickr.com/photos/matijagrguric/4437187539/
  • 10. You can implement your own network… 10 http://www.opencontrail.org/wp-content/uploads/2014/09/opencontrail-docker-figure-1.png
  • 12. Build-in solutions - Docker Machine ► Docker Machine as the lowest building block ► only needed for development environments ► in production you’ll provision with other tools… docker-machine create 
   --driver digitalocean 
   --digitalocean-access-token=$DIGITAL_OCEAN_TOKEN 
   machine-1
 ► You can create as many docker hosts as you want (and have resources / money) 12
  • 14. Docker Swarm ► Docker Swarm is the ‚built-in’ clustering solution ► Supports new overlay network (based on VXLAN) ► Easy to set up with Docker Machine docker-machine create --driver digitalocean 
   --digitalocean-access-token=$DIGITAL_OCEAN_TOKEN 
   --swarm --swarm-master 
   --swarm-discovery token://$SWARM_ID 
 swarm-master
 docker-machine create --driver digitalocean 
   --digitalocean-access-token=$DIGITAL_OCEAN_TOKEN 
   --swarm --swarm-discovery token://$SWARM_ID 
   swarm-node-01 14
  • 15. Docker Swarm - Manager ► Manager needs a Discovery Service to handle nodes > Consul, etcd, Zookeeper, static files, IP ranges etc. ► Acts like a proxy, implementing the Docker Remote API ► Manages distribution of starting containers to nodes > Depending on CPU and / or memory constraints > … labels on Docker hosts > … affinity to ressources and other containers 15
  • 16. Docker Swarm - Scheduler strategies ► Scheduler ranks nodes while starting containers ► Different strategies > binpack > spread (default) > random ► binpack and spread depend on current node utilization 16
  • 17. Docker Swarm - Filters ► The scheduler has various filters to choose a node > Constraint - a label on a Docker host > Affinity - be together with a specific resource > Port - is a specific port free? > Dependency - together with another container > Health $ docker daemon --label storage=ssd $ docker run -d -P -e constraint:storage==ssd ... 17
  • 18. Docker Swarm - Missing stuff ► Swarm is simply the low level clustering for Docker nodes ► Self healing / resilience > restarting containers on other nodes on node failure > comes with 1.1.0 (already included in RC, experimental) ► Moving containers during runtime > only with 3rd party tools ► Auto-Scaling, may come with Docker Compose ► Monitoring 18
  • 19. Taking a little trip: Overlay Network ► Allows communication between containers in the cluster ► Using libnetwork, based on vxlan > uses plugin system: overlay, weave ► For overlay driver you need min Kernel 3.16 > have to be careful on Ubuntu ► Needs a K/V store like etcd, Zookeeper or Consul ► All containers attached to that network get an entry in
 /etc/hosts on all containers 19
  • 20. Another trip: Discovery Services ► You may need a Discovery Service in a Microservice architecture regardless of Docker ► ‚Did I need a Discovery Service even then I’ve a overlay network?‘ > YES, you do! > beyond ‚Hello World’ examples the challenge is the same to find services in a large scale distributed system 20
  • 21. Service Discovery ► Consider using registrator > registers starting containers in Consul, etcd or SkyDNS > but doesn’t work currently with overlay network ► Inject needed data into your container using something like consul-template / envconsul, confd, Spring Cloud, … 21
  • 23. Docker Compose ► Former ‚Fig‘ project, now part of Docker’s core ecosystem ► implemented in Python ► „Compose is a tool for defining and running multi-container applications with Docker.“ ► Can be used to set up complex environments ► Using Docker Swarm as the low level clustering of the Docker Hosts, Compose is for the orchestration of the containers 23
  • 24. Docker Compose ► Configuration using YAML: myapp: build: . ports: - "8080:8080" volumes: - ./conf:/etc/myapp/conf links: - mysql mysql: image: mysql ► Links supported only on single host system ► But latest version supports overlay network (experimental) 24
  • 25. Docker Compose ► a more complex example: Kubernetes on top of Swarm etcd: image: gcr.io/google_containers/etcd:2.0.13 container_name: etcd command: ['/usr/local/bin/etcd', '--bind-addr=0.0.0.0:4001', '--data-dir=/var/etcd/ data'] apiserver: image: gcr.io/google_containers/hyperkube:v1.0.7 container_name: apiserver ports: - "8080" command: ["/hyperkube", "apiserver", "--service-cluster-ip-range=172.17.17.1/24", "-- address=0.0.0.0", "--etcd_servers=http://etcd:4001", "--cluster_name=kubernetes", "-- v=2"] controller: image: gcr.io/google_containers/hyperkube:v1.0.7 command: ["/hyperkube", "controller-manager", "--address=0.0.0.0", "--master=http:// apiserver:8080", "--v=2"] environment: - "affinity:container==*apiserver*" ... Source 'Swarm Frontend’ (https://github.com/docker/swarm-frontends) 25
  • 27. Kubernetes ► Created by Google ► build to manage ‚oceans of user containers‘ ► Cloud agnostics, supports different cloud and virtualization platform > but results in different installation directives > easy playground setup using Docker Compose (s. above) on top of Swarm 27
  • 28. Kubernetes - Key components ► Kubernetes consists of different key components ► Master Server > the main management system > is build up using different tools – etcd – API Server, providing REST interface – Controller Server – Scheduler Server 28
  • 29. Kubernetes - Key components ► Minion > the work units in Kubernetes, executing the commands coming from the master server > runs a Docker daemon > Kubelete service > Proxy Service > cAdvisior 29
  • 30. Kubernetes - Key components ► Pod > the smallest logical unit in Kubernetes > containers belonging together are defined in a Pod - a logical collection > All containers of a Pod run on one Minion ( = one Host) 30
  • 31. Kubernetes - System Arcitecture 31 Source: http://releases.k8s.io/release-1.1/docs/design/architecture.md
  • 32. Kubernetes ► Build in resource monitoring, fail over 
 and rescheduling ► Uses different API then Docker ► Uses different configuration files as Compose ► Complex architecture ► IMHO not very usable for ‚small‘ setups due to the overhead > but may be very useful then you get really large 32
  • 33. Spotify Helios ► Builds a cluster spanning multiple Docker hosts ► deploys and manages containers in this cluster ► Developed before rise of Swarm but does similar stuff > …and still actively developed > used by Spotify in production ► But missing something like Compose above this low layer 33
  • 34. Apache Mesos / Marathon ► Apache Mesos is a ‚kernel‘ to set up large scale distributed systems > e.g. large Hadoop Clusters ► Comes with an 0.20.0 with Docker Containerizer > still some limitations ► May be used together with Marathon > e.g. supplies rescheduler 34
  • 35. …and much more ► There is a whole bunch of more orchestration solutions > Crane > CoresOS / Fleetd > RancherOS > … ► …and much more hosted solutions > Giantswarm (still alpha), Amazon ECS, Google CE 35
  • 36. Summing up ► Docker Swarm together with Compose is a lightweight way to orchestrate containers > but need some maturity and additional features / services ► Kubernetes is the opposite, heavy weight solution > good for large scenarios, but oversized for small setups > breaks with Docker CLI ► Mesos / Marathon > useful for some scenarios, breaks with Docker CLI 36