SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
THE STATE OF THE SWARM
HOW CLOSE TO PRODUCTION READY ARE WE ?
7 / 1 /2016
HI
▸ Mathieu Buffenoir
▸ twitter://@MBuffenoir
▸ mail://mat.buff@gmail.com
▸ founder bity.com (running on docker on exoscale)
▸ VP swiss bitcoin association
▸ https://github.com/skippbox/docker-on-cluster-howtos
WHAT’S NEW IN DOCKER ECOSYSTEM ?
▸ Docker 1.9
▸ Networking in the swarm
▸ Compose 1.5
▸ environnement variable
▸ Docker-machine
▸ Added cloud providers support
WHAT DO WE NEED IN PRODUCTION ?
▸ Provisioning / orchestration (Swarm)
▸ Service discovery (consul / etc / zookeeper …)
▸ Logging (ELK, Loggly , syslog …)
▸ Monitoring (Promotheus, sensu, sysdig …)
LET’S CREATE A LITTLE DEMO
INFRASTRUCTURE
DEMO INFRA
DOCKER MACHINE
▸ cloud provider drivers (12 as of today) or bare
metal
▸ some handy features
▸ ssh / scp
▸ One command to control your node or cluster
directly from your shell:
▸ eval $(docker-machine env --swarm swarm-
master)
▸ docker ps
ONE COMMAND TO CREATE A CLUSTER NODE
docker-machine create --driver exoscale 
--exoscale-api-key $CLOUDSTACK_KEY 
--exoscale-api-secret-key $CLOUDSTACK_SECRET_KEY 
--exoscale-instance-profile small 
--exoscale-disk-size 10 
--exoscale-image ubuntu-14.04 
--exoscale-security-group swarm 
--swarm 
--swarm-master 
--swarm-discovery="consul://$(docker-machine ip consul):8500" 
--engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" 
--engine-opt="cluster-advertise=eth0:2376" 
--engine-label="apps" 
swarm-master
KV STORE (CONSUL)
▸ Consul
▸ services
▸ nodes
▸ key-value
▸ multi-datacenter
▸ health- check
▸ REST or DNS api
COMPOSE FEATURES
▸ control your cluster straight from your shell
▸ networking support
▸ environment variables
▸ support for docker log driver
▸ scaling
▸ filters
The node filters are:
constraint
health
The container configuration filters are:
affinity
dependency
port
OUR DEMO INFRA COMPOSE FILE
ghost:
image: ghost
restart: always
ports:
- 2368
volumes:
- /home/ubuntu/conf-files/
config.js:/var/lib/ghost/config.js
environment:
- DB_URI=swarm_db_1
- NODE_ENV=production
log_driver: "syslog"
log_opt:
syslog-address: "udp://
185.19.29.213:5000"
syslog-tag: "ghost"
db:
image: postgres:9.3
restart: always
environment:
DB_PASSWORD: postgres
DB_USER: postgres
DB_NAME: ghost
ports:
- 5432
lb:
image: lalu/haproxy-consul
restart: always
volumes:
- /home/ubuntu/conf-files/
haproxy.ctmpl:/tmp/haproxy.ctmpl
- /home/ubuntu/conf-files/consule-
template.conf:/tmp/consule-
template.conf
ports:
- "80:80"
- "8001:8001"
command: -consul 185.19.29.213:8500
COMPOSE COMMANDS
▸ docker-compose up (-d) <container>
▸ docker-compose stop / start / restart <container>
▸ docker-compose ps
▸ docker-compose logs
OVERLAY NETWORK
▸ /etc/hosts
▸ dns with consul
▸ Kernel >3.16
▸ - udp 4789 Data plane (VXLAN)
▸ - tcp/udp 7946 Control plane
▸ no more links support (use service discovery)
▸ need to run compose with —x-networking argument
SERVICE DISCOVERY
▸ registrator informs consul when services come on/offline
▸ patch to support overlay network (now merged)
▸ currently support only one network
SCALING
COMPOSE
▸ As simple as:
▸ docker-compose —x-networking scale app=5
CONSUL-TEMPLATE
▸official haproxy image extended with consul-
template
#templating system snippet
backend ghost
option forwardfor # add the X-Forwarded-For header
http-request set-header X-Forwarded-Port %[dst_port]
balance roundrobin{{range service "ghost"}}
server {{.ID}} {{.Address}}:{{.Port}}{{end}}
LOGGING
EASILY SET UP AN ELK WITH COMPOSE
▸ docker-compose up -d
▸ add this in your docker-compose.ml file service definition
log_driver: "syslog"
log_opt:
syslog-address: "udp://185.19.29.213:5000"
syslog-tag: "ghost"
MONITORING
CADVISOR
▸ Collect per host container metrics
▸ Some visualisations
▸ not centralised enough
PROMOTHEUS
▸ Graphing



▸ Alerting
ALERT HighMemoryAlert
IF container_memory_usage_bytes{image="ubuntu:14.04"} > 1000000000
FOR 1m
WITH {}
SUMMARY "High Memory usage for Ubuntu container"
DESCRIPTION "High Memory usage for Ubuntu container on {{$labels.instance}} for
container {{$labels.name}} (current value: {{$value}})"
WHAT IS STILL MISSING ?
▸ secret handling
▸ ansible vault
▸ hashicorp vault
▸ Lots of discussion about this on github
▸ Discovery service with multiple overlay network support
▸ support for multiple networks in consul (not sure if it can be achieved
with competitors either yet)
▸ Support in provisioning docker module (Ansible is really good with that)
THANKS TO
▸ Exoscale
▸ hashicorp
▸ gliderlabs
▸ sirile
▸ progrium
▸ Docker for all the tools
QUESTIONS ?
@MBUFFENOIR
https://github.com/skippbox/docker-on-cluster-howtos

Contenu connexe

Tendances

Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016Walid Shaari
 
Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1dotCloud
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To RunningGiacomo Vacca
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesSreenivas Makam
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux ContainerBalaji Rajan
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionSparkbit
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJustyna Ilczuk
 
Docker introduction
Docker introductionDocker introduction
Docker introductionLayne Peng
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and HowSneha Inguva
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleRobert Reiz
 
Docker Machine & Docker Swarm
Docker Machine & Docker SwarmDocker Machine & Docker Swarm
Docker Machine & Docker SwarmGuillermo Lucero
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XJérôme Petazzoni
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersJérôme Petazzoni
 

Tendances (20)

Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
Docker Started
Docker StartedDocker Started
Docker Started
 
Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker
DockerDocker
Docker
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Docker Machine & Docker Swarm
Docker Machine & Docker SwarmDocker Machine & Docker Swarm
Docker Machine & Docker Swarm
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things Containers
 

Similaire à The state of the swarm

Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric Ahn
 
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 CologneD
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Dockermsyukor
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarmHsi-Kai Wang
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Partner S.A.
 
Hybrid (Windows + Linux) Apps with Docker Swarm
Hybrid (Windows + Linux) Apps with Docker SwarmHybrid (Windows + Linux) Apps with Docker Swarm
Hybrid (Windows + Linux) Apps with Docker SwarmRuncy Oommen
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker SupportSujay Pillai
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionVincent Composieux
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...NLJUG
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesJérôme Petazzoni
 

Similaire à The state of the swarm (20)

Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 
From zero to Docker
From zero to DockerFrom zero to Docker
From zero to Docker
 
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
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Hybrid (Windows + Linux) Apps with Docker Swarm
Hybrid (Windows + Linux) Apps with Docker SwarmHybrid (Windows + Linux) Apps with Docker Swarm
Hybrid (Windows + Linux) Apps with Docker Swarm
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker Support
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure Detection
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 

Dernier

Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 

Dernier (17)

Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 

The state of the swarm

  • 1. THE STATE OF THE SWARM HOW CLOSE TO PRODUCTION READY ARE WE ? 7 / 1 /2016
  • 2. HI ▸ Mathieu Buffenoir ▸ twitter://@MBuffenoir ▸ mail://mat.buff@gmail.com ▸ founder bity.com (running on docker on exoscale) ▸ VP swiss bitcoin association ▸ https://github.com/skippbox/docker-on-cluster-howtos
  • 3. WHAT’S NEW IN DOCKER ECOSYSTEM ? ▸ Docker 1.9 ▸ Networking in the swarm ▸ Compose 1.5 ▸ environnement variable ▸ Docker-machine ▸ Added cloud providers support
  • 4. WHAT DO WE NEED IN PRODUCTION ? ▸ Provisioning / orchestration (Swarm) ▸ Service discovery (consul / etc / zookeeper …) ▸ Logging (ELK, Loggly , syslog …) ▸ Monitoring (Promotheus, sensu, sysdig …)
  • 5. LET’S CREATE A LITTLE DEMO INFRASTRUCTURE
  • 7. DOCKER MACHINE ▸ cloud provider drivers (12 as of today) or bare metal ▸ some handy features ▸ ssh / scp ▸ One command to control your node or cluster directly from your shell: ▸ eval $(docker-machine env --swarm swarm- master) ▸ docker ps
  • 8. ONE COMMAND TO CREATE A CLUSTER NODE docker-machine create --driver exoscale --exoscale-api-key $CLOUDSTACK_KEY --exoscale-api-secret-key $CLOUDSTACK_SECRET_KEY --exoscale-instance-profile small --exoscale-disk-size 10 --exoscale-image ubuntu-14.04 --exoscale-security-group swarm --swarm --swarm-master --swarm-discovery="consul://$(docker-machine ip consul):8500" --engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" --engine-opt="cluster-advertise=eth0:2376" --engine-label="apps" swarm-master
  • 9. KV STORE (CONSUL) ▸ Consul ▸ services ▸ nodes ▸ key-value ▸ multi-datacenter ▸ health- check ▸ REST or DNS api
  • 10. COMPOSE FEATURES ▸ control your cluster straight from your shell ▸ networking support ▸ environment variables ▸ support for docker log driver ▸ scaling ▸ filters The node filters are: constraint health The container configuration filters are: affinity dependency port
  • 11. OUR DEMO INFRA COMPOSE FILE ghost: image: ghost restart: always ports: - 2368 volumes: - /home/ubuntu/conf-files/ config.js:/var/lib/ghost/config.js environment: - DB_URI=swarm_db_1 - NODE_ENV=production log_driver: "syslog" log_opt: syslog-address: "udp:// 185.19.29.213:5000" syslog-tag: "ghost" db: image: postgres:9.3 restart: always environment: DB_PASSWORD: postgres DB_USER: postgres DB_NAME: ghost ports: - 5432 lb: image: lalu/haproxy-consul restart: always volumes: - /home/ubuntu/conf-files/ haproxy.ctmpl:/tmp/haproxy.ctmpl - /home/ubuntu/conf-files/consule- template.conf:/tmp/consule- template.conf ports: - "80:80" - "8001:8001" command: -consul 185.19.29.213:8500
  • 12. COMPOSE COMMANDS ▸ docker-compose up (-d) <container> ▸ docker-compose stop / start / restart <container> ▸ docker-compose ps ▸ docker-compose logs
  • 13. OVERLAY NETWORK ▸ /etc/hosts ▸ dns with consul ▸ Kernel >3.16 ▸ - udp 4789 Data plane (VXLAN) ▸ - tcp/udp 7946 Control plane ▸ no more links support (use service discovery) ▸ need to run compose with —x-networking argument
  • 14. SERVICE DISCOVERY ▸ registrator informs consul when services come on/offline ▸ patch to support overlay network (now merged) ▸ currently support only one network
  • 16. COMPOSE ▸ As simple as: ▸ docker-compose —x-networking scale app=5
  • 17. CONSUL-TEMPLATE ▸official haproxy image extended with consul- template #templating system snippet backend ghost option forwardfor # add the X-Forwarded-For header http-request set-header X-Forwarded-Port %[dst_port] balance roundrobin{{range service "ghost"}} server {{.ID}} {{.Address}}:{{.Port}}{{end}}
  • 19. EASILY SET UP AN ELK WITH COMPOSE ▸ docker-compose up -d ▸ add this in your docker-compose.ml file service definition log_driver: "syslog" log_opt: syslog-address: "udp://185.19.29.213:5000" syslog-tag: "ghost"
  • 21. CADVISOR ▸ Collect per host container metrics ▸ Some visualisations ▸ not centralised enough
  • 22. PROMOTHEUS ▸ Graphing
 
 ▸ Alerting ALERT HighMemoryAlert IF container_memory_usage_bytes{image="ubuntu:14.04"} > 1000000000 FOR 1m WITH {} SUMMARY "High Memory usage for Ubuntu container" DESCRIPTION "High Memory usage for Ubuntu container on {{$labels.instance}} for container {{$labels.name}} (current value: {{$value}})"
  • 23. WHAT IS STILL MISSING ? ▸ secret handling ▸ ansible vault ▸ hashicorp vault ▸ Lots of discussion about this on github ▸ Discovery service with multiple overlay network support ▸ support for multiple networks in consul (not sure if it can be achieved with competitors either yet) ▸ Support in provisioning docker module (Ansible is really good with that)
  • 24. THANKS TO ▸ Exoscale ▸ hashicorp ▸ gliderlabs ▸ sirile ▸ progrium ▸ Docker for all the tools