Initiating the update from the client

Hello,

Is there documentation on how to setup the server and client so that the client initiates the update process using the API instead of the server’s UI?

I use standalone updating to test the Yocto builds on our PCB. However, I would like to write a Python script that will check if there is an update available and another to download and install it.

Thanks.

I use standalone updating to test the Yocto builds on our PCB. However, I would like to write a Python script that will check if there is an update available and another to download and install it.

My team used the following documentation to write our own client to do similar.

https://docs.mender.io/api/2.5/#introduction

Thanks @dellgreen. Sorry I didn’t explain better. I meant do I just upload the artifact to the server and then on the client call the /device/deployments/next API endpoint periodically to check for updates? And is this process the same for production?

I have to upload artifact to server, then create a deployment of that artifact for a list of already approved clients i want it deployed to, then I use our own client to check for updates and download the update if available. However I am only using the open-source version of mender-server, so I don’t know what other options are available to you under the other pricing plans.

That’s the part that is not clear to me. When I created deployments while testing the Raspberry Pi example it started deploying to all the approved devices immediately. So I thought I have to upload the artifact but not create a deployment. I guess I was wrong.

I’m also using the open source version for now because we are still in development.

Hi @amgedr one option would be to disable Mender as a service until you want to actually check for updates and then simply do systemctl start mender-client.

Alternatively, you can just set the polling intervals extremely high and then use mender check-update in some scripting which will force an immediate check and download.

Thanks @drewmoseley. The second option seems better in my case because we want our users to initiate the update from the app on the device.