February 2019
Intermediate to advanced
240 pages
5h 25m
English
As we’ve discussed, Swarm’s orchestrator schedules containers (or more strictly, tasks to run containers) on whichever nodes it sees fit. That means we don’t know where a container for a service will end up running.
For educational purposes, we’re going to use a new “visualizer” tool that provides a web interface for seeing the nodes in our clusters, and the containers running on them; Docker provides a handy image for this. You wouldn’t typically run the visualizer in production, but it will give us a feel for how containers are scheduled across the cluster.
Let’s add a visualizer service to our docker-stack.yml file:
| 1: | visualizer: |
| 2: | image: dockersamples/visualizer:stable |
| 3: | ports: |
| 4: | - "8080:8080" |
| |