We would like to use Mender for updates- but our population of servers consist of special “gateway” stations that are equipped with a cellular modem to make connection with our main Mender server in the cloud. The special gateway station is also connected to a local LAN of a small number of non-gateway stations which cannot directly see the cloud.
Now we could of course have the gateway station channel all Mender traffic from the non-gateways up to the real Mender server in the cloud- however having each non-gateway pull its own artifact through the expensive cellular link is sub optimal.
Better would be to have the gateway running a mender client that pulls artifacts from the mender server in the cloud and then have the gateway distribute these over the cheap local LAN connections to each non-gateway.
So now in our local LAN it would be ideal to have the gateway be (in addition to being a mender client to pull artifacts from the cloud) ALSO be a mini-mender server to its small local group of non-gateways.
I’m guessing that we are not the first to consider an architecture. Do you have any SIMPLE reference source for a mini-mender server appropriate for a small embedded machine?
Starting with the main Mender sever code in all its complexity does not seem to be an inviting starting point for this effort and so we were hoping that you could point us to some more appropriate example code.
Very interesting questions and is a use-case that we are aware off. We currently do not much have “out-of-the-box” to support this so I can not point you to any documentation or reference implementations. This is something that we intend to improve and discussing with people who have real-life use-cases helps us plan this moving forward. So thank you for reaching out .
This part of the problem is solvable using Mender Update Modules, which is available since Mender 2.0.
When you are using an Update Module, you are essentially only using the Mender client to download artifacts, and then you implement your own method on how this is installed. In your case the Update Module would probably just download the Artifact and store in an appropriate location for re-distributions to non-gateway devices.
Do you have any SIMPLE reference source for a mini-mender server appropriate for a small embedded machine?
Can not say that we have any server code that is suitable to run on an embedded device. The best source of information would be looking at device API’s, which can be used to implement a minimal server with compatible API’s.
But the simplest form of a server to distribute Artifacts in a local network would be a HTTP file server, meaning that your Gateway device could provide a HTTP file server with the Mender Artifact to distribute.
On the non-gateway devices you can use standalone mode of the Mender client which is able to fetch Artifacts from an HTTP URL. You would probably need to build your own “trigger” mechanism that instructs the non-gateway devices to fetch the Artifact once the Gateway devices has downloaded an Artifact from the Mender Server.