Basis for Cluster integration testing

This branch adds cluster testing via Vagrant.
Requires my branch of the vagrant-maven plugin to work,
which can be sourced here:
https://github.com/parshimers/vagrant-maven-plugin
It is enabled with -DclusterTest=true in mvn verify.
A virtualized cluster with 4 nodes is started, and
then Asterix is started via managix on this cluster,
and then stopped.

Change-Id: I7e3cdcd4162ada19ee1e15f532be7447b4f34367
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/31
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@uci.edu>
Reviewed-by: Zachary Heilbron <zheilbron@gmail.com>
Reviewed-by: Till Westmann <westmann@gmail.com>
Reviewed-by: Chris Hillery <ceej@lambda.nu>
diff --git a/asterix-installer/src/test/resources/clusterts/Vagrantfile b/asterix-installer/src/test/resources/clusterts/Vagrantfile
new file mode 100644
index 0000000..fdd1852
--- /dev/null
+++ b/asterix-installer/src/test/resources/clusterts/Vagrantfile
@@ -0,0 +1,52 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+    config.vm.provider "virtualbox" do |v|
+        v.memory =2048
+        v.cpus = 2
+    end
+    config.vm.provision "file", source: "id_rsa", destination: "/home/vagrant/.ssh/id_rsa"
+    config.vm.provision "file", source: "known_hosts", destination: "/home/vagrant/.ssh/known_hosts"
+    config.vm.provision "file", source: "hosts", destination: "/home/vagrant/hosts"
+
+    config.vm.provision "shell", inline: "mv /home/vagrant/hosts /etc/hosts"
+    config.vm.provision "shell", privileged: false, inline: "chmod 400 /home/vagrant/.ssh/id_rsa"
+    $java_inst = <<-END
+        wget -q --no-cookies --no-check-certificate \
+        --header 'Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie' \
+        'http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm' \
+        -O /tmp/jdk.rpm;
+
+        sudo yum -y localinstall /tmp/jdk.rpm;
+        sudo yum -y install unzip;
+
+    END
+    config.vm.provision "shell", inline: $java_inst
+
+    config.vm.define "nc3" do |nc|
+        nc.vm.box = "chef/centos-6.5"
+        nc.vm.hostname = "nc3"
+        nc.vm.network "private_network", ip: "10.10.0.5"
+    end
+    config.vm.define "nc2" do |nc|
+        nc.vm.box = "chef/centos-6.5"
+        nc.vm.hostname = "nc2"
+        nc.vm.network "private_network", ip: "10.10.0.4"
+    end
+    config.vm.define "nc1" do |nc|
+        nc.vm.box = "chef/centos-6.5"
+        nc.vm.hostname = "nc1"
+        nc.vm.network "private_network", ip: "10.10.0.3"
+    end
+
+    config.vm.define "cc" do |cc|
+        cc.vm.box = "chef/centos-6.5"
+        cc.vm.hostname = "cc"
+        cc.vm.network "private_network", ip: "10.10.0.2"
+    end
+
+end
diff --git a/asterix-installer/src/test/resources/clusterts/cluster.xml b/asterix-installer/src/test/resources/clusterts/cluster.xml
new file mode 100644
index 0000000..78e8e7e
--- /dev/null
+++ b/asterix-installer/src/test/resources/clusterts/cluster.xml
@@ -0,0 +1,45 @@
+    <cluster xmlns="cluster">
+
+      <name>vagrant</name>
+
+      <username>vagrant</username>
+
+      <working_dir>
+              <dir>/vagrant/managix-working</dir>
+              <NFS>true</NFS>
+      </working_dir>
+
+      <log_dir>/home/vagrant/logs/</log_dir>
+      <txn_log_dir>/home/vagrant/tx_logs</txn_log_dir>
+
+      <iodevices>/home/vagrant</iodevices>
+
+      <store>storage</store>
+
+      <java_home>/usr/java/jdk1.7.0_51</java_home>
+
+      <master_node>
+          <id>cc</id>
+          <client_ip>10.10.0.2</client_ip>
+          <cluster_ip>10.10.0.2</cluster_ip>
+          <client_port>1098</client_port>
+          <cluster_port>1099</cluster_port>
+          <http_port>8888</http_port>
+      </master_node>
+      <node>
+          <id>nc0</id>
+          <cluster_ip>10.10.0.2</cluster_ip>
+      </node>
+      <node>
+          <id>nc1</id>
+          <cluster_ip>10.10.0.3</cluster_ip>
+      </node>
+      <node>
+          <id>nc2</id>
+          <cluster_ip>10.10.0.4</cluster_ip>
+      </node>
+      <node>
+          <id>nc3</id>
+          <cluster_ip>10.10.0.5</cluster_ip>
+      </node>
+</cluster>
diff --git a/asterix-installer/src/test/resources/clusterts/hosts b/asterix-installer/src/test/resources/clusterts/hosts
new file mode 100644
index 0000000..3a5e4bd
--- /dev/null
+++ b/asterix-installer/src/test/resources/clusterts/hosts
@@ -0,0 +1,6 @@
+127.0.0.1	localhost localhost.localdomain localhost4 localhost4.localdomain4
+::1		localhost localhost.localdomain localhost6 localhost6.localdomain6
+10.10.0.2	cc
+10.10.0.3	nc1
+10.10.0.4	nc2
+10.10.0.5	nc3
diff --git a/asterix-installer/src/test/resources/clusterts/id_rsa b/asterix-installer/src/test/resources/clusterts/id_rsa
new file mode 100644
index 0000000..7d6a083
--- /dev/null
+++ b/asterix-installer/src/test/resources/clusterts/id_rsa
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
+w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
+kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
+hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
+Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
+yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
+ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
+Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXph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bYoQ
+NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
+-----END RSA PRIVATE KEY-----
diff --git a/asterix-installer/src/test/resources/clusterts/known_hosts b/asterix-installer/src/test/resources/clusterts/known_hosts
new file mode 100644
index 0000000..a960382
--- /dev/null
+++ b/asterix-installer/src/test/resources/clusterts/known_hosts
@@ -0,0 +1,11 @@
+127.0.0.1 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAv+VDpocINo7EnBb6PWeSCVvzxi3kNxo8uLpM04ZZUEKXYv8OkbRc+MLiBKuOHscXSdiwP016gMVCyVQmyrggUEQ1KvDSZFHDLcSSheuEiCTyxGdc0nFSG2E6AS+fth3zjL1mIj+G0U7FNHv4EVScNCFSpBQUsJwPpX9GRHtvpEZmtPgysnz5WCCv/7lCnKQubQRVffE2V24Kg2x4anUF23xaOJU75ZAi3uIZBrOOdQJKUqTLpUIcqE6BU3U0kqx+9hkPQYj/FhWyqn2GB9N+h8u6uvbEcsVtNPxWJEdE2/4rDjQBMHy6kXC6n2MG/q4gMVyLVy7IuP4vBccEOracew==
+localhost ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAv+VDpocINo7EnBb6PWeSCVvzxi3kNxo8uLpM04ZZUEKXYv8OkbRc+MLiBKuOHscXSdiwP016gMVCyVQmyrggUEQ1KvDSZFHDLcSSheuEiCTyxGdc0nFSG2E6AS+fth3zjL1mIj+G0U7FNHv4EVScNCFSpBQUsJwPpX9GRHtvpEZmtPgysnz5WCCv/7lCnKQubQRVffE2V24Kg2x4anUF23xaOJU75ZAi3uIZBrOOdQJKUqTLpUIcqE6BU3U0kqx+9hkPQYj/FhWyqn2GB9N+h8u6uvbEcsVtNPxWJEdE2/4rDjQBMHy6kXC6n2MG/q4gMVyLVy7IuP4vBccEOracew==
+10.10.0.2 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAv+VDpocINo7EnBb6PWeSCVvzxi3kNxo8uLpM04ZZUEKX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