Docker Swarm Tutorial using Play With DockerIn a previous tutorial we had deployed services in multiple docker containers and then had these services interact with each other using Docker Networking. However the Docker containers were running in a single host machine.
Using Docker Swarm we can scale the services horizontally by deploying the docker containers across multiple host machines. These host machines are called as nodes of a swarm. Docker Swarm is self managed. At any given time we just tell the swarm to make a service up and running, then the swarm it self starts the service on any one of its node. So swarm on it's own distributes the services among the nodes. Another feature of docker swarm is that is self healing. If due to any reason a running service gets terminated on a node, it starts it again. We will see this self healing feature of swarm in the next tutorial we will be deploying the services in Docker Swarm using Docker Stack.
Docker Tutorial - Table Of ContentsDocker Deploying Spring Based WAR Application to Docker Deploying Spring Based JAR Application to Docker Deploying Multiple Spring Boot Microservices using Docker Networking Deploying Multiple Spring Boot Microservices using Docker Compose Deploying Spring Boot + MYSQL Application to Docker Publishing Docker Image to DockerHub Deploy Docker Swarm services using Play With Docker Deploy Docker Swarm services using Docker Stack Deploy Docker Swarm services to multiple AWS EC2 instances Docker Cheat Sheet
VideoThis tutorial is explained in the below Youtube Video.
Lets Begin-Let us have a look at Docker Swarm basics by creating a docker swarm with a single node. Later using Play with Docker we will see how to deploy multiple microservices using multiple nodes. Also in the next post we will be looking into how to deploy docker swarm with multiple microservices using Amazon Webservices(AWS) EC2 instances.
Here we have deployed the employee-consumer and employee-producer in a single node of the docker swarm. Start docker-
systemctl start docker