As of writing this is simply a hobby project at the moment and doesn’t dive into server configuration.

Hardware
- 4x Raspberry Pi 3 B+
- 4x RJ45 Cat6 ethernet cable
- 4x 32GB micro SDHC
- 1x Switch TP-LINK TL-SF1005D 5-Port 10/100Mbps
- 4x USB A to Micro-B
- 1x Anker Port Wall Charger
- 1x USB A to 2.5mm DC 5V Barrel
Requirements
- unix system (linux or mac)
- Pi Image Download
Install Pi Images
Follow this tutorial from Raspberry Pi to install your images to each of the SD cards.
SSH keys
We need a SSH key in order to connect to the cluster without having to type the password every time we access.
In case you don’t have any, run this command and follow the steps.
ssh-keygen -t rsa -b 4096 -C "[email protected]"
`Add the key to your ssh agent, assuming our keys generated are id_rsa and id_rsa.pub
ssh-add ~/.ssh/id_rsa
The enable ssh if it isn’t running:
1 2 | |
Wifi Setup Script
Next we’ll need to set up Wifi on the Master Node only:
1 2 3 4 5 6 7 8 9 | |
Running Commands On Multiple Instances
This can be done by iterating of the NODES list (modify as required) on the Master Node.
Then you can add the required command calls in this mock example, I’ll clear all the data in the /var/www/ directory:
1 2 3 4 5 6 7 8 9 10 11 | |
In Conclusion
This is just the foundation for setting up pi cluster hardware without diving into server configuration as this is just a hobby project at the moment. I may research Kubernetes in the future, of which I may create a follow up article on.