Building a Raspberry PI cluster


Motivation

Partially for learning, partially because it might come handy, I decided to build my own Rasbperry PI cluster that would run HypriotOS and Kubernetes. If you search the web you'll see others doing it and I used them as a knowledge source. Some are outdated and perhaps sharing my experience might help somebody. Anyway, here is my story starting with

Hardware

  • 4x Raspberry PI 3
  • 4x 32GB microSD - the faster the better
  • 4x network cables
  • 4x USB cables
  • Anker 5 port USB charger
  • Mikrotik hEX router
  • partially self-designed, self 3d printed stack (open source)
I've decided to go with 4 Raspberries because I have got hEX router which has 5 ports and 4 of them seem enough for experimenting anyway. Make also sure to get short USB and network cables. The later should be flat to consume less space. Those are sadly hard to get in Slovenia, perhaps your best bet is an online shop somewhere (in the EU). Anker is a good USB charger that shouldn't have problems feeding the hardware but any powerful enough would do. Also if you manage to find an USB powered router, you don't need second 220V outlet for the router (currently I need two of these - one for the router and the other for the USB power charger) and have instead a short USB cable just like Raspberries do.

The biggest challenges

Getting short and flat network cables wasn't easy. Online shops outside of Slovenia will help.

Manufacturing and designing the stack that keeps everything together. I've based it on an existing one, but enhanced Raspberry holder and created a compatible holder for both Anker USB charger and mikrotik hEX. I missed one thing though - replacing microSD cards is not easy - I've ended up using tweezers. If I ever update the design, I'll definitely make it easier. But overall it is a solid stack and should do the job just fine.

Connecting the beast

Not much here, router and USB charger need to be powered trough an outlet, all Raspberries need both network cable connected to router and USB one to the USB charger and that's it. Lights will blink and that's it.

Next post will deal with HypriotOS nad Kubernetes installation.

A solution to Visual Studio Tools for Docker debugging problem

I you have problems with debugging your .net core application using Visual Studio Tools for Docker - the app simply stops at start and you see a lot of Trying to connect to http://localhost (N/120) messages (where N = [1,120]) - then you might be interested in the workaround.
Which, as it turns out, is quite simple.
Open docker-compose.debug.yml file and simply remove the volumes section:
    volumes:
      - .:/app

Then you can debug it normally.

See the original solution post named Trying to connect to http://localhost/ (1/XXX) in Q and A section.

Mono, Docker, 3.14, WebAPI on NTK 2016

This year I’ll be presenting at Microsoft’s NT Konferenca as I do every year.

As the topic I’ve picked my experience of using Docker I gathered from a real world example. I’ve been building an application that is a combination of PostgreSQL database, Mono/NGINX/WebAPI on server and UWP/Windows10 on client. Server side supports various OS. Target is Linux but it should run on Windows without issues. The combination of server OS and server tools choice drives costs down significantly on one hand and makes it versatile on the other.

Docker helps a lot through the development and final deployment in production. And that’s what talk is all about. 3.14 will play a role as well – showing that there is almost no HW restriction for such a combination on server side. We’ll build and deploy the application through rich demos.

See you there, Monday at 9:00.