add argument option for bash scripts

pull/37/head
Minh Doan 6 years ago
parent cbbf003904
commit 4117aa4da4
  1. 13
      aws-experiment-launch/create_deploy_pipeline.sh
  2. 4
      aws-experiment-launch/create_instances_only.sh
  3. 4
      aws-experiment-launch/create_instances_only_2.sh
  4. 6
      aws-experiment-launch/create_instances_only_50.sh
  5. 7
      aws-experiment-launch/download_log_from_commander.sh

@ -1,8 +1,13 @@
INSTANCE_NUM=1
SHARD_NUM=1
CLIENT_NUM=1
if [ $# -lt 3 ]; then
echo "Please provide # of instances, # of shards, # of clients"
exit 1
fi
echo "Creating $$INSTANCE_NUM instances at 8 regions"
INSTANCE_NUM=$1
SHARD_NUM=$2
CLIENT_NUM=$3
echo "Creating $INSTANCE_NUM instances at 8 regions"
python create_instances.py --regions 1,2,3,4,5,6,7,8 --instances $INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM
echo "Rung collecint raw ips"

@ -1,6 +1,6 @@
if [ $# -eq 0 ]; then
echo "Your command line contains $# arguments"
exit(1)
echo "Please provide # of instances"
exit 1
fi
INSTANCE_NUM=$1
echo "Creating $INSTANCE_NUM instances at 8 regions"

@ -1,4 +1,6 @@
INSTANCE_NUM=50
#This script is used for debugging and testing as we only created 2 instances.
#Be aware that the default output will be instance_output_2.txt
INSTANCE_NUM=2
echo "Creating $$INSTANCE_NUM instances at 8 regions"
python create_instances.py --regions 1,2,3,4,5,6,7,8 --instances $INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM --instance_output instance_output_2.txt

@ -1,4 +1,4 @@
INSTANCE_NUM=$1
INSTANCE_NUM=50
echo "Creating $$INSTANCE_NUM instances at 8 regions"
python create_instances.py --regions 1,2,3,4,5,6,7,8 --instances $INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM --instance_output instance_output_500.txt
echo "Creating $INSTANCE_NUM instances at 8 regions"
python create_instances.py --regions 1,2,3,4,5,6,7,8 --instances $INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM,$INSTANCE_NUM --instance_output instance_output_50.txt

@ -1,2 +1,7 @@
# Change the commander address
scp -r -i "california-key-benchmark.pem" ec2-user@ec2-18-144-25-63.us-west-1.compute.amazonaws.com:~/projects/src/harmony-benchmark/bin/upload .
if [ $# -eq 0 ]; then
echo "Please provide ip address of the commander"
exit 1
fi
ADDRESS=$1
scp -r -i "california-key-benchmark.pem" ec2-user@$ADDRESS:~/projects/src/harmony-benchmark/bin/upload .

Loading…
Cancel
Save