[Free Schematic] Raspberry PI 2 Cluster Assembly Tutorial

This is the third post of a series about Raspberry PI 2 BigData cluster case.

  1. Raspberry PI 2 Cluster Case pt1
  2. Raspberry PI 2 Cluster Case pt2
  3. Raspberry PI 2 Cluster Assembly Tutorial
  4. Build Hadoop Cluster with 5 clicks

Since my last post, Raspberry PI 2 Cluster Case pt2, readers have asked if I could open the schematics of the cluster case with detailed assembly instruction. So, here comes the schematics under Solderpad Hardware License. The license is equivalent to Apache, meaning you can make and distribute for free of royalty. I would encourage you to contribute in forms of improvements and extensions though.

Preparation

1. Boards

pannel-description

Let’s firstly prepare boards. Download the schematics. Please cut out one piece (1) of each and two pieces (2) of board-middle. You can use wood, synthetic, or Acrylic panel to cut out the shapes above. Whatever the material it is, you can use it as long as a panel is no thicker than 3 mm and strong enough to hold a USB charger.

comp-pannel-unwrap

If you cut out a board from Acrylic panel, they will come with protective films on. Peel them first.

comp-pannel
Two pieces of board-middle and one piece of each.

2. Power and Cables

comp-power-cable

  1. One Photive 6-ports 50 watt USB charger.
  2. Six 1ft ( 30 cm ) Cat6 Ethernet cables.
  3. Six 1ft ( 30 cm ) 90 Degree right-angled Micro USB to USB cable.

com-cable

Take a look at the cable. A Micro-USB-to-USB cable must be right-angled, not left-angled. You may also want to check the thickness of a wire, and make sure your cable is thick enough to deliver enough power. The one available to me comes with AWG 26 cable. Several different brands are available, an examples, at Amazon, Ebay, and Alibaba.

3. Screws

You then need screws. Buying right-sized screws are the hardest part of the whole process, at least for me. Here’s the list of them.

comp-screws-0

  1. 2 x M3 Hex Nuts.
  2. 22 x M3 25mm Pillar Screws.
  3. 4 x M3 Whirled Hex Nuts. (could be replaced with four of #1 plain M3 nuts.)
  4. 6 x M3 4mm Screws.
  5. 24 x M2.5 5mm Screws.
  6. 24 x M2.5 Hex Nuts
  7. 24 x M2.5 5mm Pillar Screws.

The four supporting holes in Raspberry PI 2 are 2.7 mm in diameter, and, ideally, you would want to use M2.6 screws and nuts for fixing Raspberry Pi 2 since they fit rather tight. The problem was M2.6 Pillar Screws did not come easy, and I had to custom order M2.6 Pillar Screws. 😦

The ones linked in here are therefore M2.5 screws and nuts. They are available off-the-shelf and smaller in diameter than holes on Raspberry Pi that it would not cause much issue. I hope these holes get bigger in the future so that I could simply use good-old plain M3 screws.

4. Raspberry PI 2 B+

comp-raspberry

  1. 6 x Raspberry PI 2 B+

We do not need to say more here. 🙂 Let’s call them RPI henceforth.

5. Network Switch (Optional)

In case you want to fit a network switch to in the cluster, pick something slim. I picked up one below.

  1. D-Link 8-Port Gigabit Desktop Switch

One thing to remember is that you have a choice not to put a network switch at all. You can simply put Raspberry PI only, and connect them to an existing network. This switch is just there to provide the cluster’s own network.

Assembly

Once you have the components and materials, it’s rather straightforward. Firstly put M2.5 5mm Pillar Screws on boards and tighten ’em with M2.5 Hex nuts like below. You’d have to do this for 6 sets.

assem-1

assem-2

Then fix RPI on the boards with M2.5 Screws.

assem-3

Once you’re done, you’d have six sets. You’d see RPIs on right side are all flipped. In this way, all RPIs’ power inputs are placed right next to USB charger reducing the cluster volume. The big round holes you’d also see are for ventilation.

assem-5

Apply two pieces of double-sided tape on a USB charger supporter. This is to give a bit more strength to the board to support the charger.

assem-6

Place it on the board named board-middle-end like below.

assem-7

assem-8

Then it is time to stack up RPIs. Look carefully how each piece is stacked.

assem-9

assem-10

Once you complete stacking up RPIs, plug in Micro-USB-to-USB cables.

assem-13

assem-14

Once you plug in the cables, place your USB charger in the middle, and close the cluster with board-top. Don’t forget to tighten up with M3 4mm Screws.

assem-15

Now plug in USB ends to the USB charger. See how the boards hold the charger, and clear the entrance for USB ends? 🙂

assem-17

Place the network switch at the bottom layer and close it with board-bottom and four M3 Hex Nuts like below.

assem-18

Then connect your RPIs and the network switch with Cat6 Ethernet Cables.

assem-19

Once you supply power to the charger, all the RPIs will lit up!

assem-20

assem-21

This is how a 6-nodes RPI cluster is assembled. You can replace as many parts as you wish, and modify as much as you want. All these instructions and schematics are here for a template.

if you get to build one, please share yours with #rpicluster hashtag on twitter so that we all can see!!!  Now, here comes the schematics again, and let the fun begin!

E-mail Subscribtion
Subscribe for upcoming posts!
Join Slack
Join my channel!
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

Raspberry PI 2 Cluster Case pt2

This is the second post of a series about Raspberry PI 2 BigData cluster case.

  1. Raspberry PI 2 Cluster Case pt1
  2. Raspberry PI 2 Cluster Case pt2
  3. Raspberry PI 2 Cluster Assembly Tutorial
  4. Build Hadoop Cluster with 5 clicks

 

From Raspberry PI 2 Cluster Case pt1, I drew up a rough sketch with certain goals I set out to. They are,

  1. Able to fit in 6 RPI2 in a small, contained volume.
  2. Has to be stackable.
  3. Able to fit in a power supply and a 8 port network switch for the 6 RPI2.
  4. Able to cool off the cluster with no fan.
  5. Has to be cheap.

Prototyping

I then cut out an Acrylic panel at a near laser shop.

Two RPI2 on a cluster panel

The panel have two big round holes for ventilation, 8 holes for RPI2 mounts, and 8 more holes for pillar screws.

Once you put pillars, it looked like this.

Pillar Screws and mounts on a cluster panel

I put a giant square hole in the center to put a USB charger as power supply. You can see the two big round holes for heat ventilation.

At this point, I was terrorized with fact that I could not put a USB-to-MicroUSB cable to the center USB charger. You see the square hole is completely closed? I found that the panel blocked the USB charger’s USB socket, rendering the charger useless. What a bummer…

Gah! No way!

Of course, my happy story did not end there. I then put a RPI to see if it fitted in. To my disappointment, the mount was just too high. You see USB ports sticks to the upper level panel, and there is space underneath the RPI? That’s bad.

Long Mount
High Mountain

In fact, the mount was just too Long. I figured a mount should be around 4~5 mm in length. On top of that, I put one too many pillar screws. I had to use only the minimum number of them to maintain structure strength.

All in all, three problems.

  1. Entrance to USB charger.
  2. Appropriate Mount screw.
  3. Minimum # of pillar screws.

The Final Result

After Fixing three issues above, I now have this.

6 Nodes RPI2 Cluster
6 Nodes RPI2 Cluster
pt-9
The cluster from different angle.

Those USB-to-MicroUSB cables are only 30 centimeters in length. They still stand out and take up quite a bit of space. Does anyone know where I can get a shorter cable?

8 Ports Network Switch at the bottom stack
8 Ports Network Switch at the bottom stack

Of course You can put the entire cluster on your desk.

A cluster on a desk
A cluster on a desk

Assessment

I’ve run the cluster closed to two months so far. I’ve experienced neither heat issue nor performance hit. No single node has gone down while I’m running Apache Spark/Hadoop in cluster mode. It has been amazingly stable and easy to operate. Although there are few more issues I like to fix up later. (Especially the USB charger cable.)

Let’s move on to JAVA on Raspberry PI next time!

E-mail Subscribtion
Subscribe for upcoming posts!
Join Slack
Join my channel!

Raspberry PI 2 Cluster Case pt1

This is the first post of a series about Raspberry PI 2 BigData cluster case.

  1. Raspberry PI 2 Cluster Case pt1
  2. Raspberry PI 2 Cluster Case pt2
  3. Raspberry PI 2 Cluster Assembly Tutorial
  4. Build Hadoop Cluster with 5 clicks

Once we have bunch of Raspberry PI 2s (RPI2 from now on) and an Apache Spark/Hadoop image file, there is one subtle issue we need to take care of; the case for cluster.

RPI2 Spark cluster running
RPI2 Spark cluster running

Look at my cluster setup. White & black cables tangled up all around. It takes up a lot of space to lay down. Even if RPI2 cluster runs BigData software very decently, I cannot easily recommend you put this mess to on your desk. Something’s got to be done.

First step I took was to test if my current cases were somehow stackable.

Plastic RPI 2 Case
Plastic RPI 2 Cases

It is doable without much hassle, but, as you can see, it is an effective cage to harness the generated heat. If I am to run a cluster in this case for an extended period, chip soldering joints might go wrong permanently damaging a RPI2, not to mention very unstable operating system.

RPI case #2
RPI case #2

So, I bought a second case. It had a unique capacity to keep the lid open to evaporate the heat. Sadly, I could not pile them up.

No way to pile up
No way to pile up

What a mess. 😦  I have to clarify that it is none of case makers’ fault. Raspberry PI is designed as an educational platform with the ease of replacement. You pick *ONE* for your kids to play with. Something goes wrong? Buy another. That’s what 35 USD price tag and credit-card-sized form factor represent from the first place. It’s no wonder all the cases out there are designed for single Raspberry PI.

Then I found this beauty. It was from modmypi.com and looked great. It is very easy to make RPI2 stack to save space, and opened at all sides to let go of heat.

Stackable RPI case (ModMyPi.com)

Just before purchasing the stacker in mass, however, I imagined stacking up six RPI2s in one direction, and wondered how stable that could be. On top of that, if the stacker was that simple, I thought there should be a way to improve it for my particular situation.

Further, I used a USB hub to power up the cluster, but it created more problems than it solved; most USB hubs are underpowered (as low as total 12.5W) for number of RPI2s, it is hard to arrange cables in clean manner. I needed something compact and powerful.

A couple hours of Amazon search found me these babies.

Photive 6 port USB charger
Anker 6-Port USB Charger

They output 50~60W of 5V power, and all have 6 ports. Price ranges from 25 to 35 USD. They are 4 inches (~10 cm) in height, 2.8 inches (~7cm) in width, and 1 inch (~2.5cm) in thickness. They weight 7 ounces (~200g) in average. I just cannot ask more.

I am going to draw up stackable plates, and mill them in CNC for prototyping. We’ll see how things go next time.

E-mail Subscribtion
Subscribe for upcoming posts!
Join Slack
Join my channel!
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

 

Apache Spark 1.4.0 on Raspberry PI 2 Cluster

This is the second post of a series about Raspberry PI 2 BigData Cluster for OSX.

  1. Apache Spark on Raspberry Pi 2
  2. Apache Spark 1.4.0 on Raspberry PI 2 Cluster
  3. One Step Spark/Hadoop Installer for OSX v0.1.0
  4. Build Hadoop Cluster with 5 clicks

 

In the previous post, I’ve shown you a RPI2 cluster with Apache Spark 1.1.1 that has run for three months. Since Apache Spark 1.4.0 is out a few days ago, I’ve just upgraded the cluster.

Apache Spark 1.4.0 comes with SparkR finally. R has such a strong position in DataScience field that it is no surprise R and Spark merge into one. Among the many benefits this integration brings, DataFrame, the primary data structure for data processing in R, is ranked on the top.  This is such a great news that one can expect higher level of R algorithms eventually appear in SparkR. You can read more technical detail in AMPlab’s post

There are also other features and improvements coming in together such as early result of project Tungsten, prettier job monitoring, and numerous bug fixes.

Spark Web Console
Spark 1.4.0

Since it takes time to collect all the bits from various places, I’ve compiled an RPI image for you below. Also, this image comes with extra goodies; Numpy and Scikit-Learn. The two giant pillars in Python DataScience land, and they usually take a few hours each to compile into RPI2. Here, all compiled and cleanly installed.

Following is the summary of installed items

  1. Scala 2.11.6
  2. Hadoop 2.6.0
  3. Spark 1.4.0
  4. Numpy 1.9.2
  5. Scipy 0.15.1
  6. Scikit-Learn 0.16

Download RPI2 node image : 2015-06-21-rpi-spark140.img.7z

*  [2015-11-08] A new raspberry image will be uploaded. old image is removed for now.

 

E-mail Subscribtion
Subscribe for upcoming posts!
Join Slack
Join my channel!

Apache Spark on Raspberry Pi 2

This is the first post of a series about Raspberry PI 2 BigData Cluster for OSX.

  1. Apache Spark on Raspberry Pi 2
  2. Apache Spark 1.4.0 on Raspberry PI 2 Cluster
  3. One Step Spark/Hadoop Installer for OSX v0.1.0
  4. Build Hadoop Cluster with 5 clicks

 

Courtesy of RPI Foundation
Courtesy of RPI Foundation

I think Raspberry PI is a great platform to experience how a small computer could bring difference to every little corner. Here comes my own example. I am a programmer, and, with the recent frenzy of data science, I put my hands on Apache Spark on Hadoop. The thing about the combination is it needs a cluster of computers, at least three, to find out how it works.

There are basically two options; cloud or my own. Long story short (this could be lengthy. For example, look here), none really seems to fully address my need. Then it was last Feb. when a news hit me. Windows 10 on Raspberry Pi 2! It must run Spark!, I thought.

After running Spark/Hadoop on a cluster of six Raspberry Pi 2 for about three months so far, I can say my hunch paid me.

Word Count on RPI cluster
WordCount on RPI2 cluster
Spark WebUI
Spark WebUI
RPI2 Spark cluster running
RPI2 Spark cluster running

Finally, here comes the RPI2 image with following items

  • Scala 2.11
  • Hadoop 2.6
  • Spark 1.3.1

Download RPI2 Node Image : 2015-05-31_rpi-spark.img.7z

I will continue on how to setup a Raspberry PI 2 next time.

*  [2015-11-08] A new raspberry image will be uploaded. old image is removed for now.

 

E-mail Subscribtion
Subscribe for upcoming posts!
Join Slack
Join my channel!