Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning DevOps with Docker

You're reading from   Beginning DevOps with Docker Automate the deployment of your environment with the power of the Docker toolchain

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781789532401
Length 96 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Joseph Muli Joseph Muli
Author Profile Icon Joseph Muli
Joseph Muli
Arrow right icon
View More author details
Toc

Using Docker Engine to Create a Swarm

Before we create our swarm, let's get a quick overview of the docker-machine cli. Typing docker-machine on your terminal should give you this output:

Using Docker Engine to Create a Swarm

Just below that, we have our list of commands:

Using Docker Engine to Create a Swarm

Note

Remember to always use the help option when you need to clarify something, that is, docker-machine stop --help

To create our first Docker Swarm cluster, we are going to use docker-machine to create our manager and worker nodes first.

Before creating the first machine, a quick overview of our objectives gives us the following: we are going to have four docker-machines, one manager, and three workers; they are all running on VirtualBox, thus there are four virtual machines.

Creating Docker Machines

This command is used to create a new virtual Docker host:

docker-machine create --driver <driver> <machine_name>

This means our Docker host will be running on VirtualBox, but managed and controlled by docker-machine. The --driver option specifies the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime