Identity Attribute - Default vs Commissioned Device

Hi All,

I am reading the documentation here: link and I see the statement:

identity attributes must never change for the lifetime of a device, so that a device can be recognized over its lifetime

My use case is as follows:

  • Build standard yocto image
  • Deploy the same image to multiple SD cards, one per device
  • On first boot, commission the device to have unique identifiers

I do have a unique MAC address per device, but ideally I would like a “friendly” name for each device to be visible so that I can see the device easily in the Mender GUI.

My question is:

  • On first boot there will be a default “friendly” name for each device but a unique MAC address. The friendly name will then be changed, however we may have had an initial communication with the Mender server by then. Is this allowed? - It is going against the “never change” advice. Will we end up with two devices initially? Is there a better way of doing this?

Thanks!

Hi @brianPTL,

It is going against the “never change” advice. Will we end up with two devices initially?

Yes, I suspect that you will end up with two devices in “Pending” tab.

  • Is there a better way of doing this?

If you have a process to set/change the “friendly” on each device, I would recommend to keep the mender.service service disabled by default and enable it once the “friendly” name is set/changed. This will though require you to have different images, eg one for manufacturing and one for production.

Another approach would be doing it offline,

  • Deploy the same image to multiple SD cards, one per device
  • Set unique identifiers on SD cards (loopback mounting or using mender-artifact to modify them)
  • Do nothing on first boot :slight_smile:
1 Like