Is the update management of openBalena open source?

Dear all,

I had a look at openBalena’s GitHub repository. It seems to me that the only parts of openBalena that are actually open source are install scripts that pull the relevant Docker containers for running the server. Am I missing something here?

I was planning to use balenaEngine and a balena supervisor running both on Raspbian and an instance of openBalena running on one of my servers. What I wanted to modify is the logic which IoT devices pull which containers. For example, I want to enable devices to pull containers from multiple applications or not all containers of an application that has multiple containers (where the server tells the devices which containers to pull). Is that possible by modifying Balena? If so, which parts of Balena would I need to modify to do that? Or are closed source parts of Balena required to do that? Or is it impossible to use balena engine + supervisor without balenaOS?

Hey there! The openBalena repo is just an entry point that connects all the other open source containers together, which you can find in the relevant orgs. For example, the API is here: https://github.com/balena-io/open-balena-api, and the supervisor, which sounds like the component you need to modify (as it has the logic to pull containers into the device), is here: https://github.com/balena-io/balena-supervisor

Thank you for the reply. The supervisor together with the API looks what I need. Just to be sure: Is it possible to use modified versions of the API and Supervisor together with balenaEngine and openBalena to manage my devices or is it either

  1. Impossible to connect devices to openBalena using only balenaEngine + supervisor but not balenaOS; or
  2. Impossible to run openBalena with modified versions of the API and supervisor because either of them requires closed source code?

Hi,

  1. Using supervisor with alternative operating system will be possible after many modifications. For example it needs a config.json file present on the boot partition, etc. The supervisor is designed around the balenaOS layout, but that said it is still a Linux distribution and it varies with different kernels across device types, so it is still flexible. You may either fork and modify the supervisor or modify the layout of the OS you will be using to match closely balenaOS. It won’t be a trivial effort though.
  2. There are no closed source dependencies for the supervisor or the openBalena API so you should be fine on that front. The same is true for balenaOS and balenaEngine as well.

Thanks,
Zahari

Thank you for your input. Do you have some documentation that lists the supervisor’s requirements for the OS? Placing a number of files on the boot partition for example would be no problem as long as I know which files to place where. Other things, such as modifying the Linux kernel would be impossible for me.

Hi there,

As Zahari pointed out, it would be possible to run the supervisor on a non balenaOS device, but certainly not something we’re going to actively support. Ultimately all the components are open source, so you should focus your efforts there.

I feel as though I should ask however; is there a reason you don’t want to run balenaOS on your devices? Is there some missing capability or compatibility you need? If so we may find that it’s already on the road map.

Thanks,
James.

Hi James,

my problem with balenaOS is that it requires me to have physical access to my devices. During the Corona crisis, I have no physical access to them because we should stay at home, which means flashing a micro SD card with a custom OS is simply not an option for me. I do, however, have access to those devices via SSH, so installing software on them (e.g. the balenaEngine, Docker) or placing some files on the boot partition is no problem.

You can definitely install balenaEngine or Docker on the device and have it run containers but going from there to having the device provisioned and manageable from an openBalena instance (or balenaCloud) is not going to be straightforward, to say the least, and definitely not something we would want to support.

I was afraid you’d say that. Nevertheless, thank you very much for the information. So for the time being I will probably have to rely on my own solution. Nevertheless I hope to be able to replace at least Docker by the less ressource-hungry balenaEngine some day. But that’s already the topic of another post.