Since remote host upgrades are available on balenaCloud, but not openBalena, can I move a device from openBalena to balenaCloud, then remotely upgrade the host OS, and then move it back to openBalena?
My devices are on balenaOS 2.48.0+rev1 and my openBalena is on v2.x.
No, I have not tried it yet. I was just trying to figure out if that is a potential route. I would like to upgrade to openBalena 3.x at some point, but I have a number of devices in the field on balenaOS 2.48. I’m trying to figure out what the safest route is to upgrade the devices to a version compatible with the current version of openBalena.
copy /mnt/boot/config.json > old-config.json (save this for later)
os-config join ‘json from new-config.json’
Select device in new fleet when it appears
Open Terminal to Host OS
os-config join ‘json from old-config.json’
I am also able to move a device from openBalena to balenaCloud and update balenaOS on the device.
However, I did not try to move the updated device back to my openBalena 2.x.x deployment since it does not support newer versions of balenaOS.
This is the next thing I will test:
Setup new openBalena 2.x.x
Add a device with balenaOS 2.48.0+rev1
Upgrade to openBalena 3.x.x
Move device to balenaCloud
Update device to latest balenaOS
Move device back to openBalena
This seems like it may be a viable upgrade path if there are no other options. However it would be awfully slow since I have a number of devices to upgrade.
If/when the remote host update feature comes to openBalena, will I be able to update my balenaOS 2.48.0 devices that way, or will they need to be updated to a newer version of balenaOS before they can receive remote OS updates?
No, I haven’t had time yet. I’ve had to shift my focus to other projects, but upgrading our openBalena to 3.x is still on my radar. I’ll update if I get the chance to test this out. I’d be happy to hear from anyone else if they’ve tried this upgrade path or something similar.
The problem is that I have a very large number of devices in the field on 2.48. Moving them to balenaCloud and back to upgrade them remotely might work, but it would take a long time. We would likely have to have people in the field to swap out SD cards. Unless anyone has found a better way. Or unless remote host OS upgrades are coming to openBalena anytime soon.
We are not planning adding these features to openBalena, so for the time being your original idea of moving to balenaCloud, upgrading and moving back is reasonable. Of course, in order to do that, you must somehow change the configuration of the device (config.json/os-config) and then back.
You could consider instrumenting GitHub - balena-os/balenahup: BALENA Host os UPdater inside of a privileged container and push that via a release to your fleet. It would need to be extensively tested, but if you can get all the prerequisites in place, it should be possible to upgrade without moving devices at all. If the work can’t be done in the container, the container could first mount config.json, inject an SSH key and then have the hup processed kicked off via SSH (from the container => host).
Swapping SD cards is very reliable albeit expensive option in terms of human resources.