Hi. I have a very general question about fleets and devices. I am using balena-fin for my project as well as balena cloud. Before moving to this platform, my iot devices were pi3s running a number of applications. My system has about 6-8 applications that may or may not be required depending on the specific use case. The way I have been managing this is to use systemd to disable un-needed applications.
As I am migrating to balenaOS, I am adapting each application into its own container. I should mention that I think I prefer this method rather than enabling dbus and systemd and running all my services in a single container. I realize this would most closely model my current deployment method, but I do want to gain the benefit of isolating the individual services.
I’ve got a few of them migrated and note that each time I add a device to the fleet, all the containers are deployed and started.
Given that each site where I deploy a fin will have different requirements in terms of which services it needs, what’s the best practice for managing this with balena cloud? Do I need to create a unique fleet for every permutation of service requirements? Or do I need to add code to each service to check for a device variable to indicate whether the service should run? If not needed, the service could just sleep indefinitely.
I recognize there are several ways to solve this problem, but wondering if there is an established norm or best practice.
Also another question for the group. What’s the best way to ensure that new devices get their proper network (i.e. wifi hotspot and cellular) configuration files? So far I’ve seen that I need to download and flash the image generated by the balena cloud for my fleet. Once the device checks in, I can then able to go an modify the network config files. Is there a way I can craft the balenaOS img file so that these network config files are already encoded?
Thanks!