aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvans Ye <evansye@apache.org>2015-03-26 03:07:51 +0000
committerEvans Ye <evansye@apache.org>2015-04-01 15:59:23 +0000
commita5b1ad7d1a692a25c5960d6ac2971dce5feb73e4 (patch)
treeb7d8c057613c57caae537f1511704be8bdad0771
parentad784a9a0b8e192a1209259319676454e59091d8 (diff)
downloadbigtop-odpi-a5b1ad7d1a692a25c5960d6ac2971dce5feb73e4.tar.gz
BIGTOP-1771. Let the user specify what components to be tested when running smoke-tests by Docker/VM provisioner
-rwxr-xr-xbigtop-deploy/vm/utils/smoke-tests.sh8
-rwxr-xr-xbigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh3
-rw-r--r--bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig.yaml1
-rw-r--r--bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig_debian.yaml1
-rwxr-xr-xbigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile8
-rw-r--r--bigtop-deploy/vm/vagrant-puppet-vm/vagrantconfig.yaml3
6 files changed, 18 insertions, 6 deletions
diff --git a/bigtop-deploy/vm/utils/smoke-tests.sh b/bigtop-deploy/vm/utils/smoke-tests.sh
index 581e5fbc..dff51a55 100755
--- a/bigtop-deploy/vm/utils/smoke-tests.sh
+++ b/bigtop-deploy/vm/utils/smoke-tests.sh
@@ -1,5 +1,6 @@
#!/bin/bash
HCFS_USER="hdfs"
+SMOKE_TESTS=${1:-mapreduce,pig}
export HADOOP_CONF_DIR=/etc/hadoop/conf/
export BIGTOP_HOME=/bigtop-home/
@@ -7,6 +8,7 @@ export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce/
export HIVE_HOME=/usr/lib/hive/
export PIG_HOME=/usr/lib/pig/
export FLUME_HOME=/usr/lib/flume/
+export SQOOP_HOME=/usr/lib/sqoop/
export HIVE_CONF_DIR=/etc/hive/conf/
export JAVA_HOME="/usr/lib/jvm/java-openjdk/"
export MAHOUT_HOME="/usr/lib/mahout"
@@ -17,8 +19,8 @@ su -s /bin/bash $HCFS_USER -c 'hadoop fs -chmod 777 /user/vagrant'
su -s /bin/bash $HCFS_USER -c 'hadoop fs -chmod 777 /user/root'
if [ -f /etc/debian_version ] ; then
- apt-get -y install pig hive flume mahout
+ apt-get -y install pig hive flume mahout sqoop
else
- yum install -y pig hive flume mahout
+ yum install -y pig hive flume mahout sqoop
fi
-cd /bigtop-home/bigtop-tests/smoke-tests && ./gradlew clean compileGroovy test -Dsmoke.tests=mapreduce,pig --info
+cd /bigtop-home/bigtop-tests/smoke-tests && ./gradlew clean compileGroovy test -Dsmoke.tests=$SMOKE_TESTS --info
diff --git a/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh b/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh
index d6e95bf0..63c18fd1 100755
--- a/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh
+++ b/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh
@@ -64,7 +64,8 @@ provision() {
smoke-tests() {
nodes=(`vagrant status |grep running |grep -v image |awk '{print $1}'`)
- echo "/bigtop-home/bigtop-deploy/vm/utils/smoke-tests.sh" |vagrant ssh ${nodes[0]}
+ smoke_test_components="`echo $(get-yaml-config smoke_test_components) | sed 's/ /,/g'`"
+ echo "/bigtop-home/bigtop-deploy/vm/utils/smoke-tests.sh \"$smoke_test_components\"" |vagrant ssh ${nodes[0]}
}
diff --git a/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig.yaml b/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig.yaml
index fa556710..5eeeb45b 100644
--- a/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig.yaml
+++ b/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig.yaml
@@ -13,4 +13,5 @@ namenode_ui_port: "50070"
yarn_ui_port: "8088"
hbase_ui_port: "60010"
enable_local_repo: false
+smoke_test_components: [mapreduce, pig]
jdk: "java-1.7.0-openjdk-devel.x86_64"
diff --git a/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig_debian.yaml b/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig_debian.yaml
index 008c15ca..012fd367 100644
--- a/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig_debian.yaml
+++ b/bigtop-deploy/vm/vagrant-puppet-docker/vagrantconfig_debian.yaml
@@ -13,4 +13,5 @@ namenode_ui_port: "50070"
yarn_ui_port: "8088"
hbase_ui_port: "60010"
enable_local_repo: false
+smoke_test_components: [mapreduce, pig]
jdk: "openjdk-7-jdk"
diff --git a/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile b/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
index 9cf04769..5384b8cb 100755
--- a/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
+++ b/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
@@ -38,6 +38,9 @@ components = CONF['components']
# Whether to run smoke tests
run_smoke_tests = CONF['run_smoke_tests']
+# Smoke test Components to run
+smoke_test_components = CONF['smoke_test_components'].join(',')
+
# This is a update to allow dev packages
# Force success - not worried if this step fails, since we generally only use it for development.
enable_local_repo = CONF['enable_local_repo']
@@ -120,7 +123,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if run_smoke_tests then
if i==num_instances then
puts "creating provisioner directive for running tests"
- bigtop.vm.provision "shell", path: "../utils/smoke-tests.sh"
+ bigtop.vm.provision :shell do |shell|
+ shell.path = "../utils/smoke-tests.sh"
+ shell.args = ["#{smoke_test_components}"]
+ end
else
puts "Not creating provisioner directive for tests yet... only on vm #{i} of #{num_instances}"
end
diff --git a/bigtop-deploy/vm/vagrant-puppet-vm/vagrantconfig.yaml b/bigtop-deploy/vm/vagrant-puppet-vm/vagrantconfig.yaml
index 33ef53b7..0b3b84dd 100644
--- a/bigtop-deploy/vm/vagrant-puppet-vm/vagrantconfig.yaml
+++ b/bigtop-deploy/vm/vagrant-puppet-vm/vagrantconfig.yaml
@@ -3,8 +3,9 @@ number_cpus: 1
box: "puppetlabs/centos-6.6-64-nocm"
repo: "http://bigtop01.cloudera.org:8080/view/Releases/job/Bigtop-0.8.0/label=centos6/6/artifact/output/"
num_instances: 1
+distro: centos
components: [hadoop, yarn]
enable_local_repo: false
run_smoke_tests: false
-distro: centos
+smoke_test_components: [mapredcue, pig]
jdk: "java-1.7.0-openjdk-devel.x86_64"