I have 2 clusterhats and have found them to be a nice compact cluster for experimenting and investigating parallel programming and docker swarm. I have configured these so that I can have both of them on my LAN (all the Pis have static addresses on the LAN).
I use one clusterhat for MPI programming in C and Python
- the controller is a 3 Model B
- the RPi Zeros are a combination of plain and W models (WiFi not enabled)
- they are all running Raspbian 10 (buster)
- STD on the controller and Lite on the Zeros
- the controller provides NFS services
- the Zeros mount a user directory from the controller using NFS
- this allows any work I do in the user directory on the controller to be seen by the Zeros
- I have installed both MPICH and MPI4PY, individually on all systems
- I installed these from source
- I ssh into the shared user directory on the controller to do my programming
- parallel programs using all 5 systems are just a bit slower than using just the Zeros
- my favorite parallel program is a Sieve of Eratosthenes where I can ask for the count of primes to 1,000,000,000
The other clusterhat I use for Docker Swarm
- the controller is a 3 Model B
- the RPi Zeros are a combination of plain and W models (Wifi not enabled)
- they are all running Raspbian 10 (buster)
- STD on the controller and Lite on the Zeros
- I have installed docker and docker-compose and configured a Swarm
- the Swarm is 1 manager and 4 workers
- I have run both the voting app and the dockercoin app on this cluster
Note that the controller is an arm32v7 and the Zeros are arm32v6. This is important.
I built all the app images on the controller AND on one of the Zeros. I had to figure out the use of multiple architectures in the Docker images -- this involves creating a manifest for the multi-architecture images.
Something like this with a suitable docker repo (locally or docker hub):
docker push tswoyer/dc-worker:arm32v7
docker push tswoyer/dc-worker:arm32v6
docker manifest create tswoyer/dc-worker:latest tswoyer/dc-worker:arm32v6 tswoyer/dc-worker:arm32v7
docker manifest push --purge tswoyer/dc-worker:latest
Then I can use
image: tswoyer/dc-worker:latest
in my compose file and get the right executable for the right architecture.
My biggest frustration is trying to reproduce work from the Internet related to the differences between x86 examples and ARM examples -- sometimes there is a lot of work to translate an x86 implementation to one that works on ARM. Sometimes I can't find an ARM image that works for me and I can't figure out how to build one.
Now, outside of my learning and experimenting, I haven't found a real-world use for the clusters.