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
bosh cpi golang libvirt

libvirt-bosh-cpi

Go Report Card GitHub release

A Go BOSH CPI for the libvirt virtualization API.

Motivation

Cloud Foundry is a very interesting tool and environment to target and use for development purposes. Cloud Foundry requires a BOSH CPI to deploy. Unfortunately, the existing BOSH CPI's seem to be development-only (that is, temporary), unsuitable for Cloud Foundry, or require a small cluster of machines, or deploy to a cloud provider.

Libvirt is a good compromise. The current intent is to keep it scoped at 1 host. If something larger exists, there are a number of solutions.

Features

Libvirt Versions

Distribution Libvirt version Notes
Ubuntu 18.04 4.0.0 Initial development version
Ubuntu 20.04 6.0.0 Current development version

Stemcell Versions

Stemcell version Stemcell OS Notes
621.x ubuntu-xenial
1.x ubuntu-bionic Libvirt XML requires a graphics entry. See the <graphics...> entry in libvirt_vm_domain in libvirt-kvm-vars.yml.

Status

The CPI is capable of running and managing BOSH deployments, generally without issue. Longer term management (snapshotting vms, for instance) either are untested or unimplemented at this point.

Feel free to try it out! Feedback and PR's are welcome.

Notes:

As of v3, disk management is configurable with throttling. This was done to help with deployments like Cloud Foundry that create 15 (or more!) VM's at once. With slower disks (non-NVMe) the machine may not be able to keep up. This keeps it manageable at the cost of slowing down VM creation.

As of v4, disk assignment allows for disk resizing. Disks as still assigned statically; current assignment scheme:

  • /dev/vda: boot disk
  • /dev/vdb: ephemeral disk
  • /dev/vdc: config disk
  • /dev/vdd or /dev/vde: persistent disk (optional); two expected when resizing disks

Tickets being watched

Closed

Documentation