Skip to content

Commit 918131e

Browse files
author
naman-msft
committed
updated metadata
2 parents 0a6bcdb + a5c316b commit 918131e

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

scenarios/AksOpenAiTerraform/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: innovation-engine, linux-related-content
1212
Run 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
1616
export TF_VAR_kubernetes_version="1.30.9"
1717
export TF_VAR_model_name="gpt-4o-mini"
1818
export TF_VAR_model_version="2024-07-18"
@@ -27,7 +27,8 @@ terraform -chdir=terraform apply -auto-approve
2727
In order to use the kubectl to run commands on the newly created cluster, you must first login.
2828
```bash
2929
RESOURCE_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 \
5556
Apply/Deploy Manifest File
5657
```bash
5758
export 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+
6062
export HOSTNAME=$(terraform -chdir=terraform output -raw hostname)
6163
export WORKLOAD_IDENTITY_CLIENT_ID=$(terraform -chdir=terraform output -raw workload_identity_client_id)
6264
export 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
7072
echo "Visit: https://$HOSTNAME"
7173
```
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
streamlit~=1.40.1
2-
azure-identity~=1.20.0
3-
openai~=1.65.2
2+
azure-identity~=1.21.0
3+
openai~=1.66.2

scenarios/AksOpenAiTerraform/terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "azurerm_resource_group" "main" {
4747
# Kubernetes
4848
###############################################################################
4949
resource "azurerm_kubernetes_cluster" "main" {
50-
name = "AksCluster"
50+
name = "AksCluster-${local.random_id}"
5151
location = var.location
5252
resource_group_name = azurerm_resource_group.main.name
5353

scenarios/AksOpenAiTerraform/terraform/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "resource_group_name" {
22
value = azurerm_resource_group.main.name
33
}
44

5+
output "aks_cluster_name" {
6+
value = azurerm_kubernetes_cluster.main.name
7+
}
8+
59
output "workload_identity_client_id" {
610
value = azurerm_user_assigned_identity.workload.client_id
711
}

scenarios/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@
11551155
}
11561156
},
11571157
{
1158-
"status": "inactive",
1158+
"status": "active",
11591159
"key": "AksOpenAiTerraform/README.md",
11601160
"title": "How to deploy and run an Azure OpenAI ChatGPT application on AKS via Terraform",
11611161
"description": "This article shows how to deploy an AKS cluster and Azure OpenAI Service via Terraform and how to deploy a ChatGPT-like application in Python.",

0 commit comments

Comments
 (0)