suse-edge / edge-image-builder

Tool for creating and configuring a set of images to automate the deployment of Edge environments
Apache License 2.0
55 stars 27 forks source link

Elemental package RMT support without SCC Reg Code #586

Open peteingithub opened 1 month ago

peteingithub commented 1 month ago

Would it be possible to have EIB pull elemental-register and elemental-system-agent from an RMT server if stated by additionalRepos? This way SL Micro packages could be installed without an SCC reg code.

atanasdinov commented 1 month ago

This shouldn't have anything to do with Elemental per se. Excuse my ignorance, however, if you supply an additional repository hosting said packages, the resolution should still find them from there?

atanasdinov commented 1 month ago

Oh, nevermind. You're referring to the latest validation changes which prevents it: https://github.com/suse-edge/edge-image-builder/blob/f55f08792774a19a7fa62009efbe269297b29bac/pkg/image/validation/elemental.go#L100

dbw7 commented 3 weeks ago

This is a bit of an edge case because Elemental has special handling in EIB. The easiest solution to this issue is to manually download the elemental RPMs and include them in the EIB RPM configuration directory and then EIB won’t try to pull the elemental packages from any repositories but will still work with the elemental handling.

peteingithub commented 3 weeks ago

That sounds like a solution.

I'm still wondering, why does it support the rpm directory to pull the files, but at the same time not an URL where the same files would sit, and which works for anything else? Not to mention the fact that if the URL was a mirrored SLM repo, the package dependencies would also be handled automatically.

dbw7 commented 2 weeks ago

Well the support for putting the elemental RPMs in the RPM directory is an intentionally provided alternative to the main flow.

When the elemental RPMs were provided in the internal SL Micro 6.0 repos, we needed to change the way we handled them to support this as opposed to linking to external repositories (what we used to do). Because of this, the validation and need for the registration key was added. But in the scenario where users did not have a key or did not want to use the internal repo, support was added so that the elemental flow in EIB would work if the packages are manually provided as well.

Additionally, the reason that it seems to not work out of the box with the RMT server is specifically because the elemental packages have very specific handling, e.g. we automatically download them when the elemental_config.yaml is provided and they are not expected to be put in the packages section of the EIB definition.