Relative newbie to open balena - but I’m trying to make a new app to deploy a docker-compose file, but we need support for version 3.7. From changing the version numbers, it seems like the highest working version is 2.
Is there some way to work around this?
Our existing docker-compose.yml file requires features from 3.7…
Hi Steve, there’s no way to work around Docker compose features that aren’t implemented but perhaps if you share specifically what you’re trying to do and what features you’re missing, we may be able to suggest a workaround for that. For reference, you can see what features are supported here: https://www.balena.io/docs/reference/supervisor/docker-compose/
I’m discussing this with our development team to see what we can do and if we are able to work around this limitation.
I should mention that we don’t want to build packages via openBalena - as we have our own CI system and CR that we can pull things from. As such, we only really need to push the docker-compose.yml to the device to be executed. All pulls can come from our existing infrastructure.
Right now, we’re using a base OS and implementing most things on our own - but our goal is to move to BalenaOS. Whilst this is kind of changing the topic, can you confirm that the A/B flashing works with OpenBalena and we are able to upgrade remote devices via openBalena using these features? I’m finding it difficult to find the correct documentation on various features.
Hey Steve, let us know what exactly you need from 3.x to see if what you want to do is achievable, but since you’re doing the builds in a separate system, I assume it shouldn’t be an issue to just link the images in the docker-compose that you’ll push to openBalena.
Regarding A/B flashing, I assume you mean doing hostOS updates that support rollbacks? Currently that is not supported in openBalena (which is one of the reasons we still keep it in beta), at least without some manual on-device intervention using SSH, but it is definitely on the roadmap. You can find more info how to do it here: Roadmap for BalenaOS Updates in OpenBalena, but I’ll double-check with the team if that is still up to date.
Just to clarify what my colleague said is still the most accurate method, though since it’s not “officially” supported your mileage may vary until that feature is fully implemented and we move out of beta.
Please do clarify what you mean about A/B flashing, in case we’ve misunderstood!
You’re right on the money regarding the A/B flashing - I guess I’m injecting the Android terms into the discussion due to the $prefixA and $prefixB partitions shown when mounting the SD card in a PC.
If I understand it right, this is the same method for updating the BalenaOS images (although having manual steps right now) - the update goes to the non-active ‘slot’ and is switched by a reboot after update.
I’m yet to sit down with our developers to see what specifics are in the docker-compose.yml we use, hopefully I’ll get to look at that today.
It seems the commands we use that are not currently supported are:
init: true
runtime: nvidia
bind mounts
Likely, these would allow our applications to run out of the box - however we do believe we may be able to work around the majority of these. These do however add a number of layers of complexity to the existing projects.
for init:true I believe this should work as we have tini in balenaOS. see here . but i have no personally used this before
as for runtime: nvidia can you please clarify? do you want to use GPU found on the device? what device type are you using please?
As for bind mounts, are you expecting to mount arbitrary file or directory on the host machine into a container? we do not support that yet but mayeb some of the labels listed here would do the job? otherwise, you can find an example of a workaround here
We’ll have to give it a try - we just looked at the differences between the v2 and v3.7 specification.
Yes, we need to use the GPU component as for cuda processing. The device is a nVidia Jetson Nano (SD card).
At the moment, we have a directory mapped in which contains all the config files. This is delivered with the docker-compose.yml file. I’ll pass the links above to our dev guys for comment. Some of them know the internals of Docker much better than I do.
I just want to leave a comment regarding supported compose format versions. In our company it is becoming more and more a pain being bound to v2.
We are supporting different deployment types, one of them is through balena. Having a “base” docker-compose.yml for native deployments and a docker-compose.balena.yml override for balena specifics works very well for us technically. But as a side effect our base compose file is limited to the version that balena supports.
We want to switch to v3 and are open for suggestions how this can be solved (or worked around?).
To demonstrate how we generate the compose file for our balena deployments this is what we currently do: docker-compose -f docker-compose.yml -f docker-compose.balena.yml configure > balena-release.yml
Can you please specify what exactly you need in the new docker compose version?
We might perhaps offer other means to achieve what you require. Additionally, knowing the exact features you are interested in would help us evaluate how best to address the need.
Having said these, I also internally raised the wider question of supporting docker compose v3.
docker compose 1.28.x require the docker engine 19.03,0 or higher, it is recommended to use this version of docker compose if you have docker engine 19,03.x or later installed,