-
Notifications
You must be signed in to change notification settings - Fork 7
Region param added to nancy run #93
Conversation
nancy_run.sh
Outdated
fi | ||
if [[ -z ${AWS_EC2_TYPE+x} ]]; then | ||
err "ERROR: AWS EC2 Instance type not given." | ||
exit 1 | ||
fi | ||
if [[ -z ${AWS_REGION+x} ]]; then | ||
err "ERROR: AWS EC2 region not given." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
по умолчанию не будем что-то использовать?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наш us-east-1 прописать как дефолтный?
nancy_run.sh
Outdated
@@ -575,6 +582,10 @@ elif [[ "$RUN_ON" == "localhost" ]]; then | |||
err "ERROR: option '--aws-ebs-volume-size' must be used with '--run on aws'." | |||
exit 1 | |||
fi | |||
if [[ ! -z ${AWS_REGION+x} ]]; then | |||
err "ERROR: option '--aws-region' must be used with '--run on aws'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--run on
, пропущен -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это правил
nancy_run.sh
Outdated
@@ -821,26 +832,26 @@ elif [[ "$RUN_ON" == "aws" ]]; then | |||
msg "Increased price: $price" | |||
EC2_PRICE=$price | |||
if [ -z $zone ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ -z ${zone+x} ]]; then
?
nancy_run.sh
Outdated
fi | ||
|
||
create_ec2_docker_machine $DOCKER_MACHINE $AWS_EC2_TYPE $EC2_PRICE \ | ||
60 $AWS_KEYPAIR_NAME $AWS_SSH_KEY_PATH $zone; | ||
60 $AWS_KEYPAIR_NAME $AWS_SSH_KEY_PATH $AWS_REGION $zone; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
напомни, что тут 60
означает?
это точно то, что нам надо?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это время жизни, теперь задается параметром в #92
nancy_run.sh
Outdated
@@ -896,10 +907,10 @@ elif [[ "$RUN_ON" == "aws" ]]; then | |||
# Create new volume and attach them for non i3 instances if needed | |||
if [ ! -z ${AWS_EBS_VOLUME_SIZE+x} ]; then | |||
msg "Create and attach a new EBS volume (size: $AWS_EBS_VOLUME_SIZE GB)" | |||
VOLUME_ID=$(aws ec2 create-volume --size $AWS_EBS_VOLUME_SIZE --region us-east-1 --availability-zone us-east-1a --volume-type gp2 | jq -r .VolumeId) | |||
VOLUME_ID=$(aws --region=$AWS_REGION ec2 create-volume --size $AWS_EBS_VOLUME_SIZE --availability-zone us-east-1a --volume-type gp2 | jq -r .VolumeId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а zone никак не передаём?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
и как --availability-zone us-east-1a
сочетается с $AWS_REGION
, если оно ($AWS_REGION
) не us-east-1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Выглядит в целом отлично, спасибо за код стайл причёсывание, но см комменты — есть некоторые открытые вопросы про регионы/AZ
nancy_run.sh
Outdated
exit 1 | ||
fi | ||
if [[ "$AWS_BLOCK_DURATION" != "0" ]]; then | ||
err "ERROR: option '--aws-block-duration' must be used with '--run on aws'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--run-on
Region param added to nancy run
No description provided.