@@ -27,7 +27,7 @@ load_secrets() {
2727
2828# Function to check the status of the load balancer
2929check_load_balancer_status () {
30- lb_status=$( aws elbv2 describe-load-balancers --names ' posit-sce-alb ' --query ' LoadBalancers[0].State.Code' --output text)
30+ lb_status=$( aws elbv2 describe-load-balancers --names $LB_NAME --query ' LoadBalancers[0].State.Code' --output text)
3131
3232 # Check if the load balancer is active
3333 if [ " $lb_status " == " active" ]; then
@@ -78,6 +78,7 @@ NC="\e[0m"
7878set_defaults
7979export_env_from_file " ./.env"
8080RDS_PARAMS=$( load_secrets $POSTGRES_SECRET )
81+ export LB_NAME=" ${EKS_CLUSTER_NAME} -alb"
8182
8283# 1.1 Configure EKS Cluster
8384printf " ${BLUE} ------------------------------------------------------${NC} \n"
@@ -119,13 +120,15 @@ kubectl wait --namespace traefik --for=condition=available deployment/traefik --
119120
120121# 4. Create Ingress (creates LB)
121122envsubst < scripts/manifests/aws-lb-controller-ingress.yaml | kubectl apply -f -
123+ sleep 5
122124check_load_balancer_status
123125
124- export LB=$( kubectl get ingress traefik -n traefik -o json | jq -r " .status.loadBalancer.ingress[0].hostname" )
126+ export LB_URL=$( aws elbv2 describe-load-balancers --names $LB_NAME --query ' LoadBalancers[0].DNSName' --output text)
127+ printf " Loadbalancer DNS: ${LB_URL} "
125128if $domain ; then
126129 export DOMAIN=$domain
127130else
128- export DOMAIN=$LB
131+ export DOMAIN=$LB_URL
129132fi
130133
131134# 5. Setup POSIT PV's
@@ -164,7 +167,7 @@ printf "${BLUE}------------------------------------------------------${NC} \n"
164167printf " ${BLUE} Installing & configuring the Workbench helm chart (Max. 30 seconds) ${NC} \n"
165168printf " ${BLUE} ------------------------------------------------------${NC} \n"
166169kubectl config set-context --current --namespace=posit-workbench
167- envsubst < ./scripts/manifests/posit-helm-workbench.yaml | helm upgrade --install rstudio-workbench-prod rstudio/rstudio-workbench \
170+ envsubst < ./scripts/manifests/posit-helm-workbench.yaml | helm upgrade --install rstudio-workbench-prod rstudio/rstudio-workbench --version 0.8.9 \
168171 --set license.key=" ${PWB_LICENSE} " \
169172 --set config.secret.' database\.conf' .password=" ${POSTGRES_PASSWORD} " \
170173 -f -
0 commit comments