mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-05 16:36:45 +00:00
1.3 KiB
1.3 KiB
class: title, in-person
Operating the Swarm
name: part-2
class: title, self-paced
Part 2
class: self-paced
Before we start ...
The following exercises assume that you have a 5-nodes Swarm cluster.
If you come here from a previous tutorial and still have your cluster: great!
Otherwise: check part 1 to learn how to setup your own cluster.
We pick up exactly where we left you, so we assume that you have:
-
a five nodes Swarm cluster,
-
a self-hosted registry,
-
DockerCoins up and running.
The next slide has a cheat sheet if you need to set that up in a pinch.
class: self-paced
Catching up
Assuming you have 5 nodes provided by
Play-With-Docker, do this from node1:
docker swarm init --advertise-addr eth0
TOKEN=$(docker swarm join-token -q manager)
for N in $(seq 2 5); do
DOCKER_HOST=tcp://node$N:2375 docker swarm join --token $TOKEN node1:2377
done
git clone git://github.com/jpetazzo/orchestration-workshop
cd orchestration-workshop/stacks
docker stack deploy --compose-file registry.yml registry
docker-compose -f dockercoins.yml build
docker-compose -f dockercoins.yml push
docker stack deploy --compose-file dockercoins.yml dockercoins
You should now be able to connect to port 8000 and see the DockerCoins web UI.