You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
@@ -598,18 +602,23 @@ if [[ "$RUN_ON" == "aws" ]]; then
598
602
err "ERROR: AWS keypair name and ssh key file must be specified to run on AWS EC2."
599
603
exit 1
600
604
else
601
-
checkPath AWS_SSH_KEY_PATH
605
+
check_path AWS_SSH_KEY_PATH
602
606
fi
603
607
if [[ -z${AWS_EC2_TYPE+x} ]];then
604
608
err "ERROR: AWS EC2 Instance type not given."
605
609
exit 1
606
610
fi
611
+
if [[ -z${AWS_REGION+x} ]];then
612
+
err "NOTICE: AWS EC2 region not given. Will used us-east-1."
613
+
AWS_REGION='us-east-1'
614
+
fi
607
615
if [[ -z${AWS_BLOCK_DURATION+x} ]];then
608
-
err "NOTICE: Container live time duration is not given."
616
+
err "NOTICE: Container live time duration is not given. Will used 60 minutes."
617
+
AWS_BLOCK_DURATION=60
609
618
else
610
619
case$AWS_BLOCK_DURATIONin
611
620
0|60|120|240|300|360)
612
-
dbg "Container live time duration is $AWS_BLOCK_DURATION."
621
+
dbg "Container live time duration is $AWS_BLOCK_DURATION."
613
622
;;
614
623
*)
615
624
err "Container live time duration (--aws-block-duration) has wrong value: $AWS_BLOCK_DURATION. Available values of AWS spot instance duration in minutes is 60, 120, 180, 240, 300, or 360)."
@@ -619,19 +628,23 @@ if [[ "$RUN_ON" == "aws" ]]; then
619
628
fi
620
629
elif [[ "$RUN_ON"=="localhost" ]];then
621
630
if [[ !-z${AWS_KEYPAIR_NAME+x} ]] || [[ !-z${AWS_SSH_KEY_PATH+x} ]] ;then
622
-
err "ERROR: options '--aws-keypair-name' and '--aws-ssh-key-path' must be used with '--runon aws'."
631
+
err "ERROR: options '--aws-keypair-name' and '--aws-ssh-key-path' must be used with '--run-on aws'."
623
632
exit 1
624
633
fi
625
634
if [[ !-z${AWS_EC2_TYPE+x} ]];then
626
-
err "ERROR: option '--aws-ec2-type' must be used with '--runon aws'."
635
+
err "ERROR: option '--aws-ec2-type' must be used with '--run-on aws'."
627
636
exit 1
628
637
fi
629
638
if [[ !-z${AWS_EBS_VOLUME_SIZE+x} ]];then
630
-
err "ERROR: option '--aws-ebs-volume-size' must be used with '--run on aws'."
639
+
err "ERROR: option '--aws-ebs-volume-size' must be used with '--run-on aws'."
640
+
exit 1
641
+
fi
642
+
if [[ !-z${AWS_REGION+x} ]];then
643
+
err "ERROR: option '--aws-region' must be used with '--run-on aws'."
631
644
exit 1
632
645
fi
633
646
if [[ "$AWS_BLOCK_DURATION"!="0" ]];then
634
-
err "ERROR: option '--aws-block-duration' must be used with '--runon aws'."
647
+
err "ERROR: option '--aws-block-duration' must be used with '--run-on aws'."
635
648
exit 1
636
649
fi
637
650
else
@@ -685,7 +698,7 @@ if [[ ! -z ${DB_PREPARED_SNAPSHOT+x} ]] && [[ ! -z ${DB_DUMP+x} ]]; then
685
698
fi
686
699
687
700
if [[ !-z${DB_DUMP+x} ]];then
688
-
checkPath DB_DUMP
701
+
check_path DB_DUMP
689
702
if [[ "$?"-ne"0" ]];then
690
703
echo"$DB_DUMP">$TMP_PATH/db_dump_tmp.sql
691
704
DB_DUMP="$TMP_PATH/db_dump_tmp.sql"
@@ -698,7 +711,7 @@ if [[ -z ${PG_CONFIG+x} ]]; then
698
711
err "NOTICE: No PostgreSQL config is provided. Will use default."
699
712
# TODO(NikolayS) use "auto-tuning" – shared_buffers=1/4 RAM, etc
700
713
else
701
-
checkPath PG_CONFIG
714
+
check_path PG_CONFIG
702
715
if [[ "$?"-ne"0" ]];then# TODO(NikolayS) support file:// and s3://
703
716
#err "WARNING: Value given as pg_config: '$PG_CONFIG' not found as file will use as content"
704
717
echo"$PG_CONFIG">$TMP_PATH/pg_config_tmp.sql
@@ -724,18 +737,18 @@ if [[ -z ${ARTIFACTS_FILENAME+x} ]]; then
724
737
ARTIFACTS_FILENAME=$DOCKER_MACHINE
725
738
fi
726
739
727
-
if [[ !-z${WORKLOAD_REAL+x} ]] &&!checkPath WORKLOAD_REAL;then
740
+
if [[ !-z${WORKLOAD_REAL+x} ]] &&!check_path WORKLOAD_REAL;then
728
741
err "ERROR: workload file '$WORKLOAD_REAL' not found."
729
742
exit 1
730
743
fi
731
744
732
-
if [[ !-z${WORKLOAD_BASIS+x} ]] &&!checkPath WORKLOAD_BASIS;then
745
+
if [[ !-z${WORKLOAD_BASIS+x} ]] &&!check_path WORKLOAD_BASIS;then
733
746
err "ERROR: workload file '$WORKLOAD_BASIS' not found."
734
747
exit 1
735
748
fi
736
749
737
750
if [[ !-z${WORKLOAD_CUSTOM_SQL+x} ]];then
738
-
checkPath WORKLOAD_CUSTOM_SQL
751
+
check_path WORKLOAD_CUSTOM_SQL
739
752
if [[ "$?"-ne"0" ]];then
740
753
#err "WARNING: Value given as workload-custom-sql: '$WORKLOAD_CUSTOM_SQL' not found as file will use as content"
0 commit comments