Let’s build a raspberry pi cluster

Let’s build a raspberry pi cluster

In June 2018 I came in contact with Raspberry Pi’s for the first time and learned to appreciate and love the little boxes. At a cost of 35€ per computer, I originally decided to conduct control experiments for a smart home with the Pi’s. As a programmer, I then came up with the idea of connecting several Pi’s together to form a supercluster – to speed up complex calculations like the Mandelbrot set. The latest goal will be to set up security solutions like honeypots – to secure my home network. But before we get into the individual application areas, the cluster needs to be assembled – and that’s what this post is about.

I did the complete purchase through amazon. Needed:

AmountArticlePriceSum
1Anker Powerport32,99 €32,99 €
1aTTack Cat6 10-Pack Netzwerkkabel12,63 €12,63 €
1TP-Link TL-SG105 Switch17,99 €17,99 €
1Anker Powerline MicroUSB 4-Pack6,99 €6.99 €
4Sandisk 32 GB microSDHC11,00 €44,00 €
4Raspberry Pi 3 Model B+35,99 €143,96 €
1Acryl-Platten15,87 €15,87 €
274,43 €

Two days later the package arrived. Surprisingly, this time it was really just one package – and not the single shipment packaging mania that is usually the case at amazon by now. So there they are, the single parts – after the first “unboxing”. A switch to connect the Pi’s together, including the necessary cables. A charger from Anker with 6 USB sockets and 60W for the power supply. So only one power plug is needed and no 4 power supplies. Matching USB charging cables from Anker. 4 Pi’s, 4 memory cards and the acrylic case. Let the games begin!

I don’t know, how long it’s been since I screwed together a computer. In the days of the ZX-81 or Apple ][ I still soldered the things myself. Nowadays you are a bit limited – laptops can hardly be extended and with normal PCs it is limited to plugging in modules. So screwing – especially screwing something unconventional – was really fun again.

What was really bad about the preparation for tinkering was that the acrylic plates were coated on both sides with some kind of adhesive paper that had to be puzzled off first. The big plates were easy to work with, but those little separator discs that served as underlays for the Pi boards were a real challenge. Good thing my fingernails weren’t quite so short – they are now.

For the first step, one of the acrylic sheets must be prepared. Make sure that one of the plates has a Raspberry pattern. This plate can be seen as a lid and should only be installed at the end.  One of the other plates must now be provided with screws and the washers. To do this, put the screw through the plate from below and put the washer above the plate. The nuts will be used later to fix the Pi board. The next pictures show the construction of the first Pi on the acrylic plate.

After assembling the first Pi- level, the acrylic plate must be prepared for the next level. For the lowest level, insert small spacers that can act as “feet”. In the bags with the components, these small parts are present only four times, so they actually can not be confused with the other parts.

Actually a self explaining step, but I just had the camera at hand and was able to snap a photo. The four spacers are to be attached in the manner shown.

Now the longer spacers are used. Four of them are screwed onto the short elements just installed, fixing the short pins and the acrylic plate.

After screwing the spacers, the structure should look like this, as in the illustration. This also completes the work on the first level. Now proceed in exactly the same way for the other levels. Again the screws and the spacers are put through the holes of the next acrylic plate, the pi is put on and the whole thing is fixed with nuts.

After putting on the second pi plane, spacers are put on again. Then it continues as usual with the assembly of the third and fourth plane. The steps remain the same and you get a little faster per new layer.

Finished is the assembly of the Pi cluster. Finally, the acrylic plate with the Raspberry logo just mentioned is used on top. The plate is then fixed with the round screws – and that’s it!

Two steps still need to be carried out for the successful completion of the hardware construction work: a structured cabling of the power supply and an equally structured cabling of the network connections. First, the USB charging cables are connected to the Pi’s power supply using the small socket.

The large USB- ports are attached to the charger in the same order. The top Pi in the rack gets the rightmost port in the charger, and the bottom Pi in the rack gets the leftmost port.

After that, the network cables are attached in the same way. First, the connection is made in the pi…

… then step by step in the switch. This concludes the hardware work. Then in another post I’ll describe the software side configuration of the pis.