From e1f203131219f4c9214951ec82ecf8af746964c1 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Thu, 1 Jun 2017 12:55:15 -0500 Subject: [PATCH] HBASE-18148 WIP clusterdock based ITs. --- .../clusterdock/build_clusterdock_clusters.sh | 33 +++++++++++++++ .../master_IntegrationTestBigLinkedList.sh | 47 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 dev-support/clusterdock/build_clusterdock_clusters.sh create mode 100644 dev-support/clusterdock/master_IntegrationTestBigLinkedList.sh diff --git a/dev-support/clusterdock/build_clusterdock_clusters.sh b/dev-support/clusterdock/build_clusterdock_clusters.sh new file mode 100644 index 0000000..3d504b2 --- /dev/null +++ b/dev-support/clusterdock/build_clusterdock_clusters.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 at +# +# 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. + +docker version + +case "${HBASE_VERSION}" in + master) + HADOOP_VERSION=2.7.1 ;; + branch-1.3|branch-1.2) + HADOOP_VERSION=2.5.1 ;; +esac + +source /dev/stdin <<< "$(curl -sL http://tiny.cloudera.com/clusterdock_no_sudo.sh)" + +CLUSTERDOCK_TOPOLOGY_IMAGE=${DOCKER_REGISTRY_URL}/${DOCKER_REGISTRY_NAMESPACE}/clusterdock:apache_hbase_topology \ + clusterdock_run ./bin/build_cluster --registry-url=${DOCKER_REGISTRY_URL} \ + --namespace=${DOCKER_REGISTRY_NAMESPACE} -p apache_hbase \ + --hbase-version=${HBASE_VERSION} --hbase-git-commit=${HBASE_VERSION} \ + --hadoop-version=${HADOOP_VERSION} \ + --hadoop-tarball=https://archive.apache.org/dist/hadoop/core/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz diff --git a/dev-support/clusterdock/master_IntegrationTestBigLinkedList.sh b/dev-support/clusterdock/master_IntegrationTestBigLinkedList.sh new file mode 100644 index 0000000..f53bfab --- /dev/null +++ b/dev-support/clusterdock/master_IntegrationTestBigLinkedList.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 at +# +# 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. + +docker version +source /dev/stdin <<< "$(curl -sL http://tiny.cloudera.com/clusterdock_no_sudo.sh)" + +CLUSTERDOCK_TOPOLOGY_IMAGE=${DOCKER_REGISTRY_URL}/${DOCKER_REGISTRY_NAMESPACE}/clusterdock:apache_hbase_topology + +# Store network name so that we can refer to cluster and then +# clean it up at the end of the run. +NETWORK_NAME=network${RANDOM} + +COMMAND=(hbase org.apache.hadoop.hbase.test.IntegrationTestBigLinkedList loop 1 4 10000000 $RANDOM 4 500000 5) +COMMAND+=(-m "${CHAOS_MONKEY}") + +# These aren't parameters because images must first be built by the HBase-Build-clusterdock-clusters job +# in order for clusters to work. +HBASE_VERSION="master" +HADOOP_VERSION="2.7.1" + +# Start a 5-node cluster and then run ITBLL on it. If either of these steps fail, store a non-zero +# exit code and then return it after cleaning up the cluster we started. +if ! clusterdock_run ./bin/start_cluster -n ${NETWORK_NAME} \ + --registry-url=${DOCKER_REGISTRY_URL} --namespace=${DOCKER_REGISTRY_NAMESPACE} apache_hbase \ + --hbase-version="${HBASE_VERSION}" --hadoop-version="${HADOOP_VERSION}" \ + --secondary-nodes='node-{2..5}' || \ + ! clusterdock_ssh node-3.${NETWORK_NAME} "${COMMAND[*]}"; then + EXIT_CODE=1 +fi + +clusterdock_run ./bin/housekeeping remove -n ${NETWORK_NAME} + +exit ${EXIT_CODE} + -- 2.7.2