Skip to content

Commit 58fbc8b

Browse files
authored
Merge pull request #273900 from v-jaswel/aca/v-jaswel_work_item_250479
Overhaul include files.
2 parents b934598 + 46fd61b commit 58fbc8b

19 files changed

+273
-929
lines changed

articles/container-apps/background-processing.md

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,53 +24,11 @@ You learn how to:
2424
2525
[!INCLUDE [container-apps-create-cli-steps.md](../../includes/container-apps-create-cli-steps.md)]
2626

27-
---
28-
29-
Individual container apps are deployed to an Azure Container Apps environment. To create the environment, run the following command:
30-
31-
# [Bash](#tab/bash)
32-
33-
```azurecli
34-
az containerapp env create \
35-
--name $CONTAINERAPPS_ENVIRONMENT \
36-
--resource-group $RESOURCE_GROUP \
37-
--location "$LOCATION"
38-
```
39-
40-
# [Azure PowerShell](#tab/azure-powershell)
41-
42-
A Log Analytics workspace is required for the Container Apps environment. The following commands create a Log Analytics workspace and save the workspace ID and primary shared key to environment variables.
43-
27+
[!INCLUDE [container-apps-set-environment-variables.md](../../includes/container-apps-set-environment-variables.md)]
4428

45-
```azurepowershell
46-
$WorkspaceArgs = @{
47-
Name = 'myworkspace'
48-
ResourceGroupName = $ResourceGroupName
49-
Location = $Location
50-
PublicNetworkAccessForIngestion = 'Enabled'
51-
PublicNetworkAccessForQuery = 'Enabled'
52-
}
53-
New-AzOperationalInsightsWorkspace @WorkspaceArgs
54-
$WorkspaceId = (Get-AzOperationalInsightsWorkspace -ResourceGroupName $ResourceGroupName -Name $WorkspaceArgs.Name).CustomerId
55-
$WorkspaceSharedKey = (Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName $ResourceGroupName -Name $WorkspaceArgs.Name).PrimarySharedKey
56-
```
57-
58-
To create the environment, run the following command:
59-
60-
```azurepowershell
61-
$EnvArgs = @{
62-
EnvName = $ContainerAppsEnvironment
63-
ResourceGroupName = $ResourceGroupName
64-
Location = $Location
65-
AppLogConfigurationDestination = 'log-analytics'
66-
LogAnalyticConfigurationCustomerId = $WorkspaceId
67-
LogAnalyticConfigurationSharedKey = $WorkspaceSharedKey
68-
}
29+
[!INCLUDE [container-apps-create-resource-group.md](../../includes/container-apps-create-resource-group.md)]
6930

70-
New-AzContainerAppManagedEnv @EnvArgs
71-
```
72-
73-
---
31+
[!INCLUDE [container-apps-create-environment.md](../../includes/container-apps-create-environment.md)]
7432

7533
## Set up a storage queue
7634

articles/container-apps/deploy-artifact.md

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -29,79 +29,9 @@ The following screenshot shows the output from the album API service you deploy.
2929
| Java | Install the [JDK](/java/openjdk/install), recommend 17, or later|
3030
| Maven | Install the [Maven](https://maven.apache.org/download.cgi).|
3131

32-
## Setup
32+
[!INCLUDE [container-apps-create-cli-steps.md](../../includes/container-apps-create-cli-steps.md)]
3333

34-
To sign in to Azure from the CLI, run the following command and follow the prompts to complete the authentication process.
35-
36-
# [Bash](#tab/bash)
37-
38-
```azurecli
39-
az login
40-
```
41-
42-
# [Azure PowerShell](#tab/azure-powershell)
43-
44-
```azurepowershell
45-
az login
46-
```
47-
48-
---
49-
50-
Ensure you're running the latest version of the CLI via the upgrade command.
51-
52-
# [Bash](#tab/bash)
53-
54-
```azurecli
55-
az upgrade
56-
```
57-
58-
# [Azure PowerShell](#tab/azure-powershell)
59-
60-
```azurepowershell
61-
az upgrade
62-
```
63-
64-
---
65-
66-
Next, install, or update the Azure Container Apps extension for the CLI.
67-
68-
# [Bash](#tab/bash)
69-
70-
```azurecli
71-
az extension add --name containerapp --upgrade
72-
```
73-
74-
# [Azure PowerShell](#tab/azure-powershell)
75-
76-
```azurepowershell
77-
az extension add --name containerapp --upgrade
78-
```
79-
80-
---
81-
82-
Register the `Microsoft.App` and `Microsoft.OperationalInsights` namespaces they're not already registered in your Azure subscription.
83-
84-
# [Bash](#tab/bash)
85-
86-
```azurecli
87-
az provider register --namespace Microsoft.App
88-
```
89-
90-
```azurecli
91-
az provider register --namespace Microsoft.OperationalInsights
92-
```
93-
94-
# [Azure PowerShell](#tab/azure-powershell)
95-
96-
```azurepowershell
97-
az provider register --namespace Microsoft.App
98-
```
99-
100-
```azurepowershell
101-
az provider register --namespace Microsoft.OperationalInsights
102-
```
103-
104-
---
34+
## Create environment variables
10535

10636
Now that your Azure CLI setup is complete, you can define the environment variables that are used throughout this article.
10737

articles/container-apps/get-started-existing-container-image.md

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,50 +29,11 @@ This article demonstrates how to deploy an existing container to Azure Container
2929

3030
[!INCLUDE [container-apps-create-cli-steps.md](../../includes/container-apps-create-cli-steps.md)]
3131

32-
To create the environment, run the following command:
32+
[!INCLUDE [container-apps-set-environment-variables.md](../../includes/container-apps-set-environment-variables.md)]
3333

34-
# [Azure CLI](#tab/azure-cli)
34+
[!INCLUDE [container-apps-create-resource-group.md](../../includes/container-apps-create-resource-group.md)]
3535

36-
```azurecli-interactive
37-
az containerapp env create \
38-
--name $CONTAINERAPPS_ENVIRONMENT \
39-
--resource-group $RESOURCE_GROUP \
40-
--location $LOCATION
41-
```
42-
43-
# [Azure PowerShell](#tab/azure-powershell)
44-
45-
A Log Analytics workspace is required for the Container Apps environment. The following commands create a Log Analytics workspace and save the workspace ID and primary shared key to environment variables.
46-
47-
```azurepowershell-interactive
48-
$WorkspaceArgs = @{
49-
Name = 'myworkspace'
50-
ResourceGroupName = $ResourceGroupName
51-
Location = $Location
52-
PublicNetworkAccessForIngestion = 'Enabled'
53-
PublicNetworkAccessForQuery = 'Enabled'
54-
}
55-
New-AzOperationalInsightsWorkspace @WorkspaceArgs
56-
$WorkspaceId = (Get-AzOperationalInsightsWorkspace -ResourceGroupName $ResourceGroupName -Name $WorkspaceArgs.Name).CustomerId
57-
$WorkspaceSharedKey = (Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName $ResourceGroupName -Name $WorkspaceArgs.Name).PrimarySharedKey
58-
```
59-
60-
To create the environment, run the following command:
61-
62-
```azurepowershell-interactive
63-
$EnvArgs = @{
64-
EnvName = $ContainerAppsEnvironment
65-
ResourceGroupName = $ResourceGroupName
66-
Location = $Location
67-
AppLogConfigurationDestination = 'log-analytics'
68-
LogAnalyticConfigurationCustomerId = $WorkspaceId
69-
LogAnalyticConfigurationSharedKey = $WorkspaceSharedKey
70-
}
71-
72-
New-AzContainerAppManagedEnv @EnvArgs
73-
```
74-
75-
---
36+
[!INCLUDE [container-apps-create-environment.md](../../includes/container-apps-create-environment.md)]
7637

7738
## Create a container app
7839

@@ -90,7 +51,7 @@ The example shown in this article demonstrates how to use a custom container ima
9051

9152
::: zone pivot="container-apps-private-registry"
9253

93-
# [Azure CLI](#tab/azure-cli)
54+
# [Bash](#tab/bash)
9455

9556
For details on how to provide values for any of these parameters to the `create` command, run `az containerapp create --help` or [visit the online reference](/cli/azure/containerapp#az-containerapp-create). To generate credentials for an Azure Container Registry, use [az acr credential show](/cli/azure/acr/credential#az-acr-credential-show).
9657

@@ -159,7 +120,7 @@ New-AzContainerApp @ContainerAppArgs
159120

160121
::: zone pivot="container-apps-public-registry"
161122

162-
# [Azure CLI](#tab/azure-cli)
123+
# [Bash](#tab/bash)
163124

164125
```azurecli-interactive
165126
az containerapp create \
@@ -205,7 +166,7 @@ To verify a successful deployment, you can query the Log Analytics workspace. Yo
205166

206167
Use the following commands to view console log messages.
207168

208-
# [Azure CLI](#tab/azure-cli)
169+
# [Bash](#tab/bash)
209170

210171
```azurecli-interactive
211172
LOG_ANALYTICS_WORKSPACE_CLIENT_ID=`az containerapp env show --name $CONTAINERAPPS_ENVIRONMENT --resource-group $RESOURCE_GROUP --query properties.appLogsConfiguration.logAnalyticsConfiguration.customerId --out tsv`
@@ -232,7 +193,7 @@ If you're not going to continue to use this application, run the following comma
232193
>[!CAUTION]
233194
> The following command deletes the specified resource group and all resources contained within it. If resources outside the scope of this quickstart exist in the specified resource group, they will also be deleted.
234195
235-
# [Azure CLI](#tab/azure-cli)
196+
# [Bash](#tab/bash)
236197

237198
```azurecli-interactive
238199
az group delete --name $RESOURCE_GROUP

articles/container-apps/get-started.md

Lines changed: 7 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -23,89 +23,28 @@ In this quickstart, you create and deploy your first container app using the `az
2323
- If you don't have one, you [can create one for free](https://azure.microsoft.com/free/).
2424
- Install the [Azure CLI](/cli/azure/install-azure-cli).
2525

26-
## Setup
26+
[!INCLUDE [container-apps-create-cli-steps.md](../../includes/container-apps-create-cli-steps.md)]
2727

28-
To sign in to Azure from the CLI, run the following command and follow the prompts to complete the authentication process.
28+
## Create an Azure resource group
2929

30-
# [Bash](#tab/bash)
31-
32-
```azurecli
33-
az login
34-
```
35-
36-
# [Azure PowerShell](#tab/azure-powershell)
37-
38-
```azurepowershell
39-
az login
40-
```
41-
42-
---
43-
44-
Ensure you're running the latest version of the CLI via the upgrade command.
45-
46-
# [Bash](#tab/bash)
47-
48-
```azurecli
49-
az upgrade
50-
```
51-
52-
# [Azure PowerShell](#tab/azure-powershell)
53-
54-
```azurepowershell
55-
az upgrade
56-
```
57-
58-
---
59-
60-
Next, install or update the Azure Container Apps extension for the CLI.
30+
Create a resource group to organize the services related to your container app deployment.
6131

6232
# [Bash](#tab/bash)
6333

6434
```azurecli
65-
az extension add --name containerapp --upgrade
35+
az group create \
36+
--name my-container-apps \
37+
--location centralus
6638
```
6739

6840
# [Azure PowerShell](#tab/azure-powershell)
6941

70-
7142
```azurepowershell
72-
az extension add --name containerapp --upgrade
43+
New-AzResourceGroup -Location centralus -Name my-container-apps
7344
```
7445

7546
---
7647

77-
Register the `Microsoft.App` and `Microsoft.OperationalInsights` namespaces if you haven't already registered them in your Azure subscription.
78-
79-
# [Bash](#tab/bash)
80-
81-
```azurecli
82-
az provider register --namespace Microsoft.App
83-
```
84-
85-
```azurecli
86-
az provider register --namespace Microsoft.OperationalInsights
87-
```
88-
89-
# [Azure PowerShell](#tab/azure-powershell)
90-
91-
```azurepowershell
92-
az provider register --namespace Microsoft.App
93-
```
94-
95-
```azurepowershell
96-
az provider register --namespace Microsoft.OperationalInsights
97-
```
98-
99-
---
100-
101-
Now that your Azure CLI setup is complete, you can define the environment variables that are used throughout this article.
102-
103-
## Create a resource group
104-
105-
```azurepowershell
106-
az group create --location centralus --resource-group my-container-apps
107-
```
108-
10948
## Create and deploy the container app
11049

11150
Create and deploy your first container app with the `containerapp up` command. This command will:

0 commit comments

Comments
 (0)