Terraform: Feature Request: Add oVirt/RHEV Provider

Created on 21 Sep 2017  ยท  28Comments  ยท  Source: hashicorp/terraform

I've recently begun moving away from ESXi/vSphere to oVirt (upstream of Red Hat Enterprise Virtualization). I've been wanting to get into Terraform and can't find any functional providers at this time. I think it would be super cool to see this as a native provider in Terraform!

new-provider

Most helpful comment

Hi @LukeFlynn thanks for your interest.
I myself am a big fan of OVirt and have recently joined Hashicorp. I'm happy to take this on a but I can see it's already been started. There is a partially built shell that I can sort out a bit here: https://github.com/chriscowley/terraform-provider-ovirt

Have you done anything in the meantime since this post? I know things have changed a bit lately with the 4.2 release.

All 28 comments

@LukeFlynn Do you know if this got any traction? Did you figure out another solution?

Hi @LukeFlynn! Thanks for this request.

In the short term we (the Terraform team at HashiCorp) have no plans to develop a provider for oVirt in-house, and we have no oVirt expertise on the team currently. If some members of the oVirt community are interested in developing a provider, we'd love to work with them to bring it into the fray via the provider development program, which is the way to bring a new provider into the set that is tested by and distributed by HashiCorp.

We are also planning to, in the medium term, extend the provider auto-installation mechanism to support third-party providers that are not distributed via the HashiCorp releases infrastructure, so that community developers can maintain a provider themselves as an alternative to the official program.

Hi @LukeFlynn thanks for your interest.
I myself am a big fan of OVirt and have recently joined Hashicorp. I'm happy to take this on a but I can see it's already been started. There is a partially built shell that I can sort out a bit here: https://github.com/chriscowley/terraform-provider-ovirt

Have you done anything in the meantime since this post? I know things have changed a bit lately with the 4.2 release.

An oVirt provider would be awesome. I'd love to help out.

+1 for an oVirt / RHV provider!!

Another +1 for an oVirt / RHV provider please! We have implemented our first oVirt cluster and are about to run a trial of Terraform Enterprise targeting vSphere but are very keen to include oVirt in that testing if possible. Happy to help as much as I can, probably can't help too much with the development but can assist with testing.

Has anyone looked at this implementation already?
https://github.com/EMSL-MSC/terraform-provider-ovirt

+1 oVirt will get more traction since Citrix crippled the free edition of Xenserver. Be good to see a Terraform provider.

@jboero The people have spoken!

Sorry I've been MIA but just attempted https://github.com/EMSL-MSC/terraform-provider-ovirt and can vouch that it works!

Thanks to PNL and @Maigard for publishing that. I have experimented with the provider and it takes a bit of versioning but it comes out beatifully. Steps to get it working currently:

As per Ken's notes, you'll need the following, with caveats:

$ go get github.com/EMSL-MSC/terraform-provider-ovirt
$ mkdir ~/.terraform.d/plugins
$ cp $GOPATH/bin/terraform-provider-ovirt ~/.terraform.d/plugins

Note with Terraform MASTER currently at 1.11.x, the build fails for me on t.Helper() in testing added to Terraform 8 months ago. My solution for this was to revert the local Terraform to tag 1.10.x:

$ cd $GOPATH/src/github.com/hashicorp/terraform/
$ git checkout tags/v0.10.0
$ go get github.com/EMSL-MSC/terraform-provider-ovirt
$ mkdir ~/.terraform.d/plugins
$ cp $GOPATH/bin/terraform-provider-ovirt ~/.terraform.d/plugins

Then if you've used self-signed certs, make sure your engine CA is registered locally or the API will fail on unknown CA. On EL/Fedora:

wget http://${ENGINEFQDN}/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA
sudo cp $RESULT /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust extract

You should now be able to terraform {plan,apply}. Happy days! I'll see if we can get this registered and supported on the public registry.

Thanks

Note this provider uses API v3 which will be deprecated but works for now in 4.2. I'll try to upgrade it to 4.x.

It's good to see someone using it. I have it mostly working right now, but I am trying to get it working with a different oVirt library so I don't have to maintain both. If anyone has suggestions, I'm willing to make some changes.

:+1:

Hi all, I just commited a PR to https://github.com/EMSL-MSC/terraform-provider-ovirt, which utilizes the golang sdk for ovirt-engine v4.x to re-implement the existing codes. This PR makes the provider to support oVirt API v4.x. Please go to https://github.com/EMSL-MSC/terraform-provider-ovirt/pull/5 for details.

hi all, please see sinokylin/terraform-provider-ovirt for latest implementation of terraform oVirt provider. While it is still unstable and under heavy development, issues and pull requests are always welcome.

I believe this is another implementation of a libvirt provider for terraform - dmacvicar/terraform-provider-libvirt. It's demonstrated here in this article - https://titosoft.github.io/kvm/terraform-and-kvm/.

any updates on this?

any updates on this?

Not yet. As far as I know, there is no plan to support this from oVirt community. You could try the unofficial imjoey/terraform-provider-ovirt , which is still under development. Any feedbacks are appreciated. Thanks.

I'm considering incubating @Maigard @imjoey work under ovirt organization. Its good to see there is a lot of interest around it, and I hope this would translate into contributions.

If there is a preference to have it under terraform and not under ovirt please explain, and lets discuss it.

@Maigard and @imjoey if that's ok with you, in order to proceed I'd like to sync this with you:

  1. I'll upload the code - while preserving history(!), to https://github.com/ovirt/terraform-provider-ovirt
  2. make sure you the Authors file is updated and correct
  3. update the licence to apache 2 license
  4. comment a redirection notice from your forks to ovirt

@Maigard and @imjoey if that's ok with you, in order to proceed I'd like to sync this with you:

  1. I'll upload the code - while preserving history(!), to https://github.com/ovirt/terraform-provider-ovirt
  2. make sure you the Authors file is updated and correct
  3. update the licence to apache 2 license
  4. comment a redirection notice from your forks to ovirt

Hi @rgolangh @Maigard , how about leveraging the Github Transfer [[1]] functionality to move the repo under oVirt organization? The main benefit, I think, is that besides the git commits history, it could also be able to keep the history of issues, pull-requests and etc for us. What's your insights on that?

If so, as I have no rights to create a new repo under oVirt organization, perhaps current repo could be transferred to you @rgolangh first, and you proceed to transfer it to oVirt organization. The whole process would be very much like the transfer of ovirt-engine-sdk-go repo previously.

There will be a permission thing with ovirt organization. So you can transfer to me and I'll transfer to ovirt.

I'm still interested in @Maigard voice.

Happy to announce that the provider has moved under oVirt organization
and can be found at https://github.com/oVirt/terraform-provider-ovirt

Sorry I didn't get back to you. I had to ask our legal department about it and it ended up getting dropped. The only thing we need is to make sure is to make sure there is documentation that the earlier contributions are made under the original license (so there is no patent license granted by Battelle). Other than that, I am happy someone is going to continue development. My job duties changed just as I released it and I couldn't keep doing development. I can make a note that active development has moved to the oVirt fork.

@Maigard In the new license Battelle and the original license appear at the end, and its mentioned that it was forked from this organization - please have a look.

It looks good. I noted the development change in my repo.

Closing this issue out. Thanks to all for helping bring the oVirt provider into the world and maintaining it.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings