How to deploy docker Swarm cluster
Introduction to Docker Swarm
Docker swarm is clustering solution for the docker. a cluster is a pool of docker hosts that acts as bit like a single large docker host. Docker Swarm provides standard Docker API, and Docker daemon can use Swarm to transparently scale to hosts. You can also run swarm services and standalone containers on the same docker instances.
Major component of docker swarm
Manager Node: manages the application deployment of the request. Manager node elect a single leader to tackle orchestration tasks.
Worker Node: receive and execute jobs from manager nodes. but you can configure them to run manager tasks exclusively and be manager-only nodes.
Service: is the definition of the jobs to execute on the worker nodes. Service is central structure of the swarm system and the primary root of user interaction with swarm.
Tasks: Command to run inside the container. it is the atomic scheduling unit of swarm. Manager nodes assign tasks to worker nodes according to the number of replicas set in the service scale.
Load Balancing: Swarm Manager uses ingress load balancing to expose the services you want to make available externally to the swarm.
DNS Component: DNS entries will be assigned automatically to each service via internal load balancing within the cluster.
Please setup static IP on manager and worker nodes, ensure network connection between all nodes.Manager Node: docker-master 192.168.1.5Worker Node1: node1 192.168.1.3Worker Node2: node2 192.168.1.6Please make sure docker engine (community engine) 1.12 or later installed.