August 2017
Intermediate to advanced
332 pages
9h 16m
English
In order to add a machine to the Swarm, we have to log in to the given machine and execute the following command:
$ docker swarm join \--token SWMTKN-1-253vezc1pqqgb93c5huc9g3n0hj4p7xik1ziz5c4rsdo3f7iw2-df098e2jpe8uvwe2ohhhcxd6w \192.168.0.143:2377This node joined a swarm as a worker.
We can check that the node has been added to the Swarm with the docker node ls command. Assuming that we've added two node machines, the output should look as follows:
$ docker node lsID HOSTNAME STATUS AVAILABILITY MANAGER STATUScr7vin5xzu0331fvxkdxla22n ubuntu-worker2 Ready Active md4wx15t87nn0c3pyv24kewtz ubuntu-worker1 Ready Active qfqzhk2bumhd2h0ckntrysm8l * ubuntu-manager Ready Active Leader
At this point, we have a cluster that consists ...
Read now
Unlock full access