Creation of artifact which supports multiple payloads

I’d like to use the mender-artifact tool ( https://github.com/mendersoftware/mender-artifact ) to generate an artifact which does both “single-file” and “script” modules . Can someone point me to a documentation which helps me achieve this? I know how to create each of them independently . I’m interested in generating one artifact which does both.
Thanks!

Hi @prashanthjbabu welcome.

The primary links you need to create a custom update module are:

Hope that helps,
Drew

Hi @drewmoseley,
Thanks for your reply . I’m not looking to build a custom update module . The document https://github.com/mendersoftware/mender/blob/2.2.0/Documentation/update-modules-v3-file-api.md mentions that one artifact can contain multiple payloads ( each corresponding to an update module ) . I’d like to do that ! Have ONE artifact which has MULTIPLE payloads.

Reference : “One Artifact can contain payloads for several update modules”

Hey @prashanthjbabu, although the multi-payload support is listed in the Update Module specification, it has not been implemented yet. There is a ticket for it here.

Hi @kacf,

Thanks for your reply . Is this implemented on the cloud and mender client? If i create my own mender artifact manually (or my own script) following the guidelines of https://github.com/mendersoftware/mender-artifact/blob/master/Documentation/artifact-format-v3.md then would it work?

No, sorry, this is not implemented anywhere. As an alternative, you can use one single-file payload together with state scripts, perhaps?

Your codebase seems to reflect support for multiple payloads https://github.com/mendersoftware/mender/blob/2.1.x/state.go#L862 . Is this not the relevant code?

Sure I could use statescripts as an alternative option…Thanks!

Yes, there is plenty of code which is prepared to handle it. We do have plans to implement it at some point, after all. But until all pieces are in place, it’s insecure to try to support something which isn’t handled correctly everywhere, so this is disabled for the time being.

Got it ! Thanks @kacf