pcp
[Top] [All Lists]

Re: [pcp] [RFC] Using Vagrant for QA tests

To: Ryan Doyle <rdoyle@xxxxxxxxxx>, "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: [pcp] [RFC] Using Vagrant for QA tests
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Fri, 02 Jan 2015 15:21:16 -0500
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1477093403.5527751.1418338412186.JavaMail.zimbra@xxxxxxxxxx>
References: <1929973019.5471071.1418248733440.JavaMail.zimbra@xxxxxxxxxx> <2122993129.5476735.1418259486798.JavaMail.zimbra@xxxxxxxxxx> <y0mzjaui587.fsf@xxxxxxxx> <1477093403.5527751.1418338412186.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
Ryan,
    This is great!  I had not thought of using vagrant in this way. In order to be able to test my own changes in as many environments as possible, I have started working with your vagrant file and added a bunch of VMs as you mentioned.  Vagrantfile attached and work ongoing here:

https://github.com/ubccr/pcp/tree/vagrant_test

A "vagrant up" will start , provision and run qa on all the hosts.  The provisioning happens in serial and the QA runs happen in parallel.  I have a script that does the provisioning in parallel, but my host machine is not powerful enough to support that, kept getting disk errors.

After the qa is done, any .bad files as well as the QA output itself are copied to a new "qaresults" hierarchy in the current directory.  Probably could scripts something to do a simple analysis on the results.

If you had a good enough host machine, you could probably run all the VMs at once, but vagrant up will also take a regex, so I tend to do something like:

vagrant up /centos.*/
or depending on your shell
vagrant up \/centos.\*\/

The boxes are all standard vagrant cloud images except opensuse.  I couldn't get that to boot, so had to build my own from the bento project, so those are commented out in the vagrantfile.

Some of the QA tests trigger the OOM killer with 512 MB VMs.  It's likely that at least 1024 is needed.  I haven't looked too much into that yet.
You can configure the VM characteristics as well as the QA tests to run with a few variables at the top.

Thanks

Martins

On 12/11/14 5:53 PM, Ryan Doyle wrote:
Hi Frank

> Neat.  One problem with an overly hardcoded approach like
> <https://github.com/Aconex/pcp/blob/vagrant-qa/Vagrantfile> is that it
> can encourage a monoculture of pcp test environments (a particular
> ubuntu version etc. in this case). 



Luckily Vagrant can support multiple VMs. For example we could support Ubuntu, FreeBSD, OmniOS etc...

------

  config.vm.define "precise64" do |b| 
    b.vm.box = "precise64"
    b.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
  end

  config.vm.define "freebsd9" do |b|
    b.vm.box = "freebsd9"
  end

  config.vm.define "omnios" do |b|
    b.vm.box = "omnios"
  end
-----



Attachment: Vagrantfile
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [pcp] [RFC] Using Vagrant for QA tests, Martins Innus <=