Skip to content

Commit

Permalink
simplified scp
Browse files Browse the repository at this point in the history
  • Loading branch information
dsperling committed Jan 26, 2019
1 parent 1be6e8f commit 97d7af3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ The following required and optional environment variables are supported:
|JMETER_FLAGS||None|Custom JMeter command line options. For example, passing `-X` will tell the Minion to exit at the end of the test|
|RETAIN_CLUSTER||None|Set to `true` if you want to re-use your cluster for future tests. Warning, you will incur AWS charges if you leave your cluster running.|
|CUSTOM_PLUGIN_URL||None|The URL of a custom plugin you want to install in the Minions. File will be copied to $JMETER_HOME/lib/ext.||
|COPY_DIR||None|Set to `true` if you want to copy the directory in which the .jmx file is located to all Minions and Gru.|
|COPY_DIR||None|Set to `true` if you want to copy the directory in which the .jmx file is located to all Minions and Gru. The files will be located in all Docker containers in ` /plans`. Update your JMX file to reference external files at `/plans/...`|

## Notes
All current JMeter Plugins are installed via the Plugins Manager.
Expand Down
12 changes: 5 additions & 7 deletions lucy/lucy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,15 @@ else
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
else
# Get the public hosts (space delimited) so Lucy can reach them for scp.
PUBLIC_MINION_HOSTS=$(aws ec2 describe-instances --instance-ids $MINION_INSTANCE_IDS \
# Get Gru and Minion public hosts (space delimited) so Lucy can reach them for scp.
PUBLIC_HOSTS=$(aws ec2 describe-instances --instance-ids $GRU_INSTANCE_ID $MINION_INSTANCE_IDS \
--query 'Reservations[*].Instances[*].[PublicIpAddress]' --output text | tr '\n' ' ')
JMX_DIR=$(dirname $INPUT_JMX)

for MINION_HOST in $PUBLIC_MINION_HOSTS; do
echo "Copying $INPUT_JMX and test files to Minion $MINION_HOST"
scp -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $JMX_DIR/* ec2-user@${MINION_HOST}:/tmp
for HOST in $PUBLIC_HOSTS; do
echo "Copying $INPUT_JMX and test files to $HOST"
scp -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $JMX_DIR/* ec2-user@${HOST}:/tmp
done
echo "Copying $INPUT_JMX and test files to Gru $GRU_HOST"
scp -i $PEM_PATH/$KEY_NAME.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $JMX_DIR/* ec2-user@${GRU_HOST}:/tmp
fi

# Step 7 - Run Gru with the specified JMX
Expand Down

0 comments on commit 97d7af3

Please sign in to comment.