In light of the recent discussion on emonSD logs, earlier discussions on the emonSD update process, the variety of solutions and whether we should support a more generic install/build process this thread is a starting point for thinking about the next step.
The next image is also in our development plan, published last November following the release of the October 18 image. OpenEnergyMonitor Development Plan Outline We noted the following for the emonSD section:
EmonSD Image & Hub software stack
We have recently released the new image, full details and release notes can be read here: emonSD-30Oct18 (Raspbian Stretch Pi3B+ compatible) .
Looking ahead we are interested in exploring a different approach for future image releases. Compiling an image update is currently very time consuming and the upgrade process across major image versions is overly complicated. We want to find a way to upgrade systems without asking to install the latest image and copy data across.
@beaylott at CarbonCoop has been working on an promising approach using Docker. A super lightweight base image is first installed which is then used to launch a docker container containing the OS, Apache, MySQL, Redis, Mosquitto and Emoncms. The data is stored separately to the software stack contained in the docker container, which can be easily changed in its entirety.
Examples of lightweight base images onto which a docker container/s can be installed:
Good example (thanks to jakezp) of an Emoncms self contained docker container with everything running in a single container. I tested this on a synology disk drive and it worked really well:
Alternatively, its possible to have multiple containers for the different system services:
From recent discussions it would also be good to consider:
- systemd support
- logging approach: e.g log2ram
- does the docker approach fit wider community needs? e.g we’ve discussed a generic update script that is independent of emonSD
- installation locations of all the different components
- detection of hardware type: emonbase vs emonpi
What else do we need to consider?