I’m planning to move from Balena to Mender now. Then I’m looking for how to provision a device with an existing artifact.
I’m using Raspberry Pi 4 and Yocto for building OS. What I want to do is run our application code soon after I insert the flashed SD card. The following command is what I do in Balena.
No, there are no means for an Artifact to be magically Pre-installed. The artifact format is extremely versatile, it can
include arbitrary scripts that execute, including network calls and hardware dependent operations
be of a type that the Mender client does not handle itself, for example if you use an Update Module
Hence we do not provide a way to do an offline install. If you are Yocto based and your Artifact is so simple that it does allow an offline install, then writing a recipe to unpack and install the files is very easy, and offers the additional benefit of reproducibility. If you need to add information for dependency tracking, then you can also pass that to the final artifact creation by using https://docs.mender.io/operating-system-updates-yocto-project/variables#mender_artifact_extra_args
Alternatively, you can automate the first installation through the device authorization webhook