Configuring a Swarm Manager

The swarm manager is responsible for controlling and orchestrating the Docker swarm. It delegates workloads to the worker nodes in the cluster. In this lesson, we will discuss and demonstrate the process of initializing a new swarm and setting up the swarm manager.
Relevant Documentation

– Lesson Reference

– Install Docker Engine on the Swarm Manager:

sudo apt-get update

sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \

curl -fsSL | sudo apt-key add –

sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository \
“deb [arch=amd64] \
$(lsb_release -cs) \

sudo apt-get update

sudo apt-get install -y docker-ce=5:18.09.5~3-0~ubuntu-bionic docker-ce-cli=5:18.09.5~3-0~ubuntu-bionic

sudo usermod -a -G docker cloud_user

– Now initialize the swarm!

– Note: Be sure to use the private IP (NOT the public IP) for the –advertise-addr:

docker swarm init –advertise-addr <swarm manager private IP>

– This shows some basic information about the current status of the swarm:

docker info

– List the current nodes in the swarm and their status:

docker node ls

No token or token has expired.