I’m looking to use the balena preload command in an internet-denied environment on multiple devices. Each device should have the same image (which can be generated while connected to wifi), but have a pre-generated unique identifier provided – ideally as a device variable, but I’d be happy if there’s a workaround.
I didn’t see any way to do this - am I missing something in the docs?
As I understand it, you’d like to create a preloaded image that can be flashed onto multiple devices where they won’t be able to connect to the balenaCloud service.
Whilst you can’t use exactly the same image for each, what you can do (from an Internet connected machine) is:
Preload a provisioning image with an application which will be used as the ‘master’ image
Pre-register a UUID for each device that you’d like to provision the image on
Copy the ‘master’ image, and then generate a new config for the pre-registered UUID and inject this into the copy
Provision a device with the specific copy of the preloaded image
This does require that a new image with a unique config is used for each unique device, but it’s a process that’s been successfully used by customers in their manufacturing environments to preload devices before being shipped.
Unfortunately, as I’m currently looking, Github is down so I can’t give you the example I was thinking of, but you need:
We’re tracking other IDs through our device variables (too much Theseus’ Ship), but we can update the device variable (based on the device UUID we just generated) through the resin CLI.