At Lab7, we develop code to manage the flow of data between tasks spread out across a cluster. Of course, having access to a cluster is a requirement for development and test, but as a young and mobile company we don’t necessarily want to be tied to an entrenched cluster, we are young and mobile after all.
Our solution was to create a pair of 4 node clusters consisting of the now famous Raspberry Pis (RPi). Our code is primarily browser based, so we did not need to have a powerful cluster to develop/test our code. At $35 dollars a Raspberry Pi node, plus an additional $20 a node in parts, we can have a mobile cluster that runs in under 4 amps a rack and is cheaper over time than using the cloud. Plus, marketing can cart these racks off to tradeshows to demo our software without any question of shipping expense or support infrastructure.
This article is the first of two posts on how we built and configured our cluster. Here, we provide details on the physical build of the cluster. The next article will describe how we configured the nodes to run SLURM.
Step 1: Models and Templates
We used the free version of SketchUp to create a very high-level mockup on the intended size of the rack and placement of the nodes. The RPi board layout template can be found here: http://www.raspberrypi.org/wp-content/uploads/2012/12/Raspberry-Pi-Mounting-Hole-Template.png
Drag and drop this template image into sketchup and verify that the scale of the image matches the dimensions of the board. The ‘image’ can also be expanded to give a 3D representation of the space occupied by the RPi as well.
Modeling the plexiglass allowed us to play with the overall rack form factor and RPi placement.
From this drawing we determined that we would build our rack sandwiched between two layers of 1/4” 6”x18” plexiglass. 3/8” 4-40 standoffs would be used to mount the RPi(s) to the plexiglass and 1-1/4” 4-40 standoffs would be used to mount the top. 4-40 refers to the screw width and thread count. Therefore 1/4” (smaller would do) 4-40 screws were needed to mount the boards to the stand 3/8” standoffs, while 3/8” 4-40 screws were needed to mount the standoffs through the plexiglass.
SketchUp was then used to make a template of drilling screw holes. This was accomplished by pulling the top plexiglass layer out of the SketchUp model, setting the camera to point at the top of our model (Camera->Standard Views->Top) and setting the camera to an orthographic projection (Camera->Parallel Projection). Getting the Mac OS version of SketchUp to print a correctly scaled drawing is nearly impossible, however, getting the PC version of SketchUp to print a correctly scaled version is as easy as, well, raspberry pie.
Step 2: Drill’n
Printing the screw hole template to scale will allow it to be securely taped to the plexiglass (assuming it was also cut to scale). There are special drill bits needed to drill through plexiglass which are available at local hardware stores. 1/8” bits are needed for the 4-40 screw holes.
Drill the holes as accurately as possible on a drill press, the holes need to be straight and perpendicular to the plexiglass. (Again, all the templates need to be to scale. Verify. Measure twice, cut once!) If the holes end up not being exactly correct (but nearly so), then a dremel can be used to open them up a bit.
Since there are going to be power and ethernet cables running to the cluster, we added a row of 1/4” holes along the long edges of the plexiglass to which the cables were zip-tied. Smaller holes can be used, but a 1/4” hole allows for the knobby end of the zip-tie to be tucked up in the hole.
Cut plexiglass using comes with a protective covering on both sides. Leave that on as long as possible, and certainly don’t take it off until after the holes are drilled.
Step 3: Assembly
Assembly is actually quite easy, requiring only a screw driver, wire snips and possibly a pair of pliers. We assembled ours with a leatherman.
The first part of assembly was to mount a rubber footpad in every corner, just inside the 1-1/4” standoff holes. This helps prevent the plexiglass from sliding across or the screws from scratching the table.
After the foot pads, mount the RPi standoffs to the plexiglass and then the RPi(s) to the standoffs.
Step 4: Cabling and Power
All cables should be secured to the plexiglass with zip-ties or something similar. This will help prevent damage to the RPi(s) if a cable gets pulled.
Our test cluster consists of two racks, one that runs under a SLURM executor, and the other under a PBS executor. A standard 10/100 network switch will do. Power can be an issue as most USB hubs do not deliver enough amps to power even a small cluster. In fact, the only one we identified was the USB 3.0 Super Speed 4 port HUB from Plugable (http://plugable.com/products/usb3-hub81x4) which can supply 900 milliamps to each port.
There you have it. Go have fun!!!