Mar 06

Cloudy with a chance of Raspberries

Raspberrbee Pi Swarm!

Raspberrbee Pi Swarm!

I have been experimenting with Raspberry Pi computers with the intent of having a small cloud that I can take with me to talks.


  • I can have a good sized cluster in a small volume.
  • Low power draw (6W or less per computer)
  • With the release of the Pi 2, distribution based upon available resources is available.


  • Binaries need to be recompiled in many cases
  • Memory is limited
  • Processing power is limited

The last one, particularly with the new Pi 2 B’s quad core processor is less of an issue. Additionally, the Pi 2 has more memory than its predecessor.

All in all, though, given that many lowend cloud instances have 512M or 1G ram, I think that the Pi is of a decent size for experimentation. I may even try to be masochistic enough to try Hadoop on the cluster.


At present, the cluster consists of the following:

  1. 2 stacks from HDZConcepts
    HDZConcepts Stackable Case

    HDZConcepts Stackable Case

  2. Four Pi B+ — these were on sale, so I purchased some. A couple of days later, the new version was released.

  3. Five Pi 2 B
  4. A 16 port 10/100 switch
  5. Power supply rated for 60 watts

There are a couple of extra PI; one of each flavour. These I’ve been using for some experiments & compiling; I’m not sure what role they will play as yet.



Previously the choices for running Docker with Raspberry Pi’s were limited to either running Archlinux, Raspbian updated to Jessie, or attempting to make the release from [Resin.io](http://resin.io} work with more current versions. I was able, after much time elapsed, to update stock Raspbian to Jessie, then compile Docker 1.4.x on a Pi B+. This took many hours.

Recently, however, a very compelling possibility emerged.

The wonderful people at Hypriot announced that Docker 1.4.1 is working on the Pi 2, and that they have a very lightweight image with it (that works on both Pi B+ and Pi 2)!!! on their blog: Kick-Ass Raspberry Pi 2 having a forbidden love affair with Docker 1.4.1


They have since announced support for 1.5: Heavily ARMed after major upgrade: Raspberry Pi with Docker 1.5.0 – Docker Pirates ARMed with explosive stuff


Swarm is written in Go and the current methodology is rather than to ship a binary executable, the commands are run from within a Docker container. I’d started the process of bootstrapping a Golang container for the Pi when I happily discovered that someone else had done so.

In order to create a swarm container for the Raspberry Pi, clone the git repository for swarm:

The Dockerfile needs to be edited; there are a few differences which are necessitated by the different platform and differences which result. Here is the resulting Dockerfile

Once the Dockerfile has been edited, then compile it like this:

You now have a working swarm container and can run swarm commands as follows:


I have started a repository for Dockerfiles (and changes necessary) for building containers on the Pi. It can be found at aetherical/rpi-dockerfiles.

I will soon post scripts and a demo of using swarm with the raspberry pi….

Leave a Reply

%d bloggers like this: