In this chapter, we have covered Docker Swarm and the clustering process in detail. In order to enhance this knowledge, we recommend the following exercises:
- Set up a swarm cluster that consists of three nodes:
-
- Use one machine as the manager node and two machines as worker nodes
- You can use physical machines connected to one network, machines from the cloud provider, or VirtualBox machines with the shared network
- Check that the cluster is configured properly using the docker node command
- Run/scale a hello world service on the cluster:
-
- The service can look exactly the same as described in the exercises for Chapter 2, Introducing Docker
- Publish the port so that it will be accessible from outside of the cluster
- Scale the service to five replicas
- Make a request to the "hello world" service and check which of the containers is serving the request ...