In order to deploy the federation, we have to first create the master nodes, then add the worker nodes, add a couple of labels to the nodes to allow proper assignation of the different services, and finally we can start "services", which are described in docker-compose.yml files.
In the following we are going to use only one master node. More can be added for improved availability.
-
Create the master nodes
./createMaster.sh
-
On each worker node (a.k.a node of the federation)
./createWorker.sh <Swarm Token> <Master Node URL>
-
Add more informative labels for each worker node, on the swarm master
docker node update --label-add name=<Alias> <node hostname>
<node hostname>
can be found withdocker node ls
<Alias>
will be used when bringing up the services and should be a short descriptive name.