Docker Swarm Tutorial - Deploying Services Using Stack
- Created Overlay network
- Start Employee Producer service
- Start Employee Consumer service
In this tutorial we will be again making use of Play with docker for creating Docker Swarm. In the next tutorial we will be deploying the services in multiple AWS EC2 instances using Docker Swarm.
Docker Tutorial - Table Of Contents
Docker 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
Video
This tutorial is explained in the below Youtube Video.Lets Begin-
Implement Docker Swarm using Play With Docker
Let us now create the docker swarm using Play With Docker. Play with Docker provides us with multiple cloud instances with docker installed. Go to Play with Docker. Login with your dockerhub credentials and we get the followingClick on start session. The session is of 4 hours duration.
We will be creating docker swarm with two nodes as follows-
We will be creating two instances and initializing docker swarm.
Now use the command to create worker node in the second instance
docker swarm join --token SWMTKN-1-589ajd3me7whpnck0478a0titc98pcojl3kuyeovgs48rvdcla-13eg6czt4wvmjncbv1g0zzgya 192.168.0.23:2377
In a previous tutorial we had learnt what is docker compose and created a docker compose file.