-
Notifications
You must be signed in to change notification settings - Fork 46
/
rc
21 lines (18 loc) · 1.36 KB
/
rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# variables - please change for your unique names
export RESOURCE_GROUP=JTEST
export ACR_NAME=tomasaks987
export POSTGRESQL_NAME=tomaspsql987
export STORAGE_NAME=tomaskubestorage987
# variables
export LOCATION="northeurope"
export AKS_CLUSTER_NAME=myaks
export POSTGRESQL_USER="myadmin"
export POSTGRESQL_PASSWORD="VerySecurePassword123..."
export ACR_URL=$(az acr show --name $ACR_NAME --resource-group $RESOURCE_GROUP --query "loginServer" --output tsv)
export ACR_KEY=$(az acr credential show --name $ACR_NAME --resource-group $RESOURCE_GROUP --query "passwords[0].value" --output tsv)
CLIENT_ID=$(az aks show --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query "servicePrincipalProfile.clientId" --output tsv)
ACR_ID=$(az acr show --name $ACR_NAME --resource-group $RESOURCE_GROUP --query "id" --output tsv)
POSTGRES_FQDN=$(az postgres server show --resource-group ${RESOURCE_GROUP} --name ${POSTGRESQL_NAME} --query "fullyQualifiedDomainName" --output tsv)
export INGRESS_IP=$(kubectl get service ingress-nginx-ingress-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
POSTGRESQL_URL="jdbc:postgresql://${POSTGRESQL_NAME}.postgres.database.azure.com:5432/todo?user=${POSTGRESQL_USER}@${POSTGRESQL_NAME}&password=${POSTGRESQL_PASSWORD}&ssl=true"
export STORAGE_KEY=$(az storage account keys list -g $RESOURCE_GROUP -n $STORAGE_NAME --query [0].value -o tsv)