[No Audio]
Let's create our first node using docker-machine create command.
We are using virtualbox as the
driver and we are naming our node manager.
While the node is being created, you can see the Docker
machine is using a custom OS called boot2docker,
and it is using its ISO image to install it
on a virtual machine. For your information, boot2docker
is a minimal Linux OS customized for
containers to run smoothly being lightweight at
the same time. Let's see if the node has been created.
Use docker-machine ls command.
And manager has been created, it is running Docker version 18.06,
and it also has its dedicated IP which is
192.168.99.100. Similarly, we can also
create a couple of more nodes, named worker-1 and
worker-2. Once we are done with our creation, we
can run docker-machine ls again to see if both are running perfectly.
And here they are.
Let's stop this manager node using docker-machine stop manager command.
When we list our nodes, manager
exists but it is stopped. We can start it again
using docker-machine start manager command.
If we want to find specific information about a node,
we can use docker-machine ip manager which provides
IP of manager node. Similarly, we can get IPs of
worker- 1 and worker-2 node. Just like every
other object in Docker ecosystem, we can use
inspect command with docker-machine node as well
use docker-machine inspect command followed by the
name of the node, which is manager here. As you can see,
the inspect command provides a lot of
information about the manager node, including its
MachineName, IPAddress, SSHUser and Port, SSHKeyPath
and some other useful information.
Finally, let's ssh into our manager node using
docker-machine ssh command, followed by name of the node
which again here is manager.
We have navigated to the shell of manager node.