Skip to content

Commit 1fa9f95

Browse files
authored
Merge pull request #102998 from LaylaLiu-gmail/patch-1
Fix container app on arc public doc issue.
2 parents 0cdb6b9 + 36085b7 commit 1fa9f95

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

articles/container-apps/azure-arc-create-container-app.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ az extension add -s https://download.microsoft.com/download/5/c/2/5c2ec3fc-bd2a-
4343
Create a resource group for the services created in this tutorial.
4444

4545
```azurecli-interactive
46-
az group create --name myResourceGroup --location eastus
46+
myResourceGroup="my-container-apps-resource-group"
47+
az group create --name $myResourceGroup --location eastus
4748
```
4849

4950
## Get custom location information
@@ -75,7 +76,8 @@ Now that you have the custom location ID, you can query for the connected enviro
7576
A connected environment is largely the same as a standard Container Apps environment, but network restrictions are controlled by the underlying Arc-enabled Kubernetes cluster.
7677

7778
```azure-interactive
78-
myConnectedEnvironment = az containerapp connected-env list --custom-location customLocationId -o tsv --query '[].id'
79+
myContainerApp="my-container-app"
80+
myConnectedEnvironment=$(az containerapp connected-env list --custom-location $customLocationId -o tsv --query '[].id')
7981
```
8082

8183
## Create an app
@@ -84,16 +86,15 @@ The following example creates a Node.js app.
8486

8587
```azurecli-interactive
8688
az containerapp create \
87-
--resource-group myResourceGroup \
88-
--name myContainerApp \
89-
--environment myConnectedEnvironment \
89+
--resource-group $myResourceGroup \
90+
--name $myContainerApp \
91+
--environment $myConnectedEnvironment \
9092
--environment-type connected \
91-
--image mcr.microsoft.com/azuredocs/container-apps-helloworld:latest \
93+
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
9294
--target-port 80 \
9395
--ingress 'external'
9496
95-
az containerapp browse --resource-group myResourceGroup \
96-
--name myContainerApp
97+
az containerapp browse --resource-group $myResourceGroup --name $myContainerApp
9798
```
9899

99100
## Get diagnostic logs using Log Analytics
@@ -112,7 +113,7 @@ let StartTime = ago(72h);
112113
let EndTime = now();
113114
ContainerAppsConsoleLogs_CL
114115
| where TimeGenerated between (StartTime .. EndTime)
115-
| where AppName_s =~ "myContainerApp"
116+
| where AppName_s =~ "my-container-app"
116117
```
117118

118119
The application logs for all the apps hosted in your Kubernetes cluster are logged to the Log Analytics workspace in the custom log table named `ContainerAppsConsoleLogs_CL`.

articles/container-apps/azure-arc-enable-cluster.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ Set environment variables based on your Kubernetes cluster deployment.
9191

9292
```bash
9393
GROUP_NAME="my-arc-cluster-group"
94-
CLUSTER_NAME="my-arc-cluster"
9594
AKS_CLUSTER_GROUP_NAME="my-aks-cluster-group"
9695
AKS_NAME="my-aks-cluster"
9796
LOCATION="eastus"
@@ -101,7 +100,6 @@ LOCATION="eastus"
101100

102101
```azurepowershell
103102
$GROUP_NAME="my-arc-cluster-group"
104-
$CLUSTER_NAME="my-arc-cluster"
105103
$AKS_CLUSTER_GROUP_NAME="my-aks-cluster-group"
106104
$AKS_NAME="my-aks-cluster"
107105
$LOCATION="eastus"
@@ -121,7 +119,7 @@ The following steps help you get started understanding the service, but for prod
121119
az group create --name $AKS_CLUSTER_GROUP_NAME --location $LOCATION
122120
az aks create \
123121
--resource-group $AKS_CLUSTER_GROUP_NAME \
124-
--name $AKS_NAME \
122+
--name $AKS_NAME \
125123
--enable-aad \
126124
--generate-ssh-keys
127125
```
@@ -212,7 +210,7 @@ A [Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md) pro
212210
213211
az monitor log-analytics workspace create `
214212
--resource-group $GROUP_NAME `
215-
--workspace-name $wORKSPACE_NAME
213+
--workspace-name $WORKSPACE_NAME
216214
```
217215
218216
---
@@ -224,13 +222,13 @@ A [Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md) pro
224222
```azurecli
225223
LOG_ANALYTICS_WORKSPACE_ID=$(az monitor log-analytics workspace show \
226224
--resource-group $GROUP_NAME \
227-
--workspace-name $wORKSPACE_NAME \
225+
--workspace-name $WORKSPACE_NAME \
228226
--query customerId \
229227
--output tsv)
230228
LOG_ANALYTICS_WORKSPACE_ID_ENC=$(printf %s $LOG_ANALYTICS_WORKSPACE_ID | base64 -w0) # Needed for the next step
231229
lOG_ANALYTICS_KEY=$(az monitor log-analytics workspace get-shared-keys \
232230
--resource-group $GROUP_NAME \
233-
--workspace-name $wORKSPACE_NAME \
231+
--workspace-name $WORKSPACE_NAME \
234232
--query primarySharedKey \
235233
--output tsv)
236234
lOG_ANALYTICS_KEY_ENC=$(printf %s $lOG_ANALYTICS_KEY | base64 -w0) # Needed for the next step
@@ -241,13 +239,13 @@ A [Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md) pro
241239
```azurepowershell
242240
$LOG_ANALYTICS_WORKSPACE_ID=$(az monitor log-analytics workspace show `
243241
--resource-group $GROUP_NAME `
244-
--workspace-name $wORKSPACE_NAME `
242+
--workspace-name $WORKSPACE_NAME `
245243
--query customerId `
246244
--output tsv)
247245
$LOG_ANALYTICS_WORKSPACE_ID_ENC=[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($LOG_ANALYTICS_WORKSPACE_ID))# Needed for the next step
248246
$lOG_ANALYTICS_KEY=$(az monitor log-analytics workspace get-shared-keys `
249247
--resource-group $GROUP_NAME `
250-
--workspace-name $wORKSPACE_NAME `
248+
--workspace-name $WORKSPACE_NAME `
251249
--query primarySharedKey `
252250
--output tsv)
253251
$lOG_ANALYTICS_KEY_ENC=[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($lOG_ANALYTICS_KEY))
@@ -294,7 +292,7 @@ A [Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md) pro
294292
--release-namespace $NAMESPACE \
295293
--configuration-settings "Microsoft.CustomLocation.ServiceAccount=default" \
296294
--configuration-settings "appsNamespace=${NAMESPACE}" \
297-
--configuration-settings "CLUSTER_NAME=${CONNECTED_ENVIRONMENT_NAME}" \
295+
--configuration-settings "clusterName=${CONNECTED_ENVIRONMENT_NAME}" \
298296
--configuration-settings "envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group=${AKS_CLUSTER_GROUP_NAME}" \
299297
--configuration-settings "logProcessor.appLogs.destination=log-analytics" \
300298
--configuration-protected-settings "logProcessor.appLogs.logAnalyticsConfig.customerId=${LOG_ANALYTICS_WORKSPACE_ID_ENC}" \
@@ -316,7 +314,7 @@ A [Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md) pro
316314
--release-namespace $NAMESPACE `
317315
--configuration-settings "Microsoft.CustomLocation.ServiceAccount=default" `
318316
--configuration-settings "appsNamespace=${NAMESPACE}" `
319-
--configuration-settings "CLUSTER_NAME=${CONNECTED_ENVIRONMENT_NAME}" `
317+
--configuration-settings "clusterName=${CONNECTED_ENVIRONMENT_NAME}" `
320318
--configuration-settings "envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group=${AKS_CLUSTER_GROUP_NAME}" `
321319
--configuration-settings "logProcessor.appLogs.destination=log-analytics" `
322320
--configuration-protected-settings "logProcessor.appLogs.logAnalyticsConfig.customerId=${LOG_ANALYTICS_WORKSPACE_ID_ENC}" `
@@ -335,7 +333,7 @@ A [Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md) pro
335333
| - | - |
336334
| `Microsoft.CustomLocation.ServiceAccount` | The service account created for the custom location. It's recommended that it 's set to the value `default`. |
337335
| `appsNamespace` | The namespace used to create the app definitions and revisions. It **must** match that of the extension release namespace. |
338-
| `CLUSTER_NAME` | The name of the Container Apps extension Kubernetes environment that will be created against this extension. |
336+
| `clusterName` | The name of the Container Apps extension Kubernetes environment that will be created against this extension. |
339337
| `logProcessor.appLogs.destination` | Optional. Destination for application logs. Accepts `log-analytics` or `none`, choosing none disables platform logs. |
340338
| `logProcessor.appLogs.logAnalyticsConfig.customerId` | Required only when `logProcessor.appLogs.destination` is set to `log-analytics`. The base64-encoded Log analytics workspace ID. This parameter should be configured as a protected setting. |
341339
| `logProcessor.appLogs.logAnalyticsConfig.sharedKey` | Required only when `logProcessor.appLogs.destination` is set to `log-analytics`. The base64-encoded Log analytics workspace shared key. This parameter should be configured as a protected setting. |4
@@ -474,7 +472,8 @@ Before you can start creating apps in the custom location, you need an [Azure Co
474472
az containerapp connected-env create \
475473
--resource-group $GROUP_NAME \
476474
--name $CONNECTED_ENVIRONMENT_NAME \
477-
--custom-location $CUSTOM_LOCATION_ID
475+
--custom-location $CUSTOM_LOCATION_ID \
476+
--location $LOCATION
478477
```
479478

480479
# [PowerShell](#tab/azure-powershell)
@@ -483,7 +482,8 @@ Before you can start creating apps in the custom location, you need an [Azure Co
483482
az containerapp connected-env create `
484483
--resource-group $GROUP_NAME `
485484
--name $CONNECTED_ENVIRONMENT_NAME `
486-
--custom-location $CUSTOM_LOCATION_ID
485+
--custom-location $CUSTOM_LOCATION_ID `
486+
--location $LOCATION
487487
```
488488

489489
---

0 commit comments

Comments
 (0)