Questions about open fleets for open source projects

Hi,

I’ve been experimenting with an open fleet for WebThings Gateway, to create an OS image for use by DIY smart home users.

We had previously ruled out balenaOS as a base operating system for WebThings Gateway because the per-device pricing structure of balenaCloud wasn’t a good fit for an open source software distribution that anyone can download and use.

I was very interested to learn about open fleets, because it seems this makes it possible for open source projects to provide an OS image that anyone can download and use without the community incurring per-device fees, allowing users to benefit from OTA updates of both the application and host OS.

However, because balenaCloud is really designed for “fleet owners” it allows a level of access to devices which isn’t appropriate when each device in the fleet is owned by a different person and used to automate their own home.

I also noticed that the download page for adding a device to an open fleet appears to be designed to generate a custom image for each device with the option of baking Wi-Fi credentials into the image.

I also noticed that after flashing the image the device appeared to use an internet connection to download and install the application on first boot.

This leaves me with the following questions:

  • Do the open fleet images include a unique ID for a single device, or is it possible to create a generic image that multiple people can download and use?
  • Is it possible to bake an application into an image so that it can run without an internet connection of first boot? (The current first time setup flow for WebThings Gateway involves acting as a Wi-Fi hotspot that a user can connect to to configure network settings, which would fail if the device needed to reach the internet before first time setup can even run)
  • Crucially, is it possible to disable SSH access to devices in an open fleet by the fleet owner but still allow pushing updates for the application and the host OS? In our use case it really wouldn’t be appropriate for the fleet owner to have full SSH access to devices in people’s homes, but we do want to be able to push out software updates to users.
  • Is there a way to give users of individual devices SSH access to their own devices, without having to operate their own fleet?
  • Am I right in understanding that making a fleet public in balenaCloud automatically turns it into an open fleet, such that per-device fees will not be charged to the account holder?

For the future we could potentially consider running our own custom instance of balenaOpen if necessary, but we don’t currently have the resources for that and I’m not sure how easy it would be to customise to our needs.

I was hoping that open fleets could be an easy solution to create an open source WebThings OS image that anyone can use in their own home, whilst I use a paid balenaCloud account to manage a fleet of commercial devices used by businesses.

Is balenaOS the wrong fit for us?

Many thanks

Hey @benfrancis,

On generic balenaOS images and baking an application into an image

Balena provides a way to preload an application into an image and then use it to provision a device. Balena CLI Advanced Masterclass | balena

You could provide the preloaded image to your users, but it does mean that for every version of your app you would have to do the preloading for every device type you want to support, then make these images available to your users. Of course you could automate all of that.

The other option is to let the users join via the balenaHub “add device” dialog. One added benefit is that they can configure their wifi connection from there, which would mean that you could skip the need for a Wi-Fi hotspot on first boot.

On the SSH access questions

I’m afraid that I don’t have good answers for those. There is no built-in way to disable SSH access on devices while keeping the OTA update functionalities, so from the point of view of the WebThings Gateway users, fleet owners are going to have a pretty invasive access to the devices.

And currently there is no way to give individual users an access that is limited to their own device, and there is no plan to work on such a feature as, as you rightly said in the Github issue you linked, balena is about helping people manage fleets of devices at scale.

Thank you for your response @drskullster.

Good to know about preloading.

Unfortunately it sounds like balenaOS is not a good fit for a publicly distributable WebThings Gateway operating system image due to the SSH issue.

I will continue to evaluate it for commercial use cases, though that may be a problem there too. We ideally need more of a pull model rather than a push model.