a2geek / libvirt-bosh-cpi

A Go BOSH CPI for the libvirt virtualization API.
GNU General Public License v3.0
5 stars 1 forks source link

Is your libvirt CPI a good starting point for a Proxmox CPI? #2

Open norman-abramovitz opened 4 days ago

norman-abramovitz commented 4 days ago

I am looking for a quick way to get a BOSH CPIs for Proxmox, LCX and OpenStack. It seems interesting that one library could do them all. Do you think your existing code would be a good starting point?

a2geek commented 4 days ago

Maybe? I expect the API's would be different (libvirt is all XML), so maybe as a reference... there's a lot of magic I had to copy because we're just given a random interface{} with no defined structure at times.

Note that the choice of underlying technology (thinking QEMU vs KVM) doesn't make it into the API you'll be interacting with. It might influence a few things, but all of these will have different API calls (and likely terminology). Libvirt calls VM a domain while LXD calls it an instance.

I think I tried to install OpenStack and that experiment utterly failed -- but there is an existing CPI for that if you're more successful than I am.

FYI, LXC is only containers, and I expect that you'll have issues with just containers. I tried with the earlier versions of LXD (when is was container only) and it just didn't work out, even with a lot of environmental hacking...

Re: Proxmox, never used it. I only heard of it recently when somebody noted they were going to write a CPI but decided to try the LXD CPI (with Incus which is a fork of LXD). ... so there might be a second person that can help you. With the BOSH CPI's, the existing libraries are Go and Ruby, so pick your poison. Looks like there are some Proxmox API libraries already out there, so that's a Good Thing.

If you were going to experiment with either of my CPI's, I'd try the LXD CPI, partially because I'm currently working on it. My target is really home use (although, I think the MicroCloud potentially extends this into small office usage, at least. Hypothetically, there are larger organizations using LXD, and I know it can cluster and use more complicated storage than what I've got (and those operations are hidden under the LXD API, so I don't deal with them directly).

Note that the LXD CPI also has directions of how to setup with Genesis, which you may have an interest in!

Let me know where you go with this! I am in the CloudFoundry slack channel if you want to discuss anything. -Rob

a2geek commented 3 days ago

I just remembered that this might be a good start: Just get an install of Proxmox going, pull one of the existing stemcells that have the correct disk type (for both Libvirt and LXD, QEMU was valid). Then, figure out how to load that image and setup a VM with the tools/UI provided. Then you at least have a path to work with.

From what I saw poking around, QEMU is supported by Proxmox, so you (hopefully) can get that loaded, boot the VM, and maybe even log in as vcap. That should get you started with the create_stemcell CPI call.