edgelesssys/constellation

Add additional terraform variables for libvirt and qemu or allow editing of terraform before `constellation create`.

Closed this issue · 1 comments

Use case

I wish to configure the constellation terraform to use my own libvirt storage pool and network as constellation create doesn't run to completion with the defaults:

Error: error creating libvirt network: internal error: Network is already in use by interface virbr2

  with libvirt_network.constellation,
  on main.tf line 111, in resource "libvirt_network" "constellation":
 111: resource "libvirt_network" "constellation" {

if I change the terraform to use the default libvirt network, then there is a similar problem with the libvirt storage pool sharing the location of the default pool.

I would like to modify the terraform to just use the default network and storage pool, or provide it through configuration, but constellation create does not support that as far as I can tell.

Describe your solution

Allow editing the terraform with:
constellation create --only-terraform
which populates constellation-terraform and then
constellation create to apply the terraform.

OR

provide options to use an existing libvirt network and storage pool.

Would you be willing to implement this feature?

  • Yes, I could contribute this feature.

Hey @badly-drawn-wizards,

You can edit Constellation's Terraform configuration by downloading the files in terraform/qemu from our repository, which will give you the default configuration you see when running constellation create. You can then make any changes on the configuration as per your requirements, and run terraform init && terraform apply to apply the configuration, assuming the configuration files are present in your current working directory. You can then populate the outputs of the configuration into the corresponding fields of the infrastructure section of the constellation-state.yaml file and run constellation apply to initialize your cluster with the provided infrastructure. This should be sufficient for your network and storage pool requirements.

Let me know if any issues should arise!

Cheers, Moritz