@@ -12,7 +12,7 @@ ms.custom: innovation-engine, linux-related-content
1212Run terraform to provision all the Azure resources required to setup your new OpenAI website.
1313``` bash
1414# Terraform parses TF_VAR_* as vars (Ex: TF_VAR_name -> name)
15- export TF_VAR_location=" westus3 "
15+ export TF_VAR_location=$REGION
1616export TF_VAR_kubernetes_version=" 1.30.9"
1717export TF_VAR_model_name=" gpt-4o-mini"
1818export TF_VAR_model_version=" 2024-07-18"
@@ -27,7 +27,8 @@ terraform -chdir=terraform apply -auto-approve
2727In order to use the kubectl to run commands on the newly created cluster, you must first login.
2828``` bash
2929RESOURCE_GROUP=$( terraform -chdir=terraform output -raw resource_group_name)
30- az aks get-credentials --admin --name AksCluster --resource-group $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
30+ AKS_CLUSTER_NAME=$( terraform -chdir=terraform output -raw aks_cluster_name)
31+ az aks get-credentials --admin --name $AKS_CLUSTER_NAME --resource-group $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
3132```
3233
3334# Install Helm Charts
@@ -55,8 +56,9 @@ helm upgrade --install cert-manager jetstack/cert-manager \
5556Apply/Deploy Manifest File
5657``` bash
5758export IMAGE=" aamini8/magic8ball:latest"
58- # Uncomment below to manually build docker image yourself instead of using pre-built image.
59+ # ( Uncomment below to manually build docker image yourself instead of using pre-built image.)
5960# docker build -t <YOUR IMAGE NAME> ./magic8ball --push
61+
6062export HOSTNAME=$( terraform -chdir=terraform output -raw hostname)
6163export WORKLOAD_IDENTITY_CLIENT_ID=$( terraform -chdir=terraform output -raw workload_identity_client_id)
6264export AZURE_OPENAI_DEPLOYMENT=$( terraform -chdir=terraform output -raw openai_deployment)
@@ -66,6 +68,6 @@ envsubst < quickstart-app.yml | kubectl apply -f -
6668
6769## Wait for host to be ready
6870``` bash
69- kubectl wait --for=condition=Ready certificate/tls-secret
71+ kubectl wait --for=condition=Ready --timeout=5m certificate/tls-secret
7072echo " Visit: https://$HOSTNAME "
7173```
0 commit comments