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