Little T in the Cog linux

Archive for January 2016

Introducing Project Bakery


What do you find (among other things) at a bakery? Pies of course! I decided it would be a fun project to put a bunch of Raspberry Pi computers into a small enclosure and put it in a rack as a small compute cluster. This was nicknamed Project Bakery.

I didn’t really have a specific use in mind for this, it was more a fun project but it turns out the tiny ARM based computer makes a capable web server (up to a point - it does only have 1GB RAM after all…) so I figure I can run a website on one, an NFS server on another (with a portable hard drive attached) for storage, a separate database server on another (to give both the web and database server the full 1GB RAM) and finally one last Pi as a general dogs body server (SSH access to the platform, build host, etc).

I was originally going to use a small SuperMicro server chassis for the enclosure, replacing the motherboard with the four Raspberry Pi hosts and re-using the disk caddies along the front, but soon realised that all I would end up with then is a small server that was actually slower than the one it replaced. It also has no style points :-)

I’ve ended up going with an old Cisco 2950 chassis that we had lying around at work (which we could no longer use due to a faulty power supply) as it is a nice compact unit which would almost be invisible if mounted near the top of a rack. I took the switch and gutted the insides, keeping only the fan for cooling. I acquired a sheet of perspex/acrylic to use as a base to mount everything on to neatly and set about looking at what I need for the build.

  1. 4x Raspberry Pi
  2. 1x mini switch (with at least 5 ports, one per Pi and one for the external uplink)
  3. 1x USB hub to distribute power to the Pis
  4. 1x power supply (5volt/5amp)
  5. Miscellaneous cables to cobble it all together (micro USB for power, ethernet for networking etc)

The power supply is something I will probably need to upgrade in the future as I haven’t really left myself much overhead in terms of current draw. I originally thought that 5 amps would be ample as testing has shown that each Pi draws about 240mA when idle and plugged into ethernet and about 500mA when going full chat (compiling etc). So my reckoning was 4x Pi’s running all cores hard would draw about 2A, the original power supply for the switch was only 200mA, a typical external hard drive can burst to 1800mA when spinning up and the fan uses about 400mA when going full speed, giving a total of ~4.4 amps at full draw (it would usually sit much lower than this as the drive would only need that sort of draw when spinning up and it would be very unusual to have all four Pi’s thrashing their CPUs at the same time). Having ordered a power supply small enough to fit in the enclosure that is rated at 5A I then went and read the Raspberry Pi foundation recommended power supply FAQ and they say to be safe each Pi needs about 2A! I’ll set it all up on the 5A power supply and see how I get on, but I may need to revisit this as too little power leads to all sorts of issues with random reboots etc (it’s better to go waaaaay more than you need rather than just enough!).

Anyway, I've now just got to wait for the last bits 'n' pieces to turn up and then I can assemble the whole lot (and take photos while I do it!). I'll hopefull have something to show over the next month or so :-)