Let's now take a look at using Swarm and how we can perform the following tasks:
- Creating a cluster
- Joining workers
- Listing nodes
- Managing a cluster
Let's now take a look at using Swarm and how we can perform the following tasks:
Let's start by creating a cluster, which starts with a Swarm manager. Since we are going to be creating a multi-node cluster on our local machine, we should use Docker Machine to launch a host by running this command:
$ docker-machine create \
-d virtualbox \
swarm-manager
An abridged version of the output you get is shown here:
(swarm-manager) Creating VirtualBox VM...
(swarm-manager) Starting the VM...
(swarm-manager) Check network to re-create if needed...
(swarm-manager) Waiting for an IP...
Waiting for machine...