Example Voting App adapted for Crafteo Training
You have two hosts at your disposal: host1
and host2
with Docker installed. We'll create a Docker Swarm with 2 nodes.
Commands to run on host1
:
# ssh into host1:
#
# ssh ubuntu@ssh [email protected]
#
# Init Docker swarm from host1
# Keep outputed token!
docker swarm init
Commands to run on host2
:
# ssh into host1:
#
# ssh ubuntu@ssh [email protected]
#
docker swarm join [TOKEN]
# ssh into host1:
#
# ssh ubuntu@ssh [email protected]
#
# Clone Voting App repo
git clone https://github.com/PierreBeucher/example-voting-app.git
cd example-voting-app
# Run the stack
docker stack up voting-app -c docker-stack.yml
App should be accessible (make sure to replace host1
by your actual hostname):