The following test scenario sets up a Docker Swarm environment with a swarm manager, a discovery backend service and a single Swarm node. For the discovery backend we use 'Consul' which provides the following features:
* Service discovery (interface for register new Swarm nodes; callback method for Swarm managers to react on newly added Swarm nodes; list of registered Swarm nodes)
* Failure detection
* Swarm store (key-value store for persistent the cluster state)

The following diagram visualizes the components and their connections within the test scenario:



Using the Docker command line interface, we can access the local Docker daemon on port 2375 and the Docker Swarm on port 4000. The Swarm manager orchestrates containers on the remote Swarm node using port 2375 while the node registers itself to Consul using port 8500.

 

Setup

Step 1: Preparation


Step 2: Install CoreOS


Step 3: Download Docker images

 

docker pull swarm
docker pull progrium/consul
docker pull hello-world

 

 

Step 4: Setup local network


Step 5: Set up the test scenario scripts