Kubernetes to balena, trying to understand multi-app or container deployment

Hi there! First off balenaCloud and balenaOS has been the easiest way to get container app deployments on my RPI3s by far! Seriously massive kudos for that, I have bashed my head on the keyboard quite a bit with HypriotOS and kubernetes. I was about to write off orchestrating ARM processors with containers.

From what I understand the typical use case for balena is to have one application per device, but could be a multicontainer deployment. For my RPIs I want to consume as much of their resources as I can. So I wonder, is it possible to deploy multiple apps to your devices?

I understand balena deployments are one repo. So maybe I could use one repo as a hub to link other repos together via docker-compose.yml?

Also if I have say 4 devices and only want my fronted on 4 and my backend app on 2, is there a way of specifying that in docker-compose.yml?

Hi ! Thank you for the nice words :slight_smile:
Yes, the typical case is you get an application, that can be very complex and composed of multiple containers, and then you have multiple devices running the same application. The multicontainer deployment can use all the resources available on the device, if needed.

The device can belong to a one application at a time, this is, among other things, to have a direct link between your source code and the device that is running it.
In other words, if you have a device - you always know what code it is running. We do not support having multiple applications on a single device, multiple services though are supported, via a multicontainer deployments.

Most of the things supported by the docker-compose file are supported. One notable exception, that we’re working on now, is supporting Dockerfile in build section - you can see forum thread here: Defining context in docker compose - Error: Cannot locate specified Dockerfile: Dockerfile

For the git submodules approach you can try doing it in runtime, as per this forum thread: Cloning git submodules when pushing to resin.io - I would recommend starting here actually and see how it goes ?

Hope this helps and let us know the results :slight_smile: