1 00:00:00,001 --> 00:00:01,434 [No Audio] 2 00:00:01,434 --> 00:00:05,934 Let's create our first node using docker-machine create command. 3 00:00:06,001 --> 00:00:07,967 We are using virtualbox as the 4 00:00:07,967 --> 00:00:11,567 driver and we are naming our node manager. 5 00:00:11,567 --> 00:00:15,467 While the node is being created, you can see the Docker 6 00:00:15,467 --> 00:00:19,534 machine is using a custom OS called boot2docker, 7 00:00:19,534 --> 00:00:23,101 and it is using its ISO image to install it 8 00:00:23,101 --> 00:00:27,434 on a virtual machine. For your information, boot2docker 9 00:00:27,434 --> 00:00:30,367 is a minimal Linux OS customized for 10 00:00:30,367 --> 00:00:33,234 containers to run smoothly being lightweight at 11 00:00:33,234 --> 00:00:37,167 the same time. Let's see if the node has been created. 12 00:00:37,267 --> 00:00:40,234 Use docker-machine ls command. 13 00:00:40,234 --> 00:00:45,801 And manager has been created, it is running Docker version 18.06, 14 00:00:45,801 --> 00:00:49,767 and it also has its dedicated IP which is 15 00:00:49,767 --> 00:00:55,301 192.168.99.100. Similarly, we can also 16 00:00:55,301 --> 00:00:58,801 create a couple of more nodes, named worker-1 and 17 00:00:58,801 --> 00:01:01,967 worker-2. Once we are done with our creation, we 18 00:01:01,967 --> 00:01:06,934 can run docker-machine ls again to see if both are running perfectly. 19 00:01:07,701 --> 00:01:09,134 And here they are. 20 00:01:09,867 --> 00:01:14,734 Let's stop this manager node using docker-machine stop manager command. 21 00:01:14,734 --> 00:01:17,434 When we list our nodes, manager 22 00:01:17,434 --> 00:01:21,667 exists but it is stopped. We can start it again 23 00:01:21,667 --> 00:01:24,501 using docker-machine start manager command. 24 00:01:24,601 --> 00:01:28,001 If we want to find specific information about a node, 25 00:01:28,001 --> 00:01:31,767 we can use docker-machine ip manager which provides 26 00:01:31,967 --> 00:01:36,634 IP of manager node. Similarly, we can get IPs of 27 00:01:36,634 --> 00:01:39,801 worker- 1 and worker-2 node. Just like every 28 00:01:39,801 --> 00:01:42,734 other object in Docker ecosystem, we can use 29 00:01:42,734 --> 00:01:45,601 inspect command with docker-machine node as well 30 00:01:45,634 --> 00:01:48,667 use docker-machine inspect command followed by the 31 00:01:48,667 --> 00:01:53,234 name of the node, which is manager here. As you can see, 32 00:01:53,234 --> 00:01:55,567 the inspect command provides a lot of 33 00:01:55,567 --> 00:01:58,701 information about the manager node, including its 34 00:01:58,701 --> 00:02:05,801 MachineName, IPAddress, SSHUser and Port, SSHKeyPath 35 00:02:05,801 --> 00:02:08,366 and some other useful information. 36 00:02:08,934 --> 00:02:12,434 Finally, let's ssh into our manager node using 37 00:02:12,434 --> 00:02:17,101 docker-machine ssh command, followed by name of the node 38 00:02:17,101 --> 00:02:19,301 which again here is manager. 39 00:02:19,301 --> 00:02:22,901 We have navigated to the shell of manager node.