Automatic and Manual updates from Server

From Mender server we would like to deploy latest software to all devices. But when the update actually occurs will be up to Client. - either automatic (as currently setup), or Manual (Client decides when to enable connection to server to check).

  1. Should I simply be disabling and enabling the Mender Daemon when Customer changes mode between Manual and Automatic?
    Or is there a better way?

Some have done it this way, others have written their own client using the rest api and using standalone-mode of mender-client

State scripts is also one possibility, which can give you more control when the update is actually applied.

Also note that we are actually working on a DBUS API in the Mender client, with the intention of solving the use-case you mention in a better way. But this for the future :slight_smile:

1 Like

Thanks, I’ll look more at State scripts.

what are DBUS API currently available for mender-client. So far found these

NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
io.mender.Authentication1           interface -         -            -
.FetchJwtToken                      method    -         b            -
.GetJwtToken                        method    -         ss           -
.JwtTokenStateChange                signal    ss        -            -

Looking for apis so that mender.conf parameters can be modified

@mokul I don’t believe modifying mender.conf is available over dbus. @kacf can you clarify?

Drew

Correct, mender.conf parameters are not modifiable with the D-Bus API.

1 Like

Thanks. @kacf .
we would like to know what are next couple of artifacts available for the current device.
There is no pre-defined artifact_name available. artifact_name is kind of dynamic.
How could we get that while inside the device. D-BUS api or REST api call, any suggestion is appreciated.

There is no such DBus API at the moment, but it is on the roadmap.

However, it is possible to find out by using the GetJwtToken DBus API to get the JWT token and server, and then use that to call the server manually. The response will contain the next update name.

Note that I think the backend will consider the update as having started for that device if you call that endpoint. But this only affects the information in the UI, it doesn’t have any practical effect, as far as I know.

but that call /device/deployments/next requires query parameter artifact_name. in our case we dont have fixed artifiact_name

You can get the current one by calling mender show-artifact.