Subfleets and multi-tenant deployments

Hi guys,

we are planning to deploy our app across the globe to various independent customers. I came across a related topic Multi-tenant device deployments, which is 2 years old. Just to verify my thinking is correct.

I would need to create a separate app per customer (different timezones = different deployment times). The deployment can’t be scheduled on Balena Cloud directly, so I need to take care of this on client.
I will have many git remotes, one for each customer/app. I would need to script the deployment so it updates all customers when needed.

It would be super-handy to have a “subfleets”, where one can define deployment strategies, timing while sharing the same codebase.



Hey @filemon,

We have had a lot of updates to improve user experience so at the moment I think you don’t have to create many accounts or separate application for a single codebase that serves many clients as one application is enough.

For your use-case, you can use device tag (more details can be found here to include more information about your device (may be a tag for each client) so you can easily mark which devices belong to a specific client. We also have fleet and device service and environment variables (more details can be found here so you can have the shared configs among the whole fleet or specific configs for any devices in the fleet that allows you to set specific configuration for devices belong to different clients. Staged Release is also an useful feature for your use-case as you can set the whole fleet or any device to a specific commit of your application.

Here are few advises on how to use Balena with your application, for more details you can contact our customer success team and we will help you with bringing your application and devices to Balena.

Is this any help?

Thank you @nghiant2710. So based on your suggestion, I would separate the clients using a device tags.

Then I would pick the given clients for testing, get UUIDs of their devices (using API and the device tags) and use adjusted scripts to deploy to specific clients only. If I’m happy, I would cron deployments to other clients based on the clients zones (another tag). Right?

yeah, you can do that, we also have the CLI and SDKs that you can use in cron deployments

1 Like