You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by he...@apache.org on 2019/01/03 18:37:05 UTC

[geode-benchmarks] branch develop updated: Use a dedicated separate profile to work with AWS. (#29)

This is an automated email from the ASF dual-hosted git repository.

heybales 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 fac47bf  Use a dedicated separate profile to work with AWS. (#29)
fac47bf is described below

commit fac47bf04c67bad110fe27d4e7a9003b35ea7b2c
Author: Sean Goller <se...@goller.net>
AuthorDate: Thu Jan 3 10:37:00 2019 -0800

    Use a dedicated separate profile to work with AWS. (#29)
    
    * Use a dedicated separate profile to work with AWS.
    
    * all scripts now use an AWS profile named `geode-benchmarks`.
    * Add script to build AMI.
    
    Authored-by: Sean Goller <sg...@pivotal.io>
---
 infrastructure/scripts/aws/README.md                               | 4 ++--
 infrastructure/scripts/aws/destroy_cluster.sh                      | 2 ++
 .../scripts/aws/{destroy_cluster.sh => image/build_image.sh}       | 7 ++-----
 infrastructure/scripts/aws/launch_cluster.sh                       | 1 +
 infrastructure/scripts/aws/run_tests.sh                            | 1 +
 5 files changed, 8 insertions(+), 7 deletions(-)

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/destroy_cluster.sh b/infrastructure/scripts/aws/image/build_image.sh
old mode 100755
new mode 100644
similarity index 91%
copy from infrastructure/scripts/aws/destroy_cluster.sh
copy to infrastructure/scripts/aws/image/build_image.sh
index 82d98c6..2aa9ef1
--- a/infrastructure/scripts/aws/destroy_cluster.sh
+++ b/infrastructure/scripts/aws/image/build_image.sh
@@ -17,8 +17,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-TAG=${1}
-
-pushd ../../../
-./gradlew destroyCluster --args "${TAG}"
-popd
+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`