From d74817fc249ad9e9c88c8cbcacb2d4e962937e92 Mon Sep 17 00:00:00 2001 From: David Sperling Date: Thu, 17 Jan 2019 09:50:27 -0800 Subject: [PATCH 1/3] added 5.0 Dockerfile --- jmeter/4.0/Dockerfile | 49 ++++++++++++++++++++++++++ jmeter/4.0/entrypoint.sh | 74 ++++++++++++++++++++++++++++++++++++++++ jmeter/Dockerfile | 2 +- 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 jmeter/4.0/Dockerfile create mode 100755 jmeter/4.0/entrypoint.sh diff --git a/jmeter/4.0/Dockerfile b/jmeter/4.0/Dockerfile new file mode 100644 index 0000000..aeaf7ae --- /dev/null +++ b/jmeter/4.0/Dockerfile @@ -0,0 +1,49 @@ +FROM openjdk:8-alpine + +LABEL maintainer="David Sperling " + +ENV JMETER_VERSION apache-jmeter-4.0 +ENV JMETER_HOME /opt/$JMETER_VERSION +ENV PATH $PATH:$JMETER_HOME/bin +ENV CMDRUNNER_VERSION 2.2 +ENV PLUGINMGR_VERSION 1.3 + +# overridable environment variables +ENV RESULTS_LOG results.jtl +ENV JMETER_FLAGS= +ENV JMETER_MEMORY -Xms800m -Xmx800m +ENV CUSTOM_PLUGIN_URL= + +# Install the required tools for JMeter +RUN apk add --update --no-cache \ + curl \ + openssh-client + +WORKDIR /opt + +# install JMeter and the JMeter Plugins Manager +RUN curl -O https://archive.apache.org/dist/jmeter/binaries/$JMETER_VERSION.tgz \ + && tar -xvf $JMETER_VERSION.tgz \ + && rm $JMETER_VERSION.tgz \ + && rm -rf $JMETER_VERSION/docs $JMETER_VERSION/printable_docs \ + && cd $JMETER_HOME/lib \ + && curl -O http://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/$CMDRUNNER_VERSION/cmdrunner-$CMDRUNNER_VERSION.jar \ + && cd $JMETER_HOME/lib/ext \ + && curl -O http://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-manager/$PLUGINMGR_VERSION/jmeter-plugins-manager-$PLUGINMGR_VERSION.jar \ + && java -cp jmeter-plugins-manager-$PLUGINMGR_VERSION.jar org.jmeterplugins.repository.PluginManagerCMDInstaller + +# install all available plugins except for those that are deprecated +RUN PluginsManagerCMD.sh install-all-except jpgc-hadoop,jpgc-oauth \ + && sleep 2 \ + && PluginsManagerCMD.sh status + +# copy our entrypoint +COPY entrypoint.sh /opt/jmeter/ + +WORKDIR /logs + +EXPOSE 1099 50000 51000 4445/udp + +# default command in the entrypoint is 'minion' +ENTRYPOINT ["/opt/jmeter/entrypoint.sh"] +CMD ["minion"] diff --git a/jmeter/4.0/entrypoint.sh b/jmeter/4.0/entrypoint.sh new file mode 100755 index 0000000..4112eb2 --- /dev/null +++ b/jmeter/4.0/entrypoint.sh @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Main entrypoint for our Docker image - runs Gru, Minions or other commands + +# any .jmx file passed in the command line we act as 'Gru' +if [ ${1##*.} = 'jmx' ]; then + + if [ "$MINION_HOSTS" = '' ]; then + echo "MINION_HOSTS must be specified - a command separated list of hostnames or IP addresses" + exit 1 + fi + echo "Connecting to $MINION_HOSTS" + + # AWS Public HOSTNAME API + echo "Detecting an AWS Environment" + PUBLIC_HOSTNAME=$(curl -s --max-time 5 http://169.254.169.254/latest/meta-data/public-hostname) + + if [ "$PUBLIC_HOSTNAME" = '' ]; then + echo "Not running in AWS. Using Gru HOSTNAME $HOSTNAME" + else + HOSTNAME=$PUBLIC_HOSTNAME + echo "Using Gru AWS Public HOSTNAME $HOSTNAME" + fi + # empty the logs directory, or jmeter may fail + rm -rf /logs/report /logs/*.log /logs/*.jtl + + # set JAVA HEAP + sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m/'"$JMETER_MEMORY"'/' $JMETER_HOME/bin/jmeter + + # run jmeter in client (gru) mode + exec jmeter -n $JMETER_FLAGS \ + -R $MINION_HOSTS \ + -Dclient.rmi.localport=51000 \ + -Dserver.rmi.ssl.disable=true \ + -Djava.rmi.server.hostname=${PUBLIC_HOSTNAME} \ + -l $RESULTS_LOG \ + -t $1 \ + -e -o /logs/report + +fi + +# act as a 'Minion' +if [ "$1" = 'minion' ]; then + + # AWS Public HOSTNAME API + echo "Detecting an AWS Environment" + PUBLIC_HOSTNAME=$(curl -s --max-time 5 http://169.254.169.254/latest/meta-data/public-hostname) + + if [ "$PUBLIC_HOSTNAME" = '' ]; then + echo "Not running in AWS. Using Minion HOSTNAME $HOSTNAME" + else + HOSTNAME=$PUBLIC_HOSTNAME + echo "Using Minion AWS Public HOSTNAME $HOSTNAME" + fi + + # set JAVA HEAP + sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m/'"$JMETER_MEMORY"'/' $JMETER_HOME/bin/jmeter + + # install custom plugin if requested + if [ "$CUSTOM_PLUGIN_URL" != '' ]; then + echo "Installing custom plugin $CUSTOM_PLUGIN_URL" + CUSTOM_PLUGIN_FILE="${CUSTOM_PLUGIN_URL##*/}" + curl -o $JMETER_HOME/lib/ext/$CUSTOM_PLUGIN_FILE $CUSTOM_PLUGIN_URL + fi + + # run jmeter in server (minion) mode + exec jmeter-server -n \ + -Dserver.rmi.localport=50000 \ + -Dserver.rmi.ssl.disable=true \ + -Djava.rmi.server.hostname=${HOSTNAME} + +fi + +exec "$@" diff --git a/jmeter/Dockerfile b/jmeter/Dockerfile index aeaf7ae..21b0966 100644 --- a/jmeter/Dockerfile +++ b/jmeter/Dockerfile @@ -2,7 +2,7 @@ FROM openjdk:8-alpine LABEL maintainer="David Sperling " -ENV JMETER_VERSION apache-jmeter-4.0 +ENV JMETER_VERSION apache-jmeter-5.0 ENV JMETER_HOME /opt/$JMETER_VERSION ENV PATH $PATH:$JMETER_HOME/bin ENV CMDRUNNER_VERSION 2.2 From 608f257f274db5b22b0d0bd4d741837edcb42f79 Mon Sep 17 00:00:00 2001 From: David Sperling Date: Sat, 19 Jan 2019 13:45:20 -0800 Subject: [PATCH 2/3] JMeter 5.0, removed need to set JMETER_MEMORY --- README.md | 3 +-- aws-setup.sh | 9 ++++++--- jmeter/3.0/Dockerfile | 2 +- jmeter/3.1/Dockerfile | 2 +- jmeter/3.2/Dockerfile | 2 +- jmeter/3.3/Dockerfile | 2 +- jmeter/4.0/Dockerfile | 1 - jmeter/4.0/entrypoint.sh | 10 ++++++---- jmeter/Dockerfile | 1 - jmeter/entrypoint.sh | 14 ++++++++------ lucy/Dockerfile | 2 +- 11 files changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 5ca3aed..87cfadf 100644 --- a/README.md +++ b/README.md @@ -102,10 +102,9 @@ The following required and optional environment variables are supported: |SECURITY_GROUP|Yes|None|AWS Secuirty group that allows ports 22,1099,50000,51000/tcp and 4445/udp from all ports (e.g. sg-12345678)| |SUBNET_ID|Yes|None|One or more Subnets (comma separated) that are assigned to your VPC| |VPC_ID||VPC assigned to SUBNET_ID|We dautomatically erive this from your SUBNET_ID| -|JMETER_VERSION||latest|smithmicro/lucy Image tag. See Docker Hub for [available versions](https://hub.docker.com/r/smithmicro/jmeter/tags/).| +|JMETER_VERSION||latest|smithmicro/jmeter Image tag. See Docker Hub for [available versions](https://hub.docker.com/r/smithmicro/jmeter/tags/).| |INSTANCE_TYPE||t2.micro|To double your memory, pass `t2.small`| |MEM_LIMIT||950m|If you are using t2.small, set MEM_LIMIT to `1995m`| -|JMETER_MEMORY||-Xms800m -Xmx800m|If you are using t2.small, set JMETER_MEMORY to `Xms1600m -Xmx1600m`| |MINION_COUNT||2|| |PEM_PATH||/keys|This must match your Volume map. See Volume section above.| |CLUSTER_NAME||JMeter|Name that appears in your AWS Cluster UI| diff --git a/aws-setup.sh b/aws-setup.sh index 6c8e5ab..78b4363 100755 --- a/aws-setup.sh +++ b/aws-setup.sh @@ -20,6 +20,9 @@ fi if [ "$OWNER" == '' ]; then OWNER=jmeter-ecs fi +if [ "$AWS_REGION" == '' ]; then + AWS_REGION=$(aws configure get region) +fi # keep the tags consistant so we can easily detect if a JMeter VPC already exists VPC_TAGS="Key=Name,Value=JMeter-VPC Key=Owner,Value=$OWNER Key=Stack,Value=JMeter" @@ -43,10 +46,10 @@ echo "Created VPC $VPC_ID" # enable DNS hostnames aws ec2 modify-vpc-attribute --vpc-id $VPC_ID --enable-dns-hostnames --output text -# create a 2 subnets -SUBNET_ID1=$(aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block $SUBNET_CIDR_BLOCK1 \ +# create 2 subnets +SUBNET_ID1=$(aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block $SUBNET_CIDR_BLOCK1 --availability-zone "$AWS_REGION"a \ --query 'Subnet.[SubnetId]' --output text | tr -d '\n') -SUBNET_ID2=$(aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block $SUBNET_CIDR_BLOCK2 \ +SUBNET_ID2=$(aws ec2 create-subnet --vpc-id $VPC_ID --cidr-block $SUBNET_CIDR_BLOCK2 --availability-zone "$AWS_REGION"b \ --query 'Subnet.[SubnetId]' --output text | tr -d '\n') echo "Created Subnets $SUBNET_ID1,$SUBNET_ID2" diff --git a/jmeter/3.0/Dockerfile b/jmeter/3.0/Dockerfile index 211686b..4f03694 100644 --- a/jmeter/3.0/Dockerfile +++ b/jmeter/3.0/Dockerfile @@ -11,7 +11,7 @@ ENV PLUGINMGR_VERSION 1.3 # overridable environment variables ENV RESULTS_LOG results.jtl ENV JMETER_FLAGS= -ENV JMETER_MEMORY -Xms800m -Xmx800m +ENV JMETER_MEMORY -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap ENV CUSTOM_PLUGIN_URL= # Install the required tools for JMeter diff --git a/jmeter/3.1/Dockerfile b/jmeter/3.1/Dockerfile index 2225bfa..b7d2c9f 100644 --- a/jmeter/3.1/Dockerfile +++ b/jmeter/3.1/Dockerfile @@ -11,7 +11,7 @@ ENV PLUGINMGR_VERSION 1.3 # overridable environment variables ENV RESULTS_LOG results.jtl ENV JMETER_FLAGS= -ENV JMETER_MEMORY -Xms800m -Xmx800m +ENV JMETER_MEMORY -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap ENV CUSTOM_PLUGIN_URL= # Install the required tools for JMeter diff --git a/jmeter/3.2/Dockerfile b/jmeter/3.2/Dockerfile index ba22838..fb45b17 100644 --- a/jmeter/3.2/Dockerfile +++ b/jmeter/3.2/Dockerfile @@ -11,7 +11,7 @@ ENV PLUGINMGR_VERSION 1.3 # overridable environment variables ENV RESULTS_LOG results.jtl ENV JMETER_FLAGS= -ENV JMETER_MEMORY -Xms800m -Xmx800m +ENV JMETER_MEMORY -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap ENV CUSTOM_PLUGIN_URL= # Install the required tools for JMeter diff --git a/jmeter/3.3/Dockerfile b/jmeter/3.3/Dockerfile index e3c9ac6..1a75f5b 100644 --- a/jmeter/3.3/Dockerfile +++ b/jmeter/3.3/Dockerfile @@ -11,7 +11,7 @@ ENV PLUGINMGR_VERSION 1.3 # overridable environment variables ENV RESULTS_LOG results.jtl ENV JMETER_FLAGS= -ENV JMETER_MEMORY -Xms800m -Xmx800m +ENV JMETER_MEMORY -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap ENV CUSTOM_PLUGIN_URL= # Install the required tools for JMeter diff --git a/jmeter/4.0/Dockerfile b/jmeter/4.0/Dockerfile index aeaf7ae..461b2ed 100644 --- a/jmeter/4.0/Dockerfile +++ b/jmeter/4.0/Dockerfile @@ -11,7 +11,6 @@ ENV PLUGINMGR_VERSION 1.3 # overridable environment variables ENV RESULTS_LOG results.jtl ENV JMETER_FLAGS= -ENV JMETER_MEMORY -Xms800m -Xmx800m ENV CUSTOM_PLUGIN_URL= # Install the required tools for JMeter diff --git a/jmeter/4.0/entrypoint.sh b/jmeter/4.0/entrypoint.sh index 4112eb2..1b51548 100755 --- a/jmeter/4.0/entrypoint.sh +++ b/jmeter/4.0/entrypoint.sh @@ -24,8 +24,9 @@ if [ ${1##*.} = 'jmx' ]; then # empty the logs directory, or jmeter may fail rm -rf /logs/report /logs/*.log /logs/*.jtl - # set JAVA HEAP - sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m/'"$JMETER_MEMORY"'/' $JMETER_HOME/bin/jmeter + # remove setting JAVA heap and use the RUN_IN_DOCKER variable + sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m//' $JMETER_HOME/bin/jmeter + sed -i 's/# RUN_IN_DOCKER/RUN_IN_DOCKER/' $JMETER_HOME/bin/jmeter # run jmeter in client (gru) mode exec jmeter -n $JMETER_FLAGS \ @@ -53,8 +54,9 @@ if [ "$1" = 'minion' ]; then echo "Using Minion AWS Public HOSTNAME $HOSTNAME" fi - # set JAVA HEAP - sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m/'"$JMETER_MEMORY"'/' $JMETER_HOME/bin/jmeter + # remove setting JAVA heap and use the RUN_IN_DOCKER variable + sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m//' $JMETER_HOME/bin/jmeter + sed -i 's/# RUN_IN_DOCKER/RUN_IN_DOCKER/' $JMETER_HOME/bin/jmeter # install custom plugin if requested if [ "$CUSTOM_PLUGIN_URL" != '' ]; then diff --git a/jmeter/Dockerfile b/jmeter/Dockerfile index 21b0966..64a96e0 100644 --- a/jmeter/Dockerfile +++ b/jmeter/Dockerfile @@ -11,7 +11,6 @@ ENV PLUGINMGR_VERSION 1.3 # overridable environment variables ENV RESULTS_LOG results.jtl ENV JMETER_FLAGS= -ENV JMETER_MEMORY -Xms800m -Xmx800m ENV CUSTOM_PLUGIN_URL= # Install the required tools for JMeter diff --git a/jmeter/entrypoint.sh b/jmeter/entrypoint.sh index 4112eb2..cdd9710 100755 --- a/jmeter/entrypoint.sh +++ b/jmeter/entrypoint.sh @@ -24,9 +24,10 @@ if [ ${1##*.} = 'jmx' ]; then # empty the logs directory, or jmeter may fail rm -rf /logs/report /logs/*.log /logs/*.jtl - # set JAVA HEAP - sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m/'"$JMETER_MEMORY"'/' $JMETER_HOME/bin/jmeter - + # remove setting JAVA heap and use the RUN_IN_DOCKER variable + sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m//' $JMETER_HOME/bin/jmeter + sed -i 's/# RUN_IN_DOCKER/RUN_IN_DOCKER/' $JMETER_HOME/bin/jmeter + # run jmeter in client (gru) mode exec jmeter -n $JMETER_FLAGS \ -R $MINION_HOSTS \ @@ -53,9 +54,10 @@ if [ "$1" = 'minion' ]; then echo "Using Minion AWS Public HOSTNAME $HOSTNAME" fi - # set JAVA HEAP - sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m/'"$JMETER_MEMORY"'/' $JMETER_HOME/bin/jmeter - + # remove setting JAVA heap and use the RUN_IN_DOCKER variable + sed -i 's/-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m//' $JMETER_HOME/bin/jmeter + sed -i 's/# RUN_IN_DOCKER/RUN_IN_DOCKER/' $JMETER_HOME/bin/jmeter + # install custom plugin if requested if [ "$CUSTOM_PLUGIN_URL" != '' ]; then echo "Installing custom plugin $CUSTOM_PLUGIN_URL" diff --git a/lucy/Dockerfile b/lucy/Dockerfile index e803948..0fbf710 100644 --- a/lucy/Dockerfile +++ b/lucy/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.7 +FROM alpine:3.8 LABEL maintainer="David Sperling " From 7c1aad551f15ef2d793de72ed785de01d7030a4f Mon Sep 17 00:00:00 2001 From: David Sperling Date: Wed, 23 Jan 2019 09:30:35 -0800 Subject: [PATCH 3/3] fix for 5.0 new port ranges. Using --network host on Gru --- aws-setup.sh | 2 +- lucy/lucy.sh | 39 ++++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/aws-setup.sh b/aws-setup.sh index 78b4363..870cf9d 100755 --- a/aws-setup.sh +++ b/aws-setup.sh @@ -81,7 +81,7 @@ aws ec2 modify-subnet-attribute --subnet-id $SUBNET_ID2 --map-public-ip-on-launc SG_ID=$(aws ec2 create-security-group --group-name "JMeter" --description "JMeter Security Group" --vpc-id $VPC_ID --output text | tr -d '\n') echo "Created Security Group $SG_ID" -JMETER_IP_PERMISSIONS='[{"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "tcp", "FromPort": 1099, "ToPort": 1099, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "udp", "FromPort": 4445, "ToPort": 4445, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "tcp", "FromPort": 50000, "ToPort": 50000, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "tcp", "FromPort": 51000, "ToPort": 51000, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]}]' +JMETER_IP_PERMISSIONS='[{"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "tcp", "FromPort": 1099, "ToPort": 1099, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "udp", "FromPort": 4445, "ToPort": 4445, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "tcp", "FromPort": 50000, "ToPort": 50000, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]},{"IpProtocol": "tcp", "FromPort": 51000, "ToPort": 51999, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]}]' aws ec2 authorize-security-group-ingress --group-id $SG_ID --ip-permissions "$JMETER_IP_PERMISSIONS" # tag all created resources diff --git a/lucy/lucy.sh b/lucy/lucy.sh index 6bb5575..a9fd619 100755 --- a/lucy/lucy.sh +++ b/lucy/lucy.sh @@ -128,24 +128,29 @@ else fi echo "Gru at $GRU_HOST" -MINION_HOSTS=$(aws ec2 describe-instances --instance-ids $MINION_INSTANCE_IDS \ +if [ "$MINION_INSTANCE_IDS" == '' ]; then + echo "Error - no Minion instance IDs found." +else + MINION_HOSTS=$(aws ec2 describe-instances --instance-ids $MINION_INSTANCE_IDS \ --query 'Reservations[*].Instances[*].[PrivateIpAddress]' --output text | tr '\n' ',') -echo "Minions at $MINION_HOSTS" -# uncomment if you want to pause Lucy to inspect Gru or a Minion -#read -p "Press enter to start Gru setup: " - -# Step 6 - Run Gru with the specified JMX -echo "Copying $INPUT_JMX to Gru" -scp -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $INPUT_JMX ec2-user@${GRU_HOST}:/tmp - -echo "Running Docker to start JMeter in Gru mode" -JMX_IN_COMTAINER=/plans/$(basename $INPUT_JMX) -ssh -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ec2-user@${GRU_HOST} \ - "docker run -p 1099:1099 -p 51000:51000 -v /tmp:/plans -v /logs:/logs --env MINION_HOSTS=$MINION_HOSTS smithmicro/jmeter:$JMETER_VERSION $JMX_IN_COMTAINER" - -# Step 6 - Fetch the results from Gru -echo "Copying results from Gru" -scp -r -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ec2-user@${GRU_HOST}:/logs/* /logs + + echo "Minions at $MINION_HOSTS" + # uncomment if you want to pause Lucy to inspect Gru or a Minion + #read -p "Press enter to start Gru setup: " + + # Step 6 - Run Gru with the specified JMX + echo "Copying $INPUT_JMX to Gru" + scp -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $INPUT_JMX ec2-user@${GRU_HOST}:/tmp + + echo "Running Docker to start JMeter in Gru mode" + JMX_IN_COMTAINER=/plans/$(basename $INPUT_JMX) + ssh -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ec2-user@${GRU_HOST} \ + "docker run --network host -v /tmp:/plans -v /logs:/logs --env MINION_HOSTS=$MINION_HOSTS --env JMETER_FLAGS=$JMETER_FLAGS smithmicro/jmeter:$JMETER_VERSION $JMX_IN_COMTAINER" + + # Step 6 - Fetch the results from Gru + echo "Copying results from Gru" + scp -r -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ec2-user@${GRU_HOST}:/logs/* /logs +fi # Step 7 - Delete the cluster if [ "$RETAIN_CLUSTER" == '' ]; then