Saturday 13 December 2014

The joys of moving to a new CentOS version, libvirt and Puppet

After a long time of running, or at least trying to run, virtual hosts on my 5 year old hardware I decided to splash out and get a new host.

Out goes the old AMD Phenom 4 gig ram and in with an AMD A10 16 gig ram.

First thing was to install a new CentOS 7 with libvirt (I just cannot get openstack to work ).

The CentOS install was very easy with a pxe boot out of my dnsmasq server. Got it up and running in 1/2  hour as I have been spinning up CentOS7 box in libvirt for a while.

Next, Puppet Enterprise 3.3.0. This is now a trivial task I have setup the pe_repo and its just a
curl -k https://${PE_SERVER_IP}:8140/packages/current/install.bash | bash

Now I have puppet running on the VM host box but the virt module (modified version of carlasousa/virt ) was having issues as I needed to install the ruby-libvirt gems and there is not one for CentOS7. This is where the fun begins......

Now PE uses its own version of ruby (1.9) where as the OS is ruby 2.0
This leads to a slightly complicated way of installing the gem files in PE.

  1. git clone the ruby-livirt repo     git clone git://libvirt.org/ruby-libvirt.git
  2. install all the packages that the autobuild script complains about
  3. once the build is finished you will find a gem file in the pkg directory
  4. gem install the file with "Puppet" version of gem
It was the last one that brought me undone for some time. Unfortunately you cannot just do a gem install as it pulls the wrong version and it still fails.

Shortly I will be releasing my version of puppet virt into the wild as it allows for some more good things when working with kvm and libvirt