I’ve been wanting to look at how BalenaHub works for a while now. I’ve been having device connectivity problems with one of my Pi Projects which I think is related to some dodgy network infrastructure so I decided it would be useful to do some connection quality monitoring.
As I looked around for tools I found this Prometheus tool which I like the look of so I thought I’d get it going. As this has gone on I decided it would be a nice little project to set up as a BalenaHub Block (although possibly in future I might want it to run on the host itself, we shall see).
This runs in a container on my Pi4-64 here and I’m exposing the Prometheus node-exporter on port 80. I can then query that on my device public URL and I get something like this
Then I have the main Prometheus application installed on a cloud server of mine and scraping and I can then graph up all sorts of interesting statistics over time
I’m trying to find out how to add a balena block to a fleet. I’d assumed there was something automated but you seemed to imply there are changes to docker-compose.yml @mpous. I’ve been hunting around but can’t see any details.
Made some progress but it’s been quite hard work. I had to figure out that there’s a build script to upload to Docker Hub, then there are some twiddly bits in the docker buildx platform configuration.
Now what I am fighting is that I am building for arm64 but the balena cli push is failing as it wants arm64/v8
My thanks When you’ve had a chance to go through would be good to catch up with you on how to make this device / platform / archicecture agnostic in the “best practice” way
Made some progress but it’s been quite hard work. I had to figure out that there’s a build script to upload to Docker Hub, then there are some twiddly bits in the docker buildx platform configuration.
I hear you. We are working hard now to take away the need to build and push to somewhere like Dockerhub, and leverage the balenaCloud platform better for blocks. Details in the roadmap section here:
Yeah thanks! It was an interesting experience. Love what you’re doing here of course and actually @mpous 's “call to action” to me to document really helped as I found that when I started testing there were more moving parts to this than I expected.
Not interested in criticising of course as I love where this is going but I do feel from my experience it’s possible to “ease the path” for people for this a bit.
That said I see there are numbers of blocks on there so maybe everybody else found this easy and it was just me that found it hard!
I would say the most important thing for me would be making the blocks hardware/board agnostic as I am running into trouble with this now… (and by that I think that the main issue I was seeing was weirdness for ARM64/v8 versus aarch64 and arm64v8 and so forth.