Raspberry Pi Cluster

  • Raspberry Pi
  • C++
  • Ansible
  • pssh

I built a cluster with five Raspberry Pi 4s, all connected through a network switch and backed by a 4GB SSD for network storage. The SSD makes data access quick and keeps things running smoothly across the cluster. Managing the whole thing is pretty seamless, thanks to using Ansible and pssh for automation and parallel command execution across all the nodes.

The tricky part is running this on the Stanford network since I don’t have admin access. To get around that, I’m using Tailscale, which sets up a secure, peer-to-peer network between the Raspberry Pis. This lets the devices communicate as if they’re on the same local network, even though they’re connected through Stanford’s restricted network.

For handling tasks across all the nodes, I’ve got Ansible set up to keep everything in sync, like software installs and system tweaks. And whenever I need to run commands across the entire cluster, pssh lets me do it all in one go, saving a lot of time.

On top of that, I’m using Open MPI to enable parallel computing on the cluster. It makes it easy for the Raspberry Pis to share data and work together on more demanding tasks, like simulations or data-heavy processes. Open MPI handles the communication between the nodes, letting them operate as a single, powerful system.

If you want access to the cluster to play around with, shoot me an email.

Raspberry Pi Cluster image 1