KE TECHIES
  • +1 (901) 701-TECH
  • St.Louis, US
/

Docker-Swarm


/

Docker-swarm is a group of machines that are running Docker and joined into a cluster. After joining a swarm, they are referred to as nodes.Swarm mode contains Swarm managers and workers, Swarm managers are authorize other machines to join the swarm as workers.Workers are just there to provide capacity and do not have the authority to tell any other machine what it can and cannot do.

  • Docker Swarm is a clustering and scheduling tool for Docker containers. With Swarm, IT administrators and developers can establish and manage a cluster of Docker nodes as a single virtual system.
  • Clustering is an important feature for container technology, because it creates a cooperative group of systems that can provide redundancy, enabling Docker Swarm failover if one or more nodes experience an outage.
  • Docker Swarm uses the standard Docker application programming interface to interface with other tools, such as Docker Machine.
  • we can form a cluster by swarm for that we need two systems/VMs.
  • In first machine/vm we can just run $ sudo docker swarm init then it will give you some token ,so that by using that tocken other systems/VMs can connect to one system.
  • Bascically the system which generates the token is "manager node" and systems which are joining by token will become "worker nodes".
  • we can check running docker containers by $ docker ps in cluster.
  • In manager node we can run $ sudo docker node ls to see all systems/VMs which are in cluster.
  • If we want create a service in cluster, for example run $ sudo docker service create --name my_web --replicas 2 --publish 8080:80 nginx .
  • After creating the service just check the docker containers in both worker and manager nodes by $ docker ps ,there you can see the same container is running in both manager and worker.

/

© 2016 KE TECHIES. All rights reserved | Design by W3layouts