Open source Java projects: Docker Swarm

Container-managed clustering with Docker Swarm

Page 3 of 3

At this point the containers have been stopped as well as the Docker Swarm machines. You can restart those as you wish, using the discovery token that you created earlier.


This article provided an overview of Docker Swarm and demonstrated how to create a Swarm cluster on your local machine. In began with a primer on Docker itself, then reviewed the two most popular Docker clustering technologies, namely Amazon ECS and Docker Swarm, and then it demonstrated, step-by-step, how to create a Docker Swarm cluster. Through the process we discussed Swarm discovery tokens as the unique identifier for a cluster, managers that manage the cluster and deploy containers to agents, and agents that run containers. At this point you should understand Docker Swarm with enough detail to setup and run a local environment.

From here, I recommend that you review the online documentation about running Docker Swarm in production. Production deployment could warrant a full article in and of itself, but the core concepts are similar: run a virtual machine with the Docker Engine, run a discovery backend (their example uses Consul), run the manager by starting the swarm Docker container in "manage" mode, run agents (or nodes as they call them) by starting swarm containers in "join" mode, and deploy containers to the manager, which in turn will distribute them to agents in the cluster.

| 1 2 3 Page 3