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.
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 https://www.balena.io/docs/learn/manage/filters-tags/#device-tags) 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 https://www.balena.io/docs/learn/manage/serv-vars/#environment-and-service-variables) 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.
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 https://github.com/balena-io-projects/staged-releases 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?