The sample can be deployed with either docker-compose (v1.20+ required) or docker swarm. The deployment uses the same configuration script.
This is as simple as
make start_docker_compose
make stop_docker_compose
If you setup more than 1 office, please follow the instructions to increase the VM mapping threshold.
Initialize docker swarm if you have not:
sudo docker swarm init
Then start/stop services as follows:
make start_docker_swarm
make stop_docker_swarm
Follow the instructions to create a swarm. Then setup the swarm as follows:
-
On each swarm node,
- Create a user of the same user id (uid) and group id (gid) as the current user of the manager node.
- Follow the instructions to increase the VM mapping threshold.
-
On the swarm manager, setup password-less acess from the swarm manager to each swarm node:
ssh-keygen
ssh-copy-id <worker>
Finally, start/stop services as follows:
make update # distribute images to swarm nodes
make start_docker_swarm
make stop_docker_swarm