Whirr
  1. Whirr
  2. WHIRR-513

Add integration test for BYON provider

    Details

    • Type: Test Test
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: core
    • Labels:
      None

      Description

      We need some sort of automated integration tests for BYON. My suggestion is to use Whirr to start a bunch of noop nodes (on ec2 or cloudservers as configured), generate the .yaml file, and deploy a cluster using the byon provider. This way we can be sure that BYON works without doing a lot of manual testing with virtualbox / vmware.

        Activity

        Hide
        Karel Vervaeke added a comment -

        Note to future self:
        Getting exceptions from FastDNSResolver (because there are no DNS entries for the virtualbox instances)?
        Stack tracke here: https://gist.github.com/2149470
        Workaround: Add entries to /etc/hosts, run dnsmasq, and use WHIRR_CLI_OPTS="-Ddns.search=localhost"

        Show
        Karel Vervaeke added a comment - Note to future self: Getting exceptions from FastDNSResolver (because there are no DNS entries for the virtualbox instances)? Stack tracke here: https://gist.github.com/2149470 Workaround: Add entries to /etc/hosts, run dnsmasq, and use WHIRR_CLI_OPTS="-Ddns.search=localhost"
        Hide
        Karel Vervaeke added a comment -

        Currently I'm not calling vagrant from within unit tests.
        The tests assume you have prepared the vm instances.
        The CI server does a vagrant up before running the tests and vagrant destroy (only if the tests are successful so you can inspect the vm's when things go wrong).
        You can use a vagrant plugin for working with snapshots - this speeds things up a bit (at the cost of having to pay more attention to clock synchronisation).

        Show
        Karel Vervaeke added a comment - Currently I'm not calling vagrant from within unit tests. The tests assume you have prepared the vm instances. The CI server does a vagrant up before running the tests and vagrant destroy (only if the tests are successful so you can inspect the vm's when things go wrong). You can use a vagrant plugin for working with snapshots - this speeds things up a bit (at the cost of having to pay more attention to clock synchronisation).
        Hide
        Frank Scholten added a comment -

        Awesome! Curious how this is implemented. Would you call vagrant from a JUnit test as a system process or via JRuby?

        Show
        Frank Scholten added a comment - Awesome! Curious how this is implemented. Would you call vagrant from a JUnit test as a system process or via JRuby?
        Hide
        Karel Vervaeke added a comment -

        Sure, I'll see if I can refactor an existing integration test to make it a meaningful contribution.
        There's a Vagrant file, a yaml file and a puppet manifest to prepare the hosts file on each node.

        Show
        Karel Vervaeke added a comment - Sure, I'll see if I can refactor an existing integration test to make it a meaningful contribution. There's a Vagrant file, a yaml file and a puppet manifest to prepare the hosts file on each node.
        Hide
        Andrei Savu added a comment -

        I agree. Can you share the Vagrantfile & the .yaml file you are using? Any other scripts?

        Show
        Andrei Savu added a comment - I agree. Can you share the Vagrantfile & the .yaml file you are using? Any other scripts?
        Hide
        Karel Vervaeke added a comment -

        It's relatively easy to automate BYON tests virtualbox if you use vagrant. Basically you do 'vagrant up' before tests and 'vagrant destroy' after tests (or to speed things up, you can use a snapshot which you rollback to before every test - there are some vagrant plugins for that as well).

        It does introduce a dependency on gems/ruby(jruby)/... (but could prove to be nice in a development setup)

        Show
        Karel Vervaeke added a comment - It's relatively easy to automate BYON tests virtualbox if you use vagrant. Basically you do 'vagrant up' before tests and 'vagrant destroy' after tests (or to speed things up, you can use a snapshot which you rollback to before every test - there are some vagrant plugins for that as well). It does introduce a dependency on gems/ruby(jruby)/... (but could prove to be nice in a development setup)

          People

          • Assignee:
            Andrei Savu
            Reporter:
            Andrei Savu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development