Option to Download images before installing and starting release

As Fleet Manager, it would be really nice to be able to download the images before pinning to release. That way, we can let end users know a more specific time that the system will be down briefly.

One way we achieved this in our application is to:

  1. Lock updates using the lockfile mechanism: Update locks | balena
  2. Poll the supervisor API for update status. During the update download, “appState” becomes “downloading”. After the update is downloaded but not applied (because of the update lock), “appState” stays"applying": Interacting with the balena Supervisor | balena
  3. You can now notify your user that an update is downloaded and ready to apply.
  4. Based on user action or timing conditions in your application, call the supervisor API one last time to force the update through despite the lockfile being present using the “force” flag: Interacting with the balena Supervisor | balena
  5. The update will be applied, shutting down your services and starting the new ones.