Thanks for this nice and thorough write-up. It is in line with the understanding I already had.
Do you know if is possible to modify the device ID after having reflashed a device?
I find it a bit cumbersome and errorprone to have to embed the device id already when creating the flash image. I would prefer to:
backup persistent data + device ID (through ssh access)
reflash image (without caring about built-in device ID)
restore persistent data + device ID through (through ssh access)
This way the same flash image could be reused for multiple offline devices.
I’m also looking for a way to do offline updates. I’m not really concerned about Host OS upgrades, as those I’m ok with doing a full reflash, but I would like a way to upgrade the container(s) on a Balena device, either over the network (but not Internet), or via USB stick. Basically I’d like to be able to assign/pick a version of my application’s docker image to a device, just like the dashboard does, but put the relevant files on a USB stick (which I can make available online for my customers to download themselves). The files could be essentially what gets downloaded when a device is online, like some description of what should be running on the device (I assume that’s what’s in the API current) and the actual docker images. Optionally it would be nice to allow an upgrade to the supervisor as well.
Once those files are on the USB stick (I assume they could be protected with some asymmetric key for security) and inserted into the Balena device, I can trigger the upgrade via my container’s web api, web up, or if it has a display, via the UI. One could also wish for a watch script that does the upgrade, or a way to upload the files via a Web Api (which is already in my container’s code).
@HakanL definitely go ahead and submit this to our roadmap at https://roadmap.balena.io - I know you’re not the first person who has expressed this need but you might be the first since the launch of our roadmap!
I voted on that as well, yes, it’s related, but in my case I’m more concerned about upgrades, as I will be able to do the initial deployment connected. But best would be to handle both cases.