Hi Mender team,
We have been using Mender for OS A/B updates for some time, which is working well for us. We would like to expand this in two ways:
- We would like to allow our users to see what updates are available and then confirm when they would like allow updates to start at their convenience.
- We would like to extend the update system to additionally support application updates as Mender artifacts.
I believe the first point is adequately supported by the existing Mender client, through the use of state scripts, hooking the Download Exit state change.
The second point makes things more complex. The behaviour of the stock Mender client is to grab the next available update as soon as it is ready and begin the Download state, even if there is both an OS update and an application software update available.
Ideally, our software would present both options to the user, to allow them to see their respective changelogs. Once the user has kicked off the update, it would be up to our application software to decide in which order to install the OS and application updates. It doesn’t look like the stock Mender client would allow such a use case, but please let me know if there is an option I am missing! I have been playing with the “–depends” flag for artifact creation, but this is really more of a server-side field, the Mender client will still grab the first available update rather than let the application software see that both updates are available.
We are very much trying to avoid packaging both the OS and the application software into a single artifact. The application software sees far more frequent updates so we are trying to avoid packaging the whole OS with each.
As a workaround, I was hoping to instead interact directly with the Mender device API to get a list of available updates, and then start the Mender client manually to install them. I can grab a JWT token and interact with the REST endpoints, but I’m a bit stuck for how the specifics of the parameters can be used.
It appears the stock Mender client will poll the deployments/next
endpoint for the next available update artifact.
The /artifacts
endpoint looks more promising, suggesting that it can show the available artifacts for the device. However it appears to only be able to return data when the exact name of the artifact is supplied. Since artifacts must have unique names, it appears to only allow a single returned record, when the artifact name is already known? I have tried to replace the artifact name sent as part of that query with wildcards and empty strings, but these do not work.
Could you advise if there is anything that I can try to:
- Allow the Mender client (or our software) to discover what updates are available before they are deployed
- Allow the Mender client (or our software) to trigger update artifacts in a selected order.
Thank you for your help.