SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
Docker 1.12 and Swarm
Presented By : Wesley Blake | Technical Director @Prop Data
http://blog.stratotechnology.com/intro-to-docker-1-12-and-swarm-mode/
https://github.com/WesleyCharlesBlake
Feature highlights
● Cluster management integrated with Docker Engine
● Decentralized design
● Declarative service model
● Scaling
● Desired state reconciliation
● Multi-host networking
● Service discovery
● Load balancing (Container-native load balancing.)
● Secure by default (Automated key rotation.)
● Rolling updates
swarm
● A swarm is a cluster of Docker Engines.
● Swarm mode is native in Docker 1.12 RC.
● When in swarm mode, you orchestrate
services.
$ docker swarm
Usage: docker swarm COMMAND
Manage Docker Swarm
Commands:
init Initialize a swarm
join Join a swarm as a node and/or manager
join-token Manage join tokens
update Update the swarm
leave Leave a swarm
node
● A node is a Docker Engine and a member of the swarm.
● There are two types of nodes, managers and workers.
● A manager node schedules service tasks on worker nodes.
● Manager nodes and worker nodes are both capable of executing
tasks.
$ docker node
Usage: docker node COMMAND
Manage Docker Swarm nodes
Commands:
demote Demote a node from manager in the swarm
inspect Display detailed information on one or more nodes
ls List nodes in the swarm
promote Promote a node to a manager in the swarm
rm Remove a node from the swarm
ps List tasks running on a node
update Update a node
{service,task}
● A service defines tasks that are
executed in the swarm.
● service = image + command
● A task is the scheduling and
execution of a service on a node.
$ docker service
Usage: docker service COMMAND
Manage Docker services
Commands:
create Create a new service
inspect Display detailed information on one or more services
ps List the tasks of a service
ls List services
rm Remove a service
scale Scale one or multiple services
update Update a service
Swarm CLI
$ swarm init
$ swarm join
$ service create
$ service inspect
$ service ls
$ service ps
$ service rm
$ service scale
$ service update
Let’s create a
swarm cluster
*Native docker swarm needs hosts to
run docker 1.12*
$ docker-machine create -d virtualbox manager1
$ docker-machine create -d virtualbox worker1
$ docker-machine create -d virtualbox worker2
$ docker-machine create -d virtualbox worker3
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
DOCKER ERRORS
manager1 - virtualbox Running tcp://192.168.99.100:2376 v1.12.0
worker1 - virtualbox Running tcp://192.168.99.101:2376 v1.12.0
worker2 - virtualbox Running tcp://192.168.99.102:2376 v1.12.0
worker3 - virtualbox Running tcp://192.168.99.103:2376 v1.12.0
swarm init
$ eval $(docker-machine env manager1)
$ docker swarm init 
--advertise-addr $(docker-machine ip manager1) 
--listen-addr $(docker-machine ip
manager1):2377
# or ssh directly onto the host:
$ docker swarm init 
--advertise-addr 192.168.99.100 
--listen-add 192.168.99.100:2377
swarm join
$ docker swarm join-token worker
To add a worker to this swarm, run the following command:
docker swarm join 
--token SWMTKN-1-4x502sygb5ws0wwmpevndnp4d55bbxsmts339ylpuh37kiy5sv-dl7jurksix80niuo2ncj9v0ak 
192.168.99.100:2377
$ docker swarm join-token manager
To add a manager to this swarm, run the following command:
docker swarm join 
--token SWMTKN-1-4x502sygb5ws0wwmpevndnp4d55bbxsmts339ylpuh37kiy5sv-79ugs5f3pwvv5jrom5b8dinhs 
192.168.99.100:2377
$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
97zmo0c36dfj675dpg2q2rtg0 worker2 Ready Active
c0q0ckwe3h39fbu9sv33069fo worker3 Ready Active
cjzcy20zu8uarq6g2l8z4eg9n * manager1 Ready Active Leader
dmt4kjgeeem6bsqb2jcmvzuj1 worker1 Ready Active
service {create,inspect,ls}
docker service create 
--replicas 1 
--name vote 
-p 8080:80 
--network go-demo 
--update-delay 10s 
--update-parallelism 2 
instavote/vote
$ docker service ls
ID NAME REPLICAS IMAGE COMMAND
1q10x534o7r7 vote 4/4 instavote/vote
$ docker service inspect --pretty vote
ID: 1q10x534o7r75eji2lvt32atu
Name: vote
Mode: Replicated
Replicas: 4
Placement:
UpdateConfig:
Parallelism: 2
Delay: 10s
On failure: pause
ContainerSpec:
Image: instavote/vote
Resources:
Networks: 52l8ayurqgh3a7937e7pcrttkPorts:
Protocol = tcp
TargetPort = 80
PublishedPort = 8080
service ps
$ docker service ps vote
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
4a4kv8mul0z87l5xx6aetkcnq vote.1 instavote/vote worker1 Running Running 7 minutes ago
6p7bofib6y44ew4olsssqn1ht vote.2 instavote/vote worker2 Running Running 8 minutes ago
3s2cqdwdp57p5ehmtqggcj7kq vote.3 instavote/vote worker3 Running Running 8 minutes ago
2pbv6a7y2x0e74v85c61r5k41 vote.4 instavote/vote manager1 Running Running 7 minutes ago
DEMO this thing!
service scale
$ docker service scale vote=8
vote scaled to 8
$ docker service ls
ID NAME REPLICAS IMAGE COMMAND
1q10x534o7r7 vote 8/8 instavote/vote
$ docker service scale vote=8 redis=3
vote scaled to 8
$ docker service ls
ID NAME REPLICAS IMAGE COMMAND
1q10x534o7r7 vote 8/8 instavote/vote
9sjd1xLX781a redis 3/3 redis
service update
docker service update --image instavote/vote:movies vote
# can result in down time during the update
# perform a rolling update:
docker service update --update-parallelism 2 --update-delay 5s --image instavote/vote:movies
vote
#updates 2 tasks simultaneously, delay of 5s between update,
The end! Blog -> http://blog.stratotechnology.com
Github -> @WesleyCharlesBlake

Contenu connexe

Tendances

Introduction to docker swarm
Introduction to docker swarmIntroduction to docker swarm
Introduction to docker swarmWalid Ashraf
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarmHsi-Kai Wang
 
The age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementThe age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementNicola Paolucci
 
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Mike Goelzer
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & MachineEueung Mulyana
 
Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Mike Goelzer
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introductionrajdeep
 
Container Orchestration with Docker Swarm
Container Orchestration with Docker SwarmContainer Orchestration with Docker Swarm
Container Orchestration with Docker SwarmFrederik Mogensen
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXNGINX, Inc.
 
Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]
Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]
Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]Brice Argenson
 
Swarm - A Docker Clustering System
Swarm - A Docker Clustering SystemSwarm - A Docker Clustering System
Swarm - A Docker Clustering Systemsnrism
 
Docker Machine & Docker Swarm
Docker Machine & Docker SwarmDocker Machine & Docker Swarm
Docker Machine & Docker SwarmGuillermo Lucero
 
Dockercon Swarm Updated
Dockercon Swarm UpdatedDockercon Swarm Updated
Dockercon Swarm UpdatedDocker, Inc.
 
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...Docker, Inc.
 
Docker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker SwarmDocker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker SwarmElton Stoneman
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Deep Dive into Docker Swarm Mode
Deep Dive into Docker Swarm ModeDeep Dive into Docker Swarm Mode
Deep Dive into Docker Swarm ModeAjeet Singh Raina
 

Tendances (20)

Introduction to docker swarm
Introduction to docker swarmIntroduction to docker swarm
Introduction to docker swarm
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
The age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementThe age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster management
 
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & Machine
 
Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Container Orchestration with Docker Swarm
Container Orchestration with Docker SwarmContainer Orchestration with Docker Swarm
Container Orchestration with Docker Swarm
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
 
Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]
Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]
Docker 1.12 & Swarm Mode [Montreal Docker Meetup Sept. 2016]
 
Docker swarm reloaded
Docker swarm reloadedDocker swarm reloaded
Docker swarm reloaded
 
Swarm - A Docker Clustering System
Swarm - A Docker Clustering SystemSwarm - A Docker Clustering System
Swarm - A Docker Clustering System
 
Docker Machine & Docker Swarm
Docker Machine & Docker SwarmDocker Machine & Docker Swarm
Docker Machine & Docker Swarm
 
Dockercon Swarm Updated
Dockercon Swarm UpdatedDockercon Swarm Updated
Dockercon Swarm Updated
 
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
 
Docker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker SwarmDocker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker Swarm
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
What's New in Docker 1.12?
What's New in Docker 1.12?What's New in Docker 1.12?
What's New in Docker 1.12?
 
Deep Dive into Docker Swarm Mode
Deep Dive into Docker Swarm ModeDeep Dive into Docker Swarm Mode
Deep Dive into Docker Swarm Mode
 

Similaire à Docker 1.12 and swarm mode

AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017Amazon Web Services Korea
 
New Docker Features for Orchestration and Containers
New Docker Features for Orchestration and ContainersNew Docker Features for Orchestration and Containers
New Docker Features for Orchestration and ContainersJeff Anderson
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班Philip Zheng
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 Docker, Inc.
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班Paul Chao
 
Nats meetup oct 2016 docker 112
Nats meetup oct 2016 docker 112Nats meetup oct 2016 docker 112
Nats meetup oct 2016 docker 112Nirmal Mehta
 
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Binary Studio
 
What's New in Docker 1.13?
What's New in Docker 1.13?What's New in Docker 1.13?
What's New in Docker 1.13?Michael Irwin
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiMike Goelzer
 
What's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea LuzzardiWhat's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea LuzzardiDocker, Inc.
 
Docker container management
Docker container managementDocker container management
Docker container managementKarol Kreft
 
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
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707Clarence Ho
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekPROIDEA
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOpsandersjanmyr
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & AsteriskEvan McGee
 
Docker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clusteringDocker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clusteringShantanu Deshpande
 
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David YuSteven Puroll
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 

Similaire à Docker 1.12 and swarm mode (20)

AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
 
New Docker Features for Orchestration and Containers
New Docker Features for Orchestration and ContainersNew Docker Features for Orchestration and Containers
New Docker Features for Orchestration and Containers
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Nats meetup oct 2016 docker 112
Nats meetup oct 2016 docker 112Nats meetup oct 2016 docker 112
Nats meetup oct 2016 docker 112
 
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3
 
What's New in Docker 1.13?
What's New in Docker 1.13?What's New in Docker 1.13?
What's New in Docker 1.13?
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
What's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea LuzzardiWhat's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
What's New in Docker 1.12 by Mike Goelzer and Andrea Luzzardi
 
Docker container management
Docker container managementDocker container management
Docker container management
 
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
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
 
Docker
DockerDocker
Docker
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOps
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
 
Docker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clusteringDocker swarm - An introduction to Docker native clustering
Docker swarm - An introduction to Docker native clustering
 
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 

Dernier

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Docker 1.12 and swarm mode

  • 1. Docker 1.12 and Swarm Presented By : Wesley Blake | Technical Director @Prop Data http://blog.stratotechnology.com/intro-to-docker-1-12-and-swarm-mode/ https://github.com/WesleyCharlesBlake
  • 2. Feature highlights ● Cluster management integrated with Docker Engine ● Decentralized design ● Declarative service model ● Scaling ● Desired state reconciliation ● Multi-host networking ● Service discovery ● Load balancing (Container-native load balancing.) ● Secure by default (Automated key rotation.) ● Rolling updates
  • 3. swarm ● A swarm is a cluster of Docker Engines. ● Swarm mode is native in Docker 1.12 RC. ● When in swarm mode, you orchestrate services. $ docker swarm Usage: docker swarm COMMAND Manage Docker Swarm Commands: init Initialize a swarm join Join a swarm as a node and/or manager join-token Manage join tokens update Update the swarm leave Leave a swarm
  • 4. node ● A node is a Docker Engine and a member of the swarm. ● There are two types of nodes, managers and workers. ● A manager node schedules service tasks on worker nodes. ● Manager nodes and worker nodes are both capable of executing tasks. $ docker node Usage: docker node COMMAND Manage Docker Swarm nodes Commands: demote Demote a node from manager in the swarm inspect Display detailed information on one or more nodes ls List nodes in the swarm promote Promote a node to a manager in the swarm rm Remove a node from the swarm ps List tasks running on a node update Update a node
  • 5. {service,task} ● A service defines tasks that are executed in the swarm. ● service = image + command ● A task is the scheduling and execution of a service on a node. $ docker service Usage: docker service COMMAND Manage Docker services Commands: create Create a new service inspect Display detailed information on one or more services ps List the tasks of a service ls List services rm Remove a service scale Scale one or multiple services update Update a service
  • 6. Swarm CLI $ swarm init $ swarm join $ service create $ service inspect $ service ls $ service ps $ service rm $ service scale $ service update
  • 7. Let’s create a swarm cluster *Native docker swarm needs hosts to run docker 1.12* $ docker-machine create -d virtualbox manager1 $ docker-machine create -d virtualbox worker1 $ docker-machine create -d virtualbox worker2 $ docker-machine create -d virtualbox worker3 $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS manager1 - virtualbox Running tcp://192.168.99.100:2376 v1.12.0 worker1 - virtualbox Running tcp://192.168.99.101:2376 v1.12.0 worker2 - virtualbox Running tcp://192.168.99.102:2376 v1.12.0 worker3 - virtualbox Running tcp://192.168.99.103:2376 v1.12.0
  • 8. swarm init $ eval $(docker-machine env manager1) $ docker swarm init --advertise-addr $(docker-machine ip manager1) --listen-addr $(docker-machine ip manager1):2377 # or ssh directly onto the host: $ docker swarm init --advertise-addr 192.168.99.100 --listen-add 192.168.99.100:2377
  • 9. swarm join $ docker swarm join-token worker To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-4x502sygb5ws0wwmpevndnp4d55bbxsmts339ylpuh37kiy5sv-dl7jurksix80niuo2ncj9v0ak 192.168.99.100:2377 $ docker swarm join-token manager To add a manager to this swarm, run the following command: docker swarm join --token SWMTKN-1-4x502sygb5ws0wwmpevndnp4d55bbxsmts339ylpuh37kiy5sv-79ugs5f3pwvv5jrom5b8dinhs 192.168.99.100:2377 $ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 97zmo0c36dfj675dpg2q2rtg0 worker2 Ready Active c0q0ckwe3h39fbu9sv33069fo worker3 Ready Active cjzcy20zu8uarq6g2l8z4eg9n * manager1 Ready Active Leader dmt4kjgeeem6bsqb2jcmvzuj1 worker1 Ready Active
  • 10. service {create,inspect,ls} docker service create --replicas 1 --name vote -p 8080:80 --network go-demo --update-delay 10s --update-parallelism 2 instavote/vote $ docker service ls ID NAME REPLICAS IMAGE COMMAND 1q10x534o7r7 vote 4/4 instavote/vote $ docker service inspect --pretty vote ID: 1q10x534o7r75eji2lvt32atu Name: vote Mode: Replicated Replicas: 4 Placement: UpdateConfig: Parallelism: 2 Delay: 10s On failure: pause ContainerSpec: Image: instavote/vote Resources: Networks: 52l8ayurqgh3a7937e7pcrttkPorts: Protocol = tcp TargetPort = 80 PublishedPort = 8080
  • 11. service ps $ docker service ps vote ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR 4a4kv8mul0z87l5xx6aetkcnq vote.1 instavote/vote worker1 Running Running 7 minutes ago 6p7bofib6y44ew4olsssqn1ht vote.2 instavote/vote worker2 Running Running 8 minutes ago 3s2cqdwdp57p5ehmtqggcj7kq vote.3 instavote/vote worker3 Running Running 8 minutes ago 2pbv6a7y2x0e74v85c61r5k41 vote.4 instavote/vote manager1 Running Running 7 minutes ago DEMO this thing!
  • 12. service scale $ docker service scale vote=8 vote scaled to 8 $ docker service ls ID NAME REPLICAS IMAGE COMMAND 1q10x534o7r7 vote 8/8 instavote/vote $ docker service scale vote=8 redis=3 vote scaled to 8 $ docker service ls ID NAME REPLICAS IMAGE COMMAND 1q10x534o7r7 vote 8/8 instavote/vote 9sjd1xLX781a redis 3/3 redis
  • 13. service update docker service update --image instavote/vote:movies vote # can result in down time during the update # perform a rolling update: docker service update --update-parallelism 2 --update-delay 5s --image instavote/vote:movies vote #updates 2 tasks simultaneously, delay of 5s between update,
  • 14. The end! Blog -> http://blog.stratotechnology.com Github -> @WesleyCharlesBlake