Run Ethereum in a docker container on your Raspberry Pi

For a project I need to run geth 1.6 in a docker container on my Raspberry Pi that has raspbian jessie installed. I was looking online for such a docker image, but after some searching I gave up and just created my own docker image.

I am using this image as a basis for other docker images that set a geth node up for a private ethereum blockchain. There are a dozen of Ethereum docker images already, but none (that I could find) played nice with the ARM architecture of the rpi.

You can find the prebuild image on dockerhub/askmike/ethereum-raspbian.

Running ethereum in docker on your rpi is as easy as:

docker pull askmike/ethereum-raspbian:latest
docker run -t askmike/ethereum-raspbian:latest

Note that if you are going to use this for anything serious (or if money is involved) always compile from source! The Dockerfile can be found on github/askmike/ethereum-raspbian-docker. It builds on top of an image that installs golang (so geth can be compiled), you can get that from dockerhub/askmike/golang-raspbian (dockerfile on github/askmike/golang-raspbian).

If the images don’t work for you, please post an issue on github :)

Monitoring nodejs apps with Prometheus

Now we’ve set up Prometheus we can very easily start logging interesting metrics from our nodejs app.

The idea is that we will include an external node module in our app, that module will provide easy functions for the by Prometheus supported metric types. In this post we will use the metric types Counter and Gauge. The module will then expose the statistics using a lightweight express server, which Prometheus will scrape.

more

Setting up Prometheus on Ubuntu 16.04

Prometheus is a great open source monitoring system by soundcloud. I personally use it on a single server to:

  • Monitor the health on the server
  • Monitor web traffic (nginx)
  • Monitor the backend of my apps (written in nodejs)

In this post I’ll install Prometheus (version 1.1.3) and Promdash (a graphical UI from the same creators).

more