Docker swarm is a clustering and scheduling tool for Docker containers. With this method, IT or developers can establish and manage a cluster of Docker nodes as a single virtual system. With swarm method can also exists natively for Docker engine, the layer between the OS and container images. Swarm mode will integrates the orchestration capabilities of Docker Swarm into the Docker engine.
Clustering is an important feature for the 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. A Docker Swarm cluster also provides the administrator and developer with the capability to add and subtract container iterations as a computing demands change.
When we run a Docker without using swarm mode, you will be execute the container commands, but when you run the Docker in swarm mode, you will be orchestrate the services. You can run swarm services and standalone containers on the same Docker instance.
Configuring Docker Swarm
#for the docker manager
- Raspberry Pi 1
$docker swarm init –listen-addr :2377
$docker node ls
#for the docker worker
- Raspberry Pi-00
- Raspberry Pi-01
$docker swarm join :2377
#back to the docker managers
$docker node ls
Installing The Service
For the services, we will use nginx HTTP server and proxy for this hybrid cloud environment. This is the procedur:
$docker run -d nginx
$docker service create –replicas 3 nginx
$docker service create –name ping00 alpine ping raspberrypi01
$docker create service –name website –publish 80:80 awan-kinton
$docker service inspect website –pretty
So, in this session, we have done on creating HTTP server and proxy environment with nginx for the local Cross-platform Hybrid cloud environment framework.