diff --git a/manager/install.sh b/manager/install.sh index 4a9e512c2a..28b73cb52a 100755 --- a/manager/install.sh +++ b/manager/install.sh @@ -17,6 +17,7 @@ set -e CORTEX_VERSION=master +EKSCTL_TIMEOUT=45m arg1="$1" @@ -36,13 +37,13 @@ function ensure_eks() { echo -e "○ spinning up the cluster ... (this will take about 15 minutes)\n" - envsubst < eks_cluster.yaml | eksctl create cluster -f - + envsubst < eks_cluster.yaml | eksctl create cluster --timeout=$EKSCTL_TIMEOUT -f - # https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.5.5/config/v1.5/aws-k8s-cni.yaml >/dev/null python generate_eks.py $CORTEX_CLUSTER_CONFIG_FILE > $CORTEX_CLUSTER_WORKSPACE/eks_nodegroup.yaml - eksctl create nodegroup -f $CORTEX_CLUSTER_WORKSPACE/eks_nodegroup.yaml + eksctl create nodegroup --timeout=$EKSCTL_TIMEOUT -f $CORTEX_CLUSTER_WORKSPACE/eks_nodegroup.yaml if [ "$CORTEX_SPOT" == "True" ]; then asg_info=$(aws autoscaling describe-auto-scaling-groups --region $CORTEX_REGION --query "AutoScalingGroups[?contains(Tags[?Key==\`alpha.eksctl.io/cluster-name\`].Value, \`$CORTEX_CLUSTER_NAME\`)]|[?contains(Tags[?Key==\`alpha.eksctl.io/nodegroup-name\`].Value, \`ng-cortex-worker-spot\`)]") diff --git a/manager/uninstall.sh b/manager/uninstall.sh index 539774fc2a..9548413677 100755 --- a/manager/uninstall.sh +++ b/manager/uninstall.sh @@ -16,8 +16,10 @@ set -e +EKSCTL_TIMEOUT=45m + echo -e "spinning down the cluster ...\n" -eksctl delete cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION +eksctl delete cluster --name=$CORTEX_CLUSTER_NAME --region=$CORTEX_REGION --timeout=$EKSCTL_TIMEOUT echo "✓ please check cloudformation to ensure that all resources for the ${CORTEX_CLUSTER_NAME} cluster are successfully deleted: https://${CORTEX_REGION}.console.aws.amazon.com/cloudformation"