Secret Recipe for Raspberry Pi Server Cluster Revealed
You asked and we listened.
We received tons of positive feedback on this week’s Raspberry Pi server cluster blog post, and requests from fans for a guide on how to build one themselves.
So, we asked Chef Adam – aka high-performance computing systems engineer Adam DeConinck – if he’d be willing to give fans his recipe for making the internet’s most popular pi. He was more than happy to comply, secret sauces and ingredients included:
- Raspberry Pi is powered through a micro-USB port, so use a USB hub to distribute power to all five computers. Any powered hub should work as long as it can provide at least five volts and 700 milliamperes to each Pi.
- You’ll need a basic eight-port Ethernet switch for networking.
- Adam’s rack was custom-built. He had a rough idea of the design when he went to the Lego store, but it evolved as he went along with it; feel free to customize your rack, it just needs to supports the cluster.
- Use one of the Pis as a head node, like in a larger HPC cluster, which provides a shared file system, cluster scheduler and other services. The other four Pis will act as compute nodes, used only for running computation jobs.
Operating system: You can use the most recent version of Raspbian Linux, a variant of Debian which has been designed specifically for the Raspberry Pi. Find instructions for how to install the OS on the servers here.
Software configuration: Adam put this system together as a platform for playing with HPC clusters and system administration, so part of the project was automating the process of setting up all the system software. An open-source tool called Ansible was utilized for this part.
All of Adam’s Ansible playbooks for setting up the cluster can be found on GitHub at https://github.com/ajdecon/ansible-pi-cluster. There are also some more detailed technical notes on the OS installation and networking setup in the README file at that link.
Bon appétit! Let us know in the comments if you plan on cooking up your own cluster.