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/pom.xml b/asterix-installer/pom.xml
index 96316bb..ad25bed 100644
--- a/asterix-installer/pom.xml
+++ b/asterix-installer/pom.xml
@@ -1,12 +1,17 @@
-<!-- ! Copyright 2009-2013 by The Regents of the University of California 
-	! Licensed under the Apache License, Version 2.0 (the "License"); ! you may 
-	not use this file except in compliance with the License. ! you may obtain 
-	a copy of the License from ! ! http://www.apache.org/licenses/LICENSE-2.0 
-	! ! Unless required by applicable law or agreed to in writing, software ! 
-	distributed under the License is distributed on an "AS IS" BASIS, ! WITHOUT 
-	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ! See the 
-	License for the specific language governing permissions and ! limitations 
-	under the License. ! -->
+<!--
+ ! Copyright 2009-2013 by The Regents of the University of California
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! you may obtain a copy of the License from
+ ! 
+ !     http://www.apache.org/licenses/LICENSE-2.0
+ ! 
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
@@ -18,6 +23,7 @@
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<failsafe.test.excludes>**/DmlRecoveryIT.java</failsafe.test.excludes>
+        <cluster.test.excludes>**/AsterixClusterLifeCycleIT.java</cluster.test.excludes>
 	</properties>
 
 	<build>
@@ -109,6 +115,7 @@
 					<forkMode>pertest</forkMode>
 					<excludes>
 						<exclude>${failsafe.test.excludes}</exclude>
+                        <exclude>${cluster.test.excludes}</exclude>
 					</excludes>
 				</configuration>
 				<executions>
@@ -123,6 +130,79 @@
 		</plugins>
 	</build>
 
+
+    <profiles>
+        <profile>
+            <id>cluster-tests</id>
+            <activation>
+                 <activeByDefault>false</activeByDefault>
+                 <property>
+                     <name>clusterTest</name>
+                     <value>true</value>
+                 </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                      <groupId>net.ju-n.maven.plugins</groupId>
+                      <artifactId>vagrant-maven-plugin</artifactId>
+                      <version>1.1.0-SNAPSHOT</version>
+                      <executions>
+
+                        <!-- Before tests: import box, start VM -->
+                        <execution>
+                          <id>setup-and-start-vagrant-vm</id>
+                          <phase>pre-integration-test</phase>
+                          <goals>
+                            <goal>up</goal>
+                          </goals>
+                          <configuration>
+                            <box>chef/centos-6.5</box>
+                            <url>https://vagrantcloud.com/chef/centos-6.5</url>
+                            <vagrantHome>${project.basedir}/src/test/resources/clusterts</vagrantHome>
+                          </configuration>
+                        </execution>
+
+                        <!-- After tests: shut down, destroy VM -->
+                        <execution>
+                          <id>destroy-vagrant-vm</id>
+                          <phase>post-integration-test</phase>
+                          <goals>
+                            <goal>destroy</goal>
+                          </goals>
+                          <configuration>
+                            <box>chef/centos-6.5</box>
+                            <url>https://vagrantcloud.com/chef/centos-6.5</url>
+                            <vagrantHome>${project.basedir}/src/test/resources/clusterts</vagrantHome>
+                          </configuration>
+                        </execution>
+                      </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <version>2.6</version>
+                        <configuration>
+                            <runOrder>alphabetical</runOrder>
+                            <forkMode>pertest</forkMode>
+                            <excludes>
+                                <exclude>${failsafe.test.excludes}</exclude>
+                            </excludes>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                 </plugins>
+             </build>
+         </profile>
+      </profiles>
+
 	<dependencies>
 		<dependency>
 			<groupId>args4j</groupId>