Docker Swarm reading list

Docker swarm is an orchestration tool which helps to run your docker container across multiple nodes of the swarm cluster with a swarm manager and back-end service named consul.

Reading list :

https://docs.docker.com/swarm/

How to Configure Docker Swarm

Installation instructions:

  • Installing docker
       sudo apt-get install curl -y
       curl -sSL https://get.docker.com/ | sh
  • Restarting docker in each machine of the cluster
       sudo service docker stop
       sudo nohup docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
  • Start a backend key-store listening service in 8500 port
       docker run --restart=always  -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap
  • Start the swarm manager container
       HUB_LOCAL_IP=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
       docker run --restart=always  -d -p 4000:4000 swarm manage -H :4000 --replication --advertise $HUB_LOCAL_IP:4000 consul://$HUB_LOCAL_IP:8500
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s