Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions manager/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
set -e

CORTEX_VERSION=master
EKSCTL_TIMEOUT=45m

arg1="$1"

Expand All @@ -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\`)]")
Expand Down
4 changes: 3 additions & 1 deletion manager/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"