-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_all_simrunners.sh
More file actions
executable file
·23 lines (18 loc) · 969 Bytes
/
start_all_simrunners.sh
File metadata and controls
executable file
·23 lines (18 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
source config.sh
export AWS_PAGER=""
res=$(aws ec2 describe-instances --filters "Name=tag:owner,Values=$OWNERTAG" "Name=tag:Name,Values=$NAMETAG" "Name=instance-state-name,Values=running")
echo "Public DNS names:"
echo $res | jq -r ".Reservations[].Instances[].PublicDnsName"
#if [ -n "$1" ]; then
# echo "Starting workload $1 on hosts"
#else
# echo "Usage: start_all_simrunners.sh <filename> (file must already be present on all hosts)"
# exit -1
#fi
for inst in $(echo $res | jq -r ".Reservations[].Instances[].PublicDnsName");
do
#ssh -fn ec2-user@$inst "nohup java -jar /home/ec2-user/SimRunner.jar $1 > simrunner.log 2>&1"
#ssh -fn ec2-user@$inst "nohup java -jar /home/ec2-user/SimRunner.jar workload.json > simrunner.log 2>&1"
ssh -i $KEYPATH -fn ec2-user@$inst "docker run -p 3000:3000 --name simrunner -d -it --mount type=bind,source=/home/ec2-user/workload.json,target=/config.json sylvainchambon/simrunner:latest"
done
echo "Simrunner started"