Cluster Hat Goodness

I've been fortunate enough to get my hands on something magical, at least for me. For the past year I've been wanting to build a pi cluster, but to do this in the most compact way.

I present the cluster hat, a fantastic hat designed to allow you to attach four raspberry pi zero's on top of a pi 2/3 and in return provide you with a nice test cluster.

As for use cases, there are many. I wanted to run a website from it for fun! and to test out and cluster the web servers and explore various configurations.
I'm also looking forward to testing Docker, but I'll take baby steps to get comfortable with the configuration first.

The board supplied is very solid and inserting the pi zero's into place wasn't too much hassle. The pack also comes with four stand off's to securely connect the board to the pi.

A short micro usb cable is also supplied, just long enough to plug into the usb on the pi and into the back of the hat to supply power.

I've put together a small video showing the boot up, take a look:

From here I'll add incremental updates as I work through the configuration to hopefully help others.

So I've brought all PI's online using the downloadable images from the Clusterhat website. Then thought docker was a good addition, however I think v1.12 would be more fun with native swarm, so I'm compiling an arm binary at the moment.

While they all pick up a DHCP address I've found this could be problematic over time so I've added a static (secondary) IP to each pi to allow it to be somewhat portable and ensure the services are not effected by IP change.

I've added the following to each pi incrementing the IP by 1 as I go.

sudo vim /etc/network/interfaces

allow-hotplug usb0:0  
iface usb0:0 inet static  
      address 10.0.1.1 #increment by 1 as you go, pi zero 1 = 10.0.1.2 and so on.
      netmask 255.255.255.0
      network 10.0.1.0
      broadcast 10.0.1.255

With this in place I can setup various clusters without DHCP bothering me if the lease resets.

If your interested in purchasing one please visit the makers website @ http://clusterhat.com/

Ken Darker

Read more posts by this author.