You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rh...@apache.org on 2020/08/12 17:48:05 UTC

[geode-benchmarks] branch develop updated: Revert "allow AMI picking with arbitrary username accounts (#132)" (#133)

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

rhoughton 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 0d640d4  Revert "allow AMI picking with arbitrary username accounts (#132)" (#133)
0d640d4 is described below

commit 0d640d4073e733f6f0f45905373395d1acea52dc
Author: Robert Houghton <rh...@pivotal.io>
AuthorDate: Wed Aug 12 10:47:56 2020 -0700

    Revert "allow AMI picking with arbitrary username accounts (#132)" (#133)
    
    This reverts commit 3e3bdd3a371e400db0ce2ce2d736ab06f9244ed1.
---
 infrastructure/build.gradle                        |  2 +-
 infrastructure/scripts/aws/destroy_cluster.sh      | 11 +---------
 infrastructure/scripts/aws/launch_cluster.sh       | 24 ++--------------------
 .../infrastructure/aws/AwsBenchmarkMetadata.java   |  7 +------
 .../geode/infrastructure/aws/LaunchCluster.java    |  1 -
 5 files changed, 5 insertions(+), 40 deletions(-)

diff --git a/infrastructure/build.gradle b/infrastructure/build.gradle
index 6b23c3b..41f3a71 100644
--- a/infrastructure/build.gradle
+++ b/infrastructure/build.gradle
@@ -43,7 +43,7 @@ task(launchCluster, dependsOn: 'classes', type: JavaExec) {
 
   systemProperty 'TEST_CI', project.findProperty('ci')
   systemProperty 'PURPOSE', project.findProperty('purpose')
-  systemProperty 'USER', project.findProperty('user')
+
 }
 
 task(destroyCluster, dependsOn: 'classes', type: JavaExec) {
diff --git a/infrastructure/scripts/aws/destroy_cluster.sh b/infrastructure/scripts/aws/destroy_cluster.sh
index 5bab232..a56d8e2 100755
--- a/infrastructure/scripts/aws/destroy_cluster.sh
+++ b/infrastructure/scripts/aws/destroy_cluster.sh
@@ -17,15 +17,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
-  SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-  SOURCE="$(readlink "$SOURCE")"
-  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
 TAG=
 CI=
 
@@ -72,6 +63,6 @@ if [ -z "${CI}" ]; then
   CI=0
 fi
 
-pushd "${SCRIPTDIR}/../../../"
+pushd ../../../
 ./gradlew destroyCluster -Pci=${CI} --args "${TAG}"
 popd
diff --git a/infrastructure/scripts/aws/launch_cluster.sh b/infrastructure/scripts/aws/launch_cluster.sh
index c7d164a..600f0d9 100755
--- a/infrastructure/scripts/aws/launch_cluster.sh
+++ b/infrastructure/scripts/aws/launch_cluster.sh
@@ -19,14 +19,6 @@
 
 set -e
 
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
-  SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-  SOURCE="$(readlink "$SOURCE")"
-  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
 TAG=
 COUNT=
 CI=
@@ -63,15 +55,6 @@ while (( "$#" )); do
         exit 1
       fi
       ;;
-    -u|--user )
-      if [ "${2}" ]; then
-        USER="${2}"
-        shift
-    else
-      echo 'ERROR: "--user" requires a non-empty argument.'
-      exit 1
-    fi
-    ;;
     -h|--help|-\? )
       echo "Usage: $(basename "$0") -t tag -c 4 [options ...] [-- arguments ...]"
       echo "Options:"
@@ -101,10 +84,7 @@ fi
 
 CI=${CI:-0}
 PURPOSE=${PURPOSE:-"geode-benchmarks"}
-if [[ ! -z "${USER}" ]]; then
-  USER_ARG="-Puser=${USER}"
-fi
 
-pushd "${SCRIPTDIR}/../../../"
-./gradlew launchCluster "${USER_ARG}" -Pci=${CI} -Ppurpose=${PURPOSE} --args "${TAG} ${COUNT}"
+pushd ../../../
+./gradlew launchCluster -Pci=${CI} -Ppurpose=${PURPOSE} --args "${TAG} ${COUNT}"
 popd
diff --git a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/AwsBenchmarkMetadata.java b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/AwsBenchmarkMetadata.java
index 8ae430b..ed99626 100644
--- a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/AwsBenchmarkMetadata.java
+++ b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/AwsBenchmarkMetadata.java
@@ -26,16 +26,11 @@ import org.apache.geode.infrastructure.BenchmarkMetadata;
  * Static methods to generate common strings used for AWS infrastructure.
  */
 class AwsBenchmarkMetadata extends BenchmarkMetadata {
-  public static String USER = "geode";
+  public static final String USER = "geode";
   public static final int POLL_INTERVAL = 15000;
   public static InstanceType INSTANCE_TYPE = InstanceType.C5_18_XLARGE;
   public static Tenancy TENANCY = Tenancy.DEDICATED;
 
-  public static String setUserName(String user) {
-    USER = user;
-    return USER;
-  }
-
   public static String securityGroup(String tag) {
     return BenchmarkMetadata.benchmarkString(tag, "securityGroup");
   }
diff --git a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
index ff2d96b..5068f92 100644
--- a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
+++ b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
@@ -92,7 +92,6 @@ public class LaunchCluster {
       usage("Usage: LaunchCluster <tag> <count>");
     }
 
-    AwsBenchmarkMetadata.setUserName(System.getProperty("USER", AwsBenchmarkMetadata.USER));
     List<Tag> tags = getTags(benchmarkTag);
     createKeyPair(benchmarkTag);
     Image newestImage = getNewestImage();