Provisioning Template for Cloud-init with image based deployment

We at Atix are using image based provisioning with cloud-init to provision the Proxmox host which involves attaching cloud-init config files (user-data, meta-data, network-config) as an iso image to the VM while booting the VM. Since foreman only offers user-data kind template, therefore, in order to provide config files we are currently providing all three config files in one user-data kind template and configuring OS with it. This template is then converted to iso image on Proxmox server and attached to host, see, Add Cloudinit support using iso image by Manisha15 · Pull Request #294 · theforeman/foreman_fog_proxmox · GitHub.

There are two options to provide these three config files as templates in foreman:

  1. Continue to use user-data kind provisioning template and provide user-data and network-config in one template
  2. Extend foreman to offer option to set three different provisioning templates in Operating system to configure user-data, network-config and optionally meta-data.

We want to extend it to other Compute resources as well. Which option would be feasible and user-friendly?
And any other solutions are also welcomed.

3 Likes

I think it will not hurt to have more options as already other cloud-init options try to get more than user-data.

But to be user-friendly good templates to start with are needed (something we typically have) and we need to simplify how the templates are associated to the operating system (I think this is only solved for EL and Fedora so far and I read to many posts here where someone mixed things up especially since Ubuntu’s Autoinstall made it even worse).