openvidu-deployment: Unfortunately, aws cli does not have a way to increase timeout or max retries...

pull/553/head
cruizba 2020-11-06 12:34:22 +01:00
parent 218c447e6b
commit e2011a52cf
2 changed files with 19 additions and 2 deletions

View File

@ -80,7 +80,15 @@ echo "Cleaning up"
aws cloudformation delete-stack --stack-name openvidu-ce-${DATESTAMP}
# Wait for the instance
aws ec2 wait image-available --image-ids ${OV_RAW_AMI_ID}
# Unfortunately, aws cli does not have a way to increase timeout
WAIT_RETRIES=0
WAIT_MAX_RETRIES=3
until [ "${WAIT_RETRIES}" -ge "${WAIT_MAX_RETRIES}" ]
do
aws ec2 wait image-available --image-ids ${OV_RAW_AMI_ID} && break
WAIT_RETRIES=$((WAIT_RETRIES+1))
sleep 5
done
# Updating the template
sed "s/OV_AMI_ID/${OV_RAW_AMI_ID}/" CF-OpenVidu.yaml.template > CF-OpenVidu-${OPENVIDU_VERSION}.yaml

View File

@ -121,7 +121,16 @@ echo "Cleaning up"
aws cloudformation delete-stack --stack-name openvidu-${DATESTAMP}
# Wait for the instance
aws ec2 wait image-available --image-ids ${OV_RAW_AMI_ID}
# Unfortunately, aws cli does not have a way to increase timeout
WAIT_RETRIES=0
WAIT_MAX_RETRIES=3
until [ "${WAIT_RETRIES}" -ge "${WAIT_MAX_RETRIES}" ]
do
aws ec2 wait image-available --image-ids ${OV_RAW_AMI_ID} && break
WAIT_RETRIES=$((WAIT_RETRIES+1))
sleep 5
done
# Updating the template
sed "s/OV_AMI_ID/${OV_RAW_AMI_ID}/" cfn-openvidu-server-pro-no-market.yaml.template > cfn-openvidu-server-pro-no-market-${OPENVIDU_PRO_VERSION}.yaml