# DockerCon 2017 Demo: Monitoring Docker Swarm with LED's

DevFeed: [DockerCon 2017 Demo: Monitoring Docker Swarm with LED's](<https://devfeed.tech/articles/dockercon-2017-demo-monitoring-docker-swarm-with-led-s-29466.md>)

Original publisher: [Read original article](<https://blog.hypriot.com/post/dockerconaustin2017/>)

Published: 2017-04-20T20:30:34Z

Content type: tutorial

Language: en

Sources: [Hypriot](<https://devfeed.tech/sources/hypriot.md>)

Topics: [Docker](<https://devfeed.tech/topics/docker.md>), [Raspberry Pi](<https://devfeed.tech/topics/raspberry-pi.md>), [Docker Image](<https://devfeed.tech/topics/docker-image.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [arm](<https://devfeed.tech/tags/arm.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-hub](<https://devfeed.tech/tags/docker-hub.md>), [led](<https://devfeed.tech/tags/led.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [multi-arch](<https://devfeed.tech/tags/multi-arch.md>), [raspberry-pi](<https://devfeed.tech/tags/raspberry-pi.md>), [rolling-update](<https://devfeed.tech/tags/rolling-update.md>), [swarm](<https://devfeed.tech/tags/swarm.md>)

## AI overview

A DockerCon 2017 demonstration shows how to monitor Docker Swarm scaling and rolling updates with LEDs on a Raspberry Pi or UP board cluster. The article explains the required multi-architecture Docker images, swarm setup, LED monitor service, scaling commands, and rolling update visualization.

## Source excerpt

At DockerCon 2017 in Austin I gave a presentation of a Raspberry Pi cluster mixed with some UP boards. The audience really liked the visual effects of the Docker Swarm scaling a service up and down. So I show you some background details what you need to run that demo on your Raspberry Pi cluster as well. All the effort played off to build that cluster, to find out how to drive LED's in swarm mode, to put it into my bag and go through customs on my flight from Germany to Austin, Texas. It really was fun to show this the audience and everybody liked it. To enable you to replay the demo with some Pimoroni Blinkt! LED's and Raspberry Pi - regardless if you only have Pi Zeros I want to show you the Docker images I used and the commands to show the scaling demo. The Docker image stefanscherer/monitor is available on the Docker Hub. It is a multi-architecture image that can be used on Linux with Intel or ARM CPU's. So just create a Docker swarm with the usual commands docker swarm init and then join some other workers with the swarm token shown in your terminal. Start the LED monitor First we have to start the LED monitor as a service so that it is running on each node of the Docker swarm. The option --mode global will do this and start one instance on each node. We have to bind mount both the Docker socket and a part of the file system into the container so it can access the /sys/class/fs file system. docker service create --name monitor --mode global \ --restart-condition any --mount type=bind,src=/sys,dst=/sys \ --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \ stefanscherer/monitor:1.1.0 Now we are all set to play with scaling an example service. Scale up There is another multi-arch image that I used for the scaling demo. It is the "whoami" web service that responds the container's hostname. First we create the service with docker service create --name whoami stefanscherer/whoami:1.1.0 As said this works with any Raspberry Pi or the UP board that ha