New DHCP/DNS provider: libvirt

Hello,

for those who use virsh DHCP/DNS provider for development, note this has
been removed from develop branch of foreman-proxy this morning and
replaced by brand new provider called "libvirt". It offers the very
same functionality, but via native ruby libvirt bindings instead of
spawning "virsh" command. More than that, it also adds extra capability
of reading DHCP leases as virsh ignored DHCP leases previously [*].

We also moved configuration of the libvirt network from settings.yml to
dhcp_libvirt.yml (and dns_libvirt.yml respectively). There is a
configuration migration which will serve for production installations.
You may choose to use it or to configure the service manually (see
yaml examples).

The virsh providers was a hack I created for easier development, but
over the time it turned out as an useful feature for regular users. With
DHCP leases capability it is almost on par with ISC DHCP, yet there is
one limitation - PTR records are not supported by libvirt API and
ignored (but they should be determined from A records, it's just ignored
what is provided by Foreman orchestration).

And by the way, the providers are IPv6 ready.

[*] ruby-libvirt 0.6.1 release is required for this capability to work
which was not yet released. On older versions, DHCP leases will be
simply not shown.

Special thanks to Dmitri who actually pushed on me to do this the right
way, it initially started as another dirty patch for the dirty virsh
code :slight_smile:

··· -- Later, Lukas #lzap Zapletal

> We also moved configuration of the libvirt network from settings.yml to
> dhcp_libvirt.yml (and dns_libvirt.yml respectively). There is a
> configuration migration which will serve for production installations.
> You may choose to use it or to configure the service manually (see
> yaml examples).

Sounds like this should also be done in puppet-foreman_proxy.

> And by the way, the providers are IPv6 ready.

Yay :slight_smile:

··· On Fri, Apr 22, 2016 at 04:08:01PM +0200, Lukas Zapletal wrote:

Epic stuff Lukas, looking forward to trying this out :wink:

> Sounds like this should also be done in puppet-foreman_proxy.

If there are no volunteers, I can try myself :slight_smile:

Documentation hasn't been updated yet as well. I just wanted to do quick
heads-up when the code was merged. I'll do docs first.

··· -- Later, Lukas #lzap Zapletal

> If there are no volunteers, I can try myself :slight_smile:

> Documentation hasn't been updated yet as well. I just wanted to do quick
> heads-up when the code was merged. I'll do docs first.

··· -- Later, Lukas #lzap Zapletal