PSA: Host OS Updates & openBalena

I felt it was worth clarifying the status of Host OS updates when using the openBalena ecosystem as there are a couple of conflicting posts which are being referenced when users ask about the feature.

As per the openBalena repository README (see here) the Host OS update feature is not currently supported, however I acknowledge that it is technically possible to update a current balenaOS device remotely. The reason that we do not support this is due to the fact that the process is being changed in the future for a more robust mechanism.

The new process, which is being worked on, will be consistent across balenaCloud/openBalena and follow more closely the application update model. It will be a far more controlled process leading to safer OS updates and less manual interventent. The plan is to allow these updates to be controlled like the application services are meaning pinning a device to an OS release, rolling back to previous releases etc, should be possible.

5 Likes

Hi, thanks for clarifying that matter

Will be possible to migrate devices to a new openbalena server once it supports remote updates?

Hi, I believe that should be possible yes.

Hi Balena-Team,
some time passed by and I am quite curious to hear about the progress on this topic.

We are very excited about BalenaOS and consider to use it within a project (custom board) running already. The only disadvantage that blocks us is the lack of support for host app updates via openBalena. Therefore it would be great to get an update as well as an indication of what the plannings (timeline) are.

1 Like

Just a quick push, we really like to see something there as well.

Is there generally spoken less effort lately in developing openBalena or are you waiting for more community contribution?

Best

1 Like

I would be interested as well. Is @richbayliss who started this thread still working for/active in Balena, or is there someone with his expertise in Balena?

Also, if wanting to contribute, is there documentation on the Host OS Update feature - how it works?

Asides, Host OS updates should not be tied to the dashboard in any way, even that would need an API to the balena server(s), so it looks like open-balena is intentionally a different code base than what balena uses for the cloud. True or false?

@bkaindl He appears to be working for a different company as of a year ago and not involved since.

… looks like open-balena is intentionally a different code base than what balena uses for the cloud. True or false?

openBalena is a subset of the balenaCloud code base and is missing features such as device proxy, which is used for the current OS HUP process (i.e. there is an entity that terminals into the hostOS and runs update commands). This is one of the reasons oB is still beta, since we do not (can not) offer the current HUP architecture in the product variant.

The HUP code is here: GitHub - balena-os/balenahup: BALENA Host os UPdater.

We are working on a target state based HUP process, which will not require a device proxy/SSH to initiate this flow. Once this is available openBalena gets HUP functionality by default.

1 Like

For anyone interested in automated host updates with openbalena, we have developed a layer on top of meta-balena (the host OS base layer) which provides this functionality. We are working to release this to the open source community, and it functions alongside open-balena-admin which is necessary to create custom device types (if you have custom hardware) as well as the balena_os user needed for the automated OS build process using the bundled jenkins build scrips. So bottom line is that as long as you are using (or willing to use) custom host OS builds, this is possible and currently working in a production environment - and hopefully coming your way soon.

2 Likes

@ab77 is there any update on this or a timeline as to when it will be available for openBalena?

I would also be very interested in an update on this matter.

1 Like

Hello @g-corrigan @golemun

is there any update on this or a timeline as to when it will be available for openBalena?

One update could be that we have introduce the v3 target state into https://github.com/balena-io/open-balena-api/pull/687 . Now all other bits and bytes need to be developed and find their places. As of now we may not be able to communicated any detailed timeline.

Best regards
Harald

1 Like

One question: Am I able to update a balena application remotely right now using OpenBalena?

You can update your Balena applications right now using OpenBalena.
The only thing missing is remote Host OS updates, so the OS itself.

@bversluijs : What are the required steps to achieve that?

I was looking over the documentation: balena CLI Documentation - Balena Documentation

First and foremost, applications are renamed to fleets. So when talking about fleets, I’m talking about applications :slight_smile:

Here are the steps you’ve to follow in order to create a manageable fleet and create releases for that fleet:

  • First, you’ve to create an openbalena instance, obviously.
  • Then, you’ve to create a fleet (when logged in) via the CLI, using balena fleet create <name>.
  • When the fleet is created, you can deploy releases using balena deploy <fleet>.

Using these steps, you can deploy releases to fleets,


And last but not least, to create an image for your devices, you’ve to use balena os configure <image> --fleet <fleet>.

Hope this helps :slight_smile:

Hi there,

If I already done those steps.

What’s strange is that I don’t see any device online. Here’s the output of the balena --fleets:

I want that when I deploy changes to my fleet, all my online devices to have new changes of the balena app.

PS. - For the image creation I am using this command:
DEBUG=1 balena preload ./image.img --fleet <app-name> --splash-image logo.png --commit latest

because the device at first it’s not connected to the internet, only afterwards the user would specify his router credentials and the Raspberry Pi would get the internet connection.

As far as I know, the preload command only adds the containers of the release of the specified fleet to the image, it doesn’t configure the image to register with that fleet. So you’ve to configure it first using balena os configure as mentioned in my previous post. Try that first, see if it works, and if so, you can then use the preload command to test if the containers will also be present at boot time.

But I’d try the balena os configure command first, flash the image and boot the device and see if it comes online and register itself with the fleet.


Maybe if you’re still having issues, open a new topic describing your problem. Discussing it here further will pollute this topic :slight_smile:

1 Like

Thanks @bversluijs , that solved my issue!
Run balena os configure and only after that balena preload

Hope it helps!