You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2019/01/03 18:37:02 UTC

[GitHub] balesh2 closed pull request #29: Use a dedicated separate profile to work with AWS.

balesh2 closed pull request #29: Use a dedicated separate profile to work with AWS.
URL: https://github.com/apache/geode-benchmarks/pull/29
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/infrastructure/scripts/aws/README.md b/infrastructure/scripts/aws/README.md
index f3bcb77..4395c58 100644
--- a/infrastructure/scripts/aws/README.md
+++ b/infrastructure/scripts/aws/README.md
@@ -4,12 +4,12 @@ These utilities create instances and run tests in your AWS account
 
 # Prerequisites
 * You must have the aws cli installed.
-* You must also set your secret key for the CLI. See the [Amazon's instructions](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
+* You must also set your secret key for the CLI. You must set up a proflie named `geode-benchmarks`, so use the command `aws configure --prefix geode-benchmarks` to configure the CLI. See [Amazon's instructions](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
 * To build the image, you must have packer installed
 
 # Image
 
-Before using the scripts below, build the image in the image directory using packer.
+Before using the scripts below, build the image in the image directory using the `build_image.sh` script.
 
 # launch_cluster.sh
 `launch_cluster.sh` creates an instance group in AWS based on an image created.
diff --git a/infrastructure/scripts/aws/destroy_cluster.sh b/infrastructure/scripts/aws/destroy_cluster.sh
index 82d98c6..419ab09 100755
--- a/infrastructure/scripts/aws/destroy_cluster.sh
+++ b/infrastructure/scripts/aws/destroy_cluster.sh
@@ -19,6 +19,8 @@
 
 TAG=${1}
 
+export AWS_PROFILE="geode-benchmarks"
+
 pushd ../../../
 ./gradlew destroyCluster --args "${TAG}"
 popd
diff --git a/infrastructure/scripts/aws/image/build_image.sh b/infrastructure/scripts/aws/image/build_image.sh
new file mode 100644
index 0000000..2aa9ef1
--- /dev/null
+++ b/infrastructure/scripts/aws/image/build_image.sh
@@ -0,0 +1,21 @@
+#!/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.
+
+export AWS_PROFILE="geode-benchmarks"
+packer build packer.json
diff --git a/infrastructure/scripts/aws/launch_cluster.sh b/infrastructure/scripts/aws/launch_cluster.sh
index 11eb852..c177b35 100755
--- a/infrastructure/scripts/aws/launch_cluster.sh
+++ b/infrastructure/scripts/aws/launch_cluster.sh
@@ -21,6 +21,7 @@ set -e
 
 TAG=${1}
 COUNT=${2}
+export AWS_PROFILE="geode-benchmarks"
 
 pushd ../../../
 ./gradlew launchCluster --args "${TAG} ${COUNT}"
diff --git a/infrastructure/scripts/aws/run_tests.sh b/infrastructure/scripts/aws/run_tests.sh
index ca583d0..4e2ba4a 100755
--- a/infrastructure/scripts/aws/run_tests.sh
+++ b/infrastructure/scripts/aws/run_tests.sh
@@ -23,6 +23,7 @@ BRANCH=${2:-develop}
 BENCHMARK_BRANCH=${3:-develop}
 OUTPUT=${4:-output-${DATE}-${TAG}}
 PREFIX="geode-performance-${TAG}"
+export AWS_PROFILE="geode-benchmarks"
 
 SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/.ssh/geode-benchmarks/${TAG}.pem"
 HOSTS=`aws ec2 describe-instances --query 'Reservations[*].Instances[*].PrivateIpAddress' --filter "Name=tag:geode-benchmarks,Values=${TAG}" --output text`


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services