SlideShare a Scribd company logo
1 of 33
Todays agenda
● What is docker-machine?
● Which one to use? docker-machine vs
docker remote?
● Quiz
Docker deployment on [physical]host
Docker deployment on any hosts
Cool, can deploy it on many hosts the same way. But..
● manage through ssh on each server
● if new server comes up, install os, configure
stuff, install and manage dockers
● if it is cloud service, manage vendor specific
cloud service since they are heterogeneous
● CRUD operations on VMs requires the
development of SDK or vendor specific
managements
So here comes...
T800
No...this one
Docker-machine
So what does it do? ...in short
● maps local docker cmd to docker command
on remote machine
● execute the same commands you could do
locally on remote machine
● execute CRUD operations on VMs
● switch between hosts: physical, virtual or
cloud seamlessly
Prerequisites
1. VirtualBox
2. docker-engine
3. access to internet
Install docker-machine on Linux
curl -L
https://github.com/docker/machine/releases/do
wnload/v0.3.0/docker-machine_linux-amd64 >
/usr/local/bin/docker-machine
Install docker-machine on MacOS
curl -L
https://github.com/docker/machine/releases/do
wnload/v0.3.0/docker-machine_darwin-amd64
> /usr/local/bin/docker-machine
Install docker-machine on Windows
Go here and download version for your
platform:
https://docs.docker.com/machine/
Hello docker-machine
docker-machine create --driver virtualbox dev1
docker-machine ls
eval "$(docker-machine env dev1)"
docker run busybox echo hello world
Hello docker-machine again
docker-machine create --driver virtualbox dev2
docker-machine ls
eval "$(docker-machine env dev2)"
docker run busybox echo hello world
So what we have?
If you do “docker-machine ps” you will have to
different machines with one containers inside.
A bit real example
docker-machine create --driver virtualbox
webapp
docker-machine ls
eval "$(docker-machine env webapp)"
docker run -d -p 80:80 nginx
So what is this ---driver?
Docker-machine works with VMs and dockers
inside it. Since the VMs can be on hosted
servers, virtual or cloud, it provides drivers that
lets to work with each one the way they require.
Diving to docker-machine create --help
Yeah it’s very long
docker-machine create --help | wc -l
gives 157 options!!!
Filtering the option by driver
docker-machine create -d <driver_name>
gives options only for specified driver filtering out unrelated options
Example: filter for AWS
docker-machine create -d amazonec2
Example: filter for AWS
docker-machine create -d amazonec2
Lab work: Create docker on digitalocean
Create VM with running nginx on digitalocean
using docker-machine help
Access token:
<access token>
Remove those machines, NOW!
docker-machine rm <machine_name>
docker-machine ls
What about connecting to physical servers?
To connect to local physical or virtual servers there are two ways:
1) by creating driverless VM
2) by creating using generic driver
For the first option there needs to be takes additional steps where you need to
create CA certificates using OpenSSL by following article written here
https://docs.docker.com/articles/https/
For the second option what is required is to put your public keys on physical or
virtual server
Lab work: Create generic VM to connect to server
Using docker-machine help create vm with
generic driver
Host IP:
192.168.10.112
What about docker remote?
export DOCKER_HOST=tcp://<remote_id>:<port>
docker run -d -p 80:80 nginx
Quiz
What is the difference between docker and docker-
machine?
1) no difference. docker has remote api
2) docker is the client of docker-machine
3) docker-machine organizes vm and manages dockers
inside
4) docker-machine is the manager of cloud vm for dockers
Quiz
What is the difference between docker and docker-
machine?
1) no difference. docker has remote api
2) docker is the client of docker-machine
3) docker-machine organizes vm and manages dockers
inside
4) docker-machine is the manager of cloud vm for dockers
Quiz
Describe the ways of creating docker VMs to
connect to host machines.
Quiz
How many dockers can I create inside VM
created by docker-machine?
Quiz
What is the difference between VM created with --generic
driver and --virtualbox driver?
1. No difference. Difference only in driver names
2. IPs are different
3. After creating generic requires SSH access, whereas virtualbox SSH
access is generated by docker-machine
4. When you remove virtualbox VM it removes all the data files, whereas
generic removes only vm
Quiz
What is the difference between VM created with --generic
driver and --virtualbox driver?
1. No difference. Difference only in driver names
2. IPs are different
3. After creating generic requires SSH access, whereas virtualbox SSH
access is generated by docker-machine
4. When you remove virtualbox VM it removes all the data files, whereas
generic removes only vm

More Related Content

What's hot

Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Chris Ciborowski
 
Dockerin10mins
Dockerin10minsDockerin10mins
Dockerin10minsDawood M.S
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Adam Štipák
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker, Inc.
 
DockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDocker-Hanoi
 
Docker Workshop for beginner
Docker Workshop for beginnerDocker Workshop for beginner
Docker Workshop for beginnerJirayut Nimsaeng
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker Jonathan Martin
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...Docker, Inc.
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Chris Tankersley
 
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeRhio kim
 
Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralovedamovsky
 
Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Mike Goelzer
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft AzureDocker, Inc.
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from DockerJohn Griffith
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containersMauricio Garavaglia
 

What's hot (20)

Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
Dockerin10mins
Dockerin10minsDockerin10mins
Dockerin10mins
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
DockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadmin
 
Docker Workshop for beginner
Docker Workshop for beginnerDocker Workshop for beginner
Docker Workshop for beginner
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker
 
Docker Started
Docker StartedDocker Started
Docker Started
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
 
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - Gorae
 
Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralove
 
Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
Docker swarm reloaded
Docker swarm reloadedDocker swarm reloaded
Docker swarm reloaded
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft Azure
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from Docker
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containers
 
Docker - introduction
Docker - introductionDocker - introduction
Docker - introduction
 

Similar to Docker-machine

Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班Philip Zheng
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班Paul Chao
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Binary Studio
 
Part 4 Docker Concepts - Docker Machine
Part 4 Docker Concepts - Docker MachinePart 4 Docker Concepts - Docker Machine
Part 4 Docker Concepts - Docker MachineBiswajit De
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )Imo Inyang
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Binary Studio
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentalsAlper Unal
 
Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Khelender Sasan
 
Automating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and ChefAutomating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and Chefkamalikamj
 
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
 RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do... RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...Thoughtworks
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Developmentmsyukor
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyGiovanni Toraldo
 
Docker
DockerDocker
DockerNarato
 
Docker 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop{code}
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & MachineEueung Mulyana
 

Similar to Docker-machine (20)

Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 
Docker
DockerDocker
Docker
 
Docker 101
Docker 101Docker 101
Docker 101
 
Part 4 Docker Concepts - Docker Machine
Part 4 Docker Concepts - Docker MachinePart 4 Docker Concepts - Docker Machine
Part 4 Docker Concepts - Docker Machine
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30
 
Automating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and ChefAutomating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and Chef
 
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
 RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do... RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
 
Docker
DockerDocker
Docker
 
Docker 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & Machine
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

Docker-machine

  • 1.
  • 2. Todays agenda ● What is docker-machine? ● Which one to use? docker-machine vs docker remote? ● Quiz
  • 3. Docker deployment on [physical]host
  • 5. Cool, can deploy it on many hosts the same way. But.. ● manage through ssh on each server ● if new server comes up, install os, configure stuff, install and manage dockers ● if it is cloud service, manage vendor specific cloud service since they are heterogeneous ● CRUD operations on VMs requires the development of SDK or vendor specific managements
  • 8. So what does it do? ...in short ● maps local docker cmd to docker command on remote machine ● execute the same commands you could do locally on remote machine ● execute CRUD operations on VMs ● switch between hosts: physical, virtual or cloud seamlessly
  • 10. Install docker-machine on Linux curl -L https://github.com/docker/machine/releases/do wnload/v0.3.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine
  • 11. Install docker-machine on MacOS curl -L https://github.com/docker/machine/releases/do wnload/v0.3.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
  • 12. Install docker-machine on Windows Go here and download version for your platform: https://docs.docker.com/machine/
  • 13. Hello docker-machine docker-machine create --driver virtualbox dev1 docker-machine ls eval "$(docker-machine env dev1)" docker run busybox echo hello world
  • 14. Hello docker-machine again docker-machine create --driver virtualbox dev2 docker-machine ls eval "$(docker-machine env dev2)" docker run busybox echo hello world
  • 15. So what we have? If you do “docker-machine ps” you will have to different machines with one containers inside.
  • 16. A bit real example docker-machine create --driver virtualbox webapp docker-machine ls eval "$(docker-machine env webapp)" docker run -d -p 80:80 nginx
  • 17. So what is this ---driver? Docker-machine works with VMs and dockers inside it. Since the VMs can be on hosted servers, virtual or cloud, it provides drivers that lets to work with each one the way they require.
  • 18. Diving to docker-machine create --help
  • 19. Yeah it’s very long docker-machine create --help | wc -l gives 157 options!!!
  • 20. Filtering the option by driver docker-machine create -d <driver_name> gives options only for specified driver filtering out unrelated options
  • 21. Example: filter for AWS docker-machine create -d amazonec2
  • 22. Example: filter for AWS docker-machine create -d amazonec2
  • 23. Lab work: Create docker on digitalocean Create VM with running nginx on digitalocean using docker-machine help Access token: <access token>
  • 24. Remove those machines, NOW! docker-machine rm <machine_name> docker-machine ls
  • 25. What about connecting to physical servers? To connect to local physical or virtual servers there are two ways: 1) by creating driverless VM 2) by creating using generic driver For the first option there needs to be takes additional steps where you need to create CA certificates using OpenSSL by following article written here https://docs.docker.com/articles/https/ For the second option what is required is to put your public keys on physical or virtual server
  • 26. Lab work: Create generic VM to connect to server Using docker-machine help create vm with generic driver Host IP: 192.168.10.112
  • 27. What about docker remote? export DOCKER_HOST=tcp://<remote_id>:<port> docker run -d -p 80:80 nginx
  • 28. Quiz What is the difference between docker and docker- machine? 1) no difference. docker has remote api 2) docker is the client of docker-machine 3) docker-machine organizes vm and manages dockers inside 4) docker-machine is the manager of cloud vm for dockers
  • 29. Quiz What is the difference between docker and docker- machine? 1) no difference. docker has remote api 2) docker is the client of docker-machine 3) docker-machine organizes vm and manages dockers inside 4) docker-machine is the manager of cloud vm for dockers
  • 30. Quiz Describe the ways of creating docker VMs to connect to host machines.
  • 31. Quiz How many dockers can I create inside VM created by docker-machine?
  • 32. Quiz What is the difference between VM created with --generic driver and --virtualbox driver? 1. No difference. Difference only in driver names 2. IPs are different 3. After creating generic requires SSH access, whereas virtualbox SSH access is generated by docker-machine 4. When you remove virtualbox VM it removes all the data files, whereas generic removes only vm
  • 33. Quiz What is the difference between VM created with --generic driver and --virtualbox driver? 1. No difference. Difference only in driver names 2. IPs are different 3. After creating generic requires SSH access, whereas virtualbox SSH access is generated by docker-machine 4. When you remove virtualbox VM it removes all the data files, whereas generic removes only vm