[enhancement]: metadata injection through kernel paramaters
Hi,
Let me apologize whether this topic has been already somewhere discussed or maybe even documented. I haven't found any lead, thus I am asking you this way.
Using the kernel parameter cc: <settings> end_cc user can inject any user-data that can be used for an instance. I have noticed that the <settings> will land under merged_cfg key when querying the data structure.
I am trying to use a templated user-data for my testing instance (no cloud environment) that has a short lifespan. The user-data is stored in a secondary image (qcow2) and contain some variables I need to change accordingly for a single run of the instance e.g. package version, build number or registration code.
Is there a way that I can inject this information at the boot time among kernel parameters, and they would land under a different key (v1, vendordata, etc) rather than in merged_cfg?
Thanks and sorry for the noise if this has been somewhere else clarified.
Hello @mloviska, thanks for raising this discussion. We have some documentation on kernel_cmdline parameters, might you have gone through it https://cloudinit.readthedocs.io/en/latest/explanation/kernel-cmdline.html ?
Hello @mloviska, thanks for raising this discussion. We have some documentation on kernel_cmdline parameters, might you have gone through it https://cloudinit.readthedocs.io/en/latest/explanation/kernel-cmdline.html ?
Hello @CalvoM, thanks for the link. I have read that, thought I still rather asked whether there might be anything else. Thus, there is no way how I can inject vendor/meta-data among kernel parameters.
Thanks, @mloviska. The cloud-config provided via the kernel-cmd, is part of the base-configuration. Vendor-data and user-data get merged on top of the base configuration.
I am not sure if I fully understand your use-case, but isn't it possible to directly inject your cloud-config via the kernel commandline, instead of using a disk + kernel commandline?
I am not sure if I fully understand your use-case, but isn't it possible to directly inject your cloud-config via the kernel commandline, instead of using a disk + kernel commandline?
Hi @aciba90, that would be possible, although the cloud-config is pretty lengthy as we are trying to test decent amount of options in our tests. The aim is to have a single disk with one cloud-config that should be parametrized (only a few variables) but yet shared among more of our distros that are under testing scope.