action #175728
closedcoordination #169654: [epic] Create test scenarios for Agama
Generate all Agama json profiles using jsonnet profiles for qemu
0%
Description
Motivation¶
We are seeing more and more that our Agama profiles stored in git have many things in commons and feels like repeating over and over configuration.
Suggestion from develoepers:
https://suse.slack.com/archives/C02TLF25571/p1733748870701629?thread_ts=1733737967.351989&cid=C02TLF25571
jsonnet allows splitting the profile into smaller parts and using parameters for building big final profiles. Like define lvm=true to use LVM, rmt=.... to use RMT. Then you can set both to use LVM and RMT. With that you can easily generate lots of profiles with any combinations you need just from few templates.
It is quite similar to the Puppeteer tests.
A clear example of this we can see here for having ext4 or xfs as root filesystem duplicating all the settings:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/20973/files
Keep adding placeholder for that {{root_filesystem_type}} and corresponding openQA variable could degenerate in bad used of those variables, complex conditions, etc. Besides sometimes we would assume the settings (if documented) would do something but doesn't because depending on the profile more changes related could be needed, so it is better to use a templating language. All the json files generated would not be needed to be maintained anyway, only the jsonnet profiles will.
The only setting that cannot be stored in git is the one for regcode, that one still needs to be replaced during runtime, but the rest can be build.
Acceptance criteria¶
- AC1: All (or most of them) QE Yam json profiles are generated based on some jsonnet profiles.
- AC2: jsonnet profiles and resulting json profiles are stored in git
- AC3: jsonnet profiles allow some parametrization which (could or will?) be similar to the one used by Puppeteer.
- AC4: Explore how we can mark the json files in a way that anyone can know that are auto-generated files (under some folder, some comments in each file?)
- AC5: There is documentation in confluence about how to build locally json based on jsonnet profiles.