You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2019/02/20 20:14:11 UTC
[geode-benchmarks] branch develop updated: GEODE-6411: Fixes help
This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git
The following commit(s) were added to refs/heads/develop by this push:
new a8a6d83 GEODE-6411: Fixes help
a8a6d83 is described below
commit a8a6d8309a1c59bffa02d32d507a91f51151ee7e
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Wed Feb 20 12:13:59 2019 -0800
GEODE-6411: Fixes help
- Adds run_on_cluster script
`./run_on_cluster.sh -t cluster -- pkill java`
---
infrastructure/scripts/aws/run_against_baseline.sh | 39 +++++++------
infrastructure/scripts/aws/run_on_cluster.sh | 64 ++++++++++++++++++++++
infrastructure/scripts/aws/run_tests.sh | 29 ++++++----
3 files changed, 105 insertions(+), 27 deletions(-)
diff --git a/infrastructure/scripts/aws/run_against_baseline.sh b/infrastructure/scripts/aws/run_against_baseline.sh
index a5fc247..18f2e3a 100755
--- a/infrastructure/scripts/aws/run_against_baseline.sh
+++ b/infrastructure/scripts/aws/run_against_baseline.sh
@@ -19,14 +19,20 @@
set -e -o pipefail
-BENCHMARK_REPO='https://github.com/apache/geode-benchmarks'
-BENCHMARK_BRANCH='develop'
+DEFAULT_BENCHMARK_REPO='https://github.com/apache/geode-benchmarks'
+BENCHMARK_REPO=${DEFAULT_BENCHMARK_REPO}
+DEFAULT_BENCHMARK_BRANCH='develop'
+BENCHMARK_BRANCH=${DEFAULT_BENCHMARK_BRANCH}
-REPO='https://github.com/apache/geode'
-BRANCH='develop'
+DEFAULT_REPO='https://github.com/apache/geode'
+REPO=${DEFAULT_REPO}
+DEFAULT_BRANCH='develop'
+BRANCH=${DEFAULT_BRANCH}
-BASELINE_REPO='https://github.com/apache/geode'
-BASELINE_VERSION=1.8.0
+DEFAULT_BASELINE_REPO='https://github.com/apache/geode'
+BASELINE_REPO=${DEFAULT_BASELINE_REPO}
+DEFAULT_BASELINE_VERSION=1.8.0
+BASELINE_VERSION=${DEFAULT_BASELINE_VERSION}
while getopts ":t:r:b:v:p:e:R:B:V:m:o:h" opt; do
case ${opt} in
@@ -64,19 +70,20 @@ while getopts ":t:r:b:v:p:e:R:B:V:m:o:h" opt; do
BASELINE_VERSION=$OPTARG
;;
h )
- echo "Usage: run_test.sh -t [tag] [-v [version] | -b [branch]] [-V [baseline version] | -B [baseline branch]] <options...>"
+ echo "Usage: $(basename "$0") -t tag [options ...] [-- arguments ...]"
echo "Options:"
- echo "-p : Benchmark repo (optional - defaults to Apache)"
- echo "-e : Benchmark branch (optional - defaults to develop)"
- echo "-o : Output directory (optional - defaults to ./output-<date>-<tag>)"
+ echo "-t : Cluster tag"
+ echo "-p : Benchmark repo (default: ${DEFAULT_BENCHMARK_REPO})"
+ echo "-e : Benchmark branch (default: ${DEFAULT_BENCHMARK_BRANCH})"
+ echo "-o : Output directory (defaults: ./output-<date>-<tag>)"
echo "-v : Geode version"
- echo "-r : Geode repo (optional - defaults to Apache)"
- echo "-b : Geode branch"
- echo "-V : Geode baseline version"
- echo "-R : Geode baseline repo (optional - defaults to Apache)"
+ echo "-r : Geode repo (default: ${DEFAULT_REPO})"
+ echo "-b : Geode branch (default: ${DEFAULT_BRANCH})"
+ echo "-V : Geode baseline version (default: ${DEFAULT_BASELINE_VERSION})"
+ echo "-R : Geode baseline repo (default: ${DEFAULT_BASELINE_REPO})"
echo "-B : Geode baseline branch"
- echo "-t : Cluster tag"
- echo "-m : Test metadata to output to file, comma-delimited (optional)"
+ echo "-m : Test metadata to output to file, comma-delimited"
+ echo "-- : All subsequent arguments are passed to the benchmark task as arguments."
echo "-h : This help message"
exit 1
;;
diff --git a/infrastructure/scripts/aws/run_on_cluster.sh b/infrastructure/scripts/aws/run_on_cluster.sh
new file mode 100755
index 0000000..8febc94
--- /dev/null
+++ b/infrastructure/scripts/aws/run_on_cluster.sh
@@ -0,0 +1,64 @@
+#!/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.
+
+set -o pipefail
+
+BENCHMARK_REPO='https://github.com/apache/geode-benchmarks'
+BENCHMARK_BRANCH='develop'
+
+REPO='https://github.com/apache/geode'
+
+while getopts ":t:h" opt; do
+ case ${opt} in
+ t )
+ TAG=$OPTARG
+ ;;
+ h )
+ echo "Usage: $(basename "$0") -t tag -- command args ..."
+ echo "Options:"
+ echo "-t : Cluster tag"
+ echo "-h : This help message"
+ exit 1
+ ;;
+ \? )
+ echo "Invalid option: $OPTARG" 1>&2
+ ;;
+ : )
+ echo "Invalid option: $OPTARG requires an argument" 1>&2
+ ;;
+ esac
+done
+shift $((OPTIND -1))
+
+if [ -z "${TAG}" ]; then
+ echo "--tag argument is required."
+ exit 1
+fi
+
+if [[ -z "${AWS_ACCESS_KEY_ID}" ]]; then
+ export AWS_PROFILE="geode-benchmarks"
+fi
+
+SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/.ssh/geode-benchmarks/${TAG}.pem"
+HOSTS=`aws ec2 describe-instances --query 'Reservations[*].Instances[*].PublicIpAddress' --filter "Name=tag:geode-benchmarks,Values=${TAG}" --output text`
+
+for host in ${HOSTS}; do
+ echo "Executing on ${host}."
+ ssh ${SSH_OPTIONS} geode@${host} "$@"
+done
diff --git a/infrastructure/scripts/aws/run_tests.sh b/infrastructure/scripts/aws/run_tests.sh
index 0edd4d3..2efd202 100755
--- a/infrastructure/scripts/aws/run_tests.sh
+++ b/infrastructure/scripts/aws/run_tests.sh
@@ -17,12 +17,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set -x -e -o pipefail
+set -e -o pipefail
-BENCHMARK_REPO='https://github.com/apache/geode-benchmarks'
-BENCHMARK_BRANCH='develop'
+DEFAULT_BENCHMARK_REPO='https://github.com/apache/geode-benchmarks'
+BENCHMARK_REPO=${DEFAULT_BENCHMARK_REPO}
+DEFAULT_BENCHMARK_BRANCH='develop'
+BENCHMARK_BRANCH=${DEFAULT_BENCHMARK_BRANCH}
+
+DEFAULT_REPO='https://github.com/apache/geode'
+REPO=${DEFAULT_REPO}
+DEFAULT_BRANCH='develop'
+BRANCH=${DEFAULT_BRANCH}
-REPO='https://github.com/apache/geode'
while getopts ":t:r:b:v:p:e:R:B:V:m:o:h" opt; do
case ${opt} in
@@ -51,16 +57,17 @@ while getopts ":t:r:b:v:p:e:R:B:V:m:o:h" opt; do
VERSION=$OPTARG
;;
h )
- echo "Usage: run_test.sh -t [tag] [-v [version] | -b [branch]] <options...>"
+ echo "Usage: $(basename "$0") -t tag [options ...] [-- arguments ...]"
echo "Options:"
- echo "-p : Benchmark repo (optional - defaults to Apache)"
- echo "-e : Benchmark branch (optional - defaults to develop)"
- echo "-o : Output directory (optional - defaults to ./output-<date>-<tag>)"
- echo "-v : Geode version"
- echo "-r : Geode repo (optional - defaults to Apache)"
- echo "-b : Geode branch"
echo "-t : Cluster tag"
+ echo "-p : Benchmark repo (default: ${DEFAULT_BENCHMARK_REPO})"
+ echo "-e : Benchmark branch (default: ${DEFAULT_BENCHMARK_BRANCH})"
+ echo "-o : Output directory (defaults: ./output-<date>-<tag>)"
+ echo "-v : Geode version"
+ echo "-r : Geode repo (default: ${DEFAULT_REPO})"
+ echo "-b : Geode branch (default: ${DEFAULT_BRANCH})"
echo "-m : Test metadata to output to file, comma-delimited (optional)"
+ echo "-- : All subsequent arguments are passed to the benchmark task as arguments."
echo "-h : This help message"
exit 1
;;