dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.54k stars 457 forks source link

Manage VirtualBMC #863

Closed rgl closed 3 years ago

rgl commented 3 years ago

To test IPMI based software (e.g. https://github.com/tinkerbell/pbnj) it would be really useful to automatically manage VirtualBMC (the daemon) and automatically configure it with the VMs managed by terraform (e.g. add/remove/update the VMs in VirtualBMC).

What do you tink?

For example, we could have a virtualbmc section inside the libvirt_domain resource or does it make more sense to have a virtualbmc resource (maybe in a separate repository) and somehow be updated when libvirt_domain is created/destroyed/changes-ip?

dmacvicar commented 3 years ago

I don't have experience with BMC, but I understand it also interacts with libvirt.

I don't intend to add functionality into the provider which is not something that libvirt provides, except for minor sugar like eg. today we allow to easily import volumes into libvirt.

What you describe sounds similar to me to what I do in the Salt provider, where based on the virtual machines created by terraform-provider-libvirt, I manage a roster file for Salt. I think something similar can be done for BMC. This would be a separate provider though.

rgl commented 3 years ago

Indeed. Tracking it like you do should do the trick.

resource "salt_host" "example" {
    host = "${libvirt_domain.domain.network_interface.0.addresses.0}"
}

Thanks! I'll try to create a separate provider for this.

rgl commented 3 years ago

The vbmc provider is now live at: