Question on multi device Mender artifacts

Hi,

I’m using Mender with Yocto and have several machines and images. On the Mender server this results in one artifact for each machine/image combination, which can grow pretty fast.
I wanted to reduce the amount of artifacts by grouping machine/image combinations into one artifact.

Short version of the question:
From the artifacts documentation I read I can specify several machines for one artifact (but they have to be compatible), but an artifact can only hold one image. Is that correct?

Long version of the question:

I have several machines:

  • machine1: a Raspberry Pi
  • machine2: a i.MX8 machine
  • machine3: a second i.MX8 machine (same SoM as machine2, but a different carrier board)

For each machine I have two different images: prod and dev (dev contains additional debuggers/tools I don’t want to have in prod).
Also the images for each machine differ in the set of services installed and drivers available in the image.

From my understanding it is not possible to group some of these machine/images combinations in one artifact in the current setup.

My assumptions:

  • If I would merge the images for machine2 and machine3 so that I have only one image for both machines (drivers wouldn’t be loaded if the hardware is not available and services have to detect the machine type and start up accordingly).
  • But still I would have to have different images for prod and dev and can not put them into one artifact.
  • I can’t merge machine1 with any of the two other machines into one artifact.

Are these assumptions correct?

Thanks & greetings

Hi @nxChPrat, welcome to Mender Hub.

In short, no you cannot combine those artifacts. You can name them the same and the Mender UI will show them as a single release but internally they need to be different and Mender will automatically deliver the right ones to your devices based on the machine type specification.

The reason is that these are full images, including the kernel and DTB which are normally not binary compatible with other boards. It’s possible that you could get a single binary for the two i.MX8 boards but you would need logic in the bootloader to specify the proper DTB. You may also need to do some kernel work to make sure the kernel is compatible with both boards.

Drew

Hi @drewmoseley,

thanks for confirming that my assumptions were right.

Naming the releases the same would already solve my issue. I thought that wouldn’t be possible because I had experienced issues before when uploading artifacts with the same name (probably because it was for the same device, too?). But I just tested it and it works perfectly.

Thanks for your help!

Greetings