01. [30p] Starting a multi-node Docker Swarm cluster

For this task, we will start a Docker Swarm cluster composed of three nodes (one manager and two workers) on Play with Docker. In order to add a new node to the cluster, you need to press the “Add a new instance button” as shown in the image below.

After adding one or more nodes, you will see a list with each one on the left-hand side, together with their IP and hostname (e.g., in the image below, node1 has IP 192.168.0.28). By clicking on each node, you obtain a window containing a shell into that node.

Subtasks
  1. log into Play with Docker
  2. add three nodes
  3. on node1, initialise a Docker Swarm cluster with the docker swarm init --advertise-addr <IP> command (you can use the IP address shown in the node description on the left-hand size of the Play with Docker page)
  4. add node2 and node3 to the cluster by running the command shown in the output of the cluster creation command (it looks like docker swarm join --token […])
  5. verify that the cluster was created successfully by running the docker node ls command on node1 (you should see all three nodes in the output)
What to upload
  • a text file with the commands given on each node
  • a print screen with the output of the “docker node ls” command on node1
ii/labs/s2/05/tasks/01.txt · Last modified: 2022/05/31 15:18 by radu.ciobanu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0