SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
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 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

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

Destaque

Reflection on integrating the internet safely and ethically
Reflection on integrating the internet safely and ethicallyReflection on integrating the internet safely and ethically
Reflection on integrating the internet safely and ethically
alovel
 
The Flying Scotsman - Trailer em fotos
The Flying Scotsman - Trailer em fotosThe Flying Scotsman - Trailer em fotos
The Flying Scotsman - Trailer em fotos
Jonisousa Campos
 
Fornitura E Finanziamento Di Materiale Per Impianti Fotovoltaici
Fornitura E Finanziamento Di Materiale Per Impianti FotovoltaiciFornitura E Finanziamento Di Materiale Per Impianti Fotovoltaici
Fornitura E Finanziamento Di Materiale Per Impianti Fotovoltaici
lucacococcia
 
Cine
CineCine
Cine
78355
 
Sfama 12209-1232733566144121-2
Sfama 12209-1232733566144121-2Sfama 12209-1232733566144121-2
Sfama 12209-1232733566144121-2
Joshua Samuel
 
Option 110413222536-phpapp02
Option 110413222536-phpapp02Option 110413222536-phpapp02
Option 110413222536-phpapp02
gathit01
 

Destaque (20)

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

Semelhante a Docker orchestration voxxed days berlin 2016

Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
Ricardo Amaro
 

Semelhante a Docker orchestration voxxed days berlin 2016 (20)

Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
VMware@Night Container and Virtualization
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and Virtualization
 
VMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungVMware@Night: Container & Virtualisierung
VMware@Night: Container & Virtualisierung
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Container security
Container securityContainer security
Container security
 
What You Should Know About Container Security
What You Should Know About Container SecurityWhat You Should Know About Container Security
What You Should Know About Container Security
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimes
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Docker, but what it is?
Docker, but what it is?Docker, but what it is?
Docker, but what it is?
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
 
Orchestrating Docker with OpenStack
Orchestrating Docker with OpenStackOrchestrating Docker with OpenStack
Orchestrating Docker with OpenStack
 
DOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDESDOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDES
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
Kubernetes 101 for_penetration_testers_-_null_mumbai
Kubernetes 101 for_penetration_testers_-_null_mumbaiKubernetes 101 for_penetration_testers_-_null_mumbai
Kubernetes 101 for_penetration_testers_-_null_mumbai
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

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
  • 13.
  • 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