Skip to content

Commit b96c1af

Browse files
committed
Fix Acrolinx issues. Also, revert to using Hello World public container image instead of forking Albums API Github repo, on input from product team at 20230808 meeting.
1 parent 82aefbf commit b96c1af

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

articles/container-apps/tutorial-scaling.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Tutorial: Scale a container app'
3-
description: Scale a Azure Container Apps application using the Azure CLI.
3+
description: Scale an Azure Container Apps application using the Azure CLI.
44
services: container-apps
55
author: v-jaswel
66
ms.service: container-apps
@@ -21,7 +21,7 @@ In this tutorial, you add an HTTP scale rule to your container app and observe h
2121

2222
| Requirement | Instructions |
2323
|--|--|
24-
| Azure account | If you don't have an Azure account, you can [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). <br><br>You need the *User Access Administrator* or *Owner* permission on the Azure subscription to proceed. Refer to [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md?tabs=current) for details. |
24+
| Azure account | If you don't have an Azure account, you can [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). <br><br>You need the *Contributor* permission on the Azure subscription to proceed. Refer to [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md?tabs=current) for details. |
2525
| GitHub Account | Get one for [free](https://github.com/join). |
2626
| Azure CLI | Install the [Azure CLI](/cli/azure/install-azure-cli). |
2727

@@ -100,12 +100,6 @@ az provider register --namespace Microsoft.OperationalInsights
100100

101101
---
102102

103-
## Prepare the GitHub repository
104-
105-
Go to the [sample code repository](https://github.com/azure-samples/containerapps-albumapi-csharp) on GitHub to fork the repository. This article uses a C# code sample, but the programming language and environment doesn't matter for the reason of the tutorial.
106-
107-
Select the **Fork** button at the top of the album API repo to fork the repo to your account. This creates a repo with a name in the form of `https://github.com/<owner>/containerapps-albumapi-csharp`, where `<owner>` is your Github username. Save this repo name, as you'll use it in the next section.
108-
109103
## Create and deploy the container app
110104

111105
Create and deploy your container app with the `containerapp up` command. This command creates a:
@@ -118,8 +112,6 @@ If any of these resources already exist, the command uses the existing resources
118112

119113
Lastly, the command creates and deploys the container app using a public container image.
120114

121-
Replace the `<YOUR_GITHUB_REPOSITORY_NAME>` with your GitHub repository name from the [previous section](#prepare-the-github-repository).
122-
123115
# [Bash](#tab/bash)
124116

125117
```azurecli
@@ -128,11 +120,10 @@ az containerapp up \
128120
--resource-group my-container-apps \
129121
--location centralus \
130122
--environment 'my-container-apps' \
123+
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
131124
--target-port 80 \
132125
--ingress external \
133126
--query properties.configuration.ingress.fqdn \
134-
--context-path ./src \
135-
--repo <YOUR_GITHUB_REPOSITORY_NAME>
136127
```
137128

138129
# [Azure PowerShell](#tab/azure-powershell)
@@ -143,11 +134,10 @@ az containerapp up `
143134
--resource-group my-container-apps `
144135
--location centralus `
145136
--environment my-container-apps `
137+
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest `
146138
--target-port 80 `
147139
--ingress external `
148140
--query properties.configuration.ingress.fqdn `
149-
--context-path ./src `
150-
--repo <YOUR_GITHUB_REPOSITORY_NAME>
151141
```
152142

153143
---
@@ -157,7 +147,7 @@ az containerapp up `
157147
158148
By setting `--ingress` to `external`, you make the container app available to public requests.
159149

160-
The `up` command returns the fully qualified domain name (FQDN) for the container app. Copy this FQDN to a text file. You'll use it in the [Send requests](#send-requests) section. An example FQDN looks like the following:
150+
The `up` command returns the fully qualified domain name (FQDN) for the container app. Copy this FQDN to a text file. You'll use it in the [Send requests](#send-requests) section. Your FQDN looks like the following example:
161151

162152
```text
163153
https://my-container-app.icydune-96848328.centralus.azurecontainerapps.io
@@ -219,7 +209,7 @@ az containerapp logs show `
219209

220210
---
221211

222-
The `show` command returns entries from the system logs for your container app in real time. The following is an example of the type of response you can expect.
212+
The `show` command returns entries from the system logs for your container app in real time. You can expect a response like the following example:
223213

224214
```json
225215
{
@@ -275,19 +265,19 @@ For more information, see [az containerapp logs](/cli/azure/containerapp/logs).
275265
Open a new bash shell. Run the following command, replacing `<YOUR_CONTAINER_APP_FQDN>` with the fully qualified domain name for your container app that you saved from the [Create and deploy the container app](#create-and-deploy-the-container-app) section.
276266

277267
```bash
278-
seq 1 50 | xargs -Iname -P5 curl "<YOUR_CONTAINER_APP_FQDN>"
268+
seq 1 50 | xargs -Iname -P10 curl "<YOUR_CONTAINER_APP_FQDN>"
279269
```
280270

281-
These commands send 50 requests to your container app in concurrent batches of five requests each.
271+
These commands send 50 requests to your container app in concurrent batches of 10 requests each.
282272

283273
| Command or argument | Description |
284274
|---|---|
285275
| `seq 1 50` | Generates a sequence of numbers from 1 to 50. |
286276
| `|` | The pipe operator sends the sequence to the `xargs` command. |
287277
| `xargs` | Runs `curl` with the specified URL |
288-
| `-Iname` | Acts as a placeholder for the output of `seq`. This prevents the return value from being sent to the `curl` command. |
278+
| `-Iname` | Acts as a placeholder for the output of `seq`. This argument prevents the return value from being sent to the `curl` command. |
289279
| `curl` | Calls the given URL. |
290-
| `-P5` | Instructs `xargs` to run up to five processes at a time. |
280+
| `-P10` | Instructs `xargs` to run up to 10 processes at a time. |
291281

292282
For more information, see the documentation for:
293283
- [seq](https://www.man7.org/linux/man-pages/man1/seq.1.html)
@@ -300,7 +290,7 @@ Open a new command prompt and enter PowerShell. Run the following commands, repl
300290

301291
```powershell
302292
$url="<YOUR_CONTAINER_APP_FQDN>"
303-
$Runspace = [runspacefactory]::CreateRunspacePool(1,5)
293+
$Runspace = [runspacefactory]::CreateRunspacePool(1,10)
304294
$Runspace.Open()
305295
1..50 | % {
306296
$ps = [powershell]::Create()
@@ -310,11 +300,11 @@ $Runspace.Open()
310300
}
311301
```
312302

313-
These commands send 50 requests to your container app in asynchronous batches of five requests each.
303+
These commands send 50 requests to your container app in asynchronous batches of 10 requests each.
314304

315305
| Command or argument | Description |
316306
|---|---|
317-
| `[runspacefactory]::CreateRunspacePool(1,5)` | Creates a `RunspacePool` that allows up to five runspaces to run concurrently. |
307+
| `[runspacefactory]::CreateRunspacePool(1,10)` | Creates a `RunspacePool` that allows up to 10 runspaces to run concurrently. |
318308
| `1..50 | % { }` | Runs the code enclosed in the curly braces 50 times. |
319309
| `$ps = [powershell]::Create()` | Creates a new PowerShell instance. |
320310
| `$ps.RunspacePool = $Runspace` | Tells the PowerShell instance to run in the `RunspacePool`. |
@@ -323,7 +313,7 @@ These commands send 50 requests to your container app in asynchronous batches of
323313
| `.AddParameter("Uri", $url)` | Sends a request to your container app. |
324314
| `[void]$ps.BeginInvoke()` | Tells the PowerShell instance to run asynchronously. |
325315

326-
For more information, refer to [Beginning Use of PowerShell Runspaces](https://devblogs.microsoft.com/scripting/beginning-use-of-powershell-runspaces-part-3/)
316+
For more information, see [Beginning Use of PowerShell Runspaces](https://devblogs.microsoft.com/scripting/beginning-use-of-powershell-runspaces-part-3/)
327317

328318
---
329319

@@ -363,16 +353,16 @@ You may need to select **Refresh** to see the new replicas.
363353
1. Select the blue checkmark icon to finish editing the splitting.
364354
1. The graph shows the requests received by your container app, split by replica.
365355

366-
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-1.png" alt-text="Container app metrics graph.":::
356+
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-1.png" alt-text="Container app metrics graph, showing requests split by replica.":::
367357

368358
1. By default, the graph scale is set to last 24 hours, with a time granularity of 15 minutes. Select the scale and change it to the last 30 minutes, with a time granularity of one minute. Select the **Apply** button.
369359
1. Select on the graph and drag to highlight the recent increase in requests received by your container app.
370360

371-
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-2.png" alt-text="Container app metrics graph.":::
361+
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-2.png" alt-text="Container app metrics graph, showing requests split by replica, with a scale of 30 minutes and time granularity of one minute.":::
372362

373363
The following screenshot shows a zoomed view of how the requests received by your container app are divided among replicas.
374364

375-
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-3.png" alt-text="Container app metrics graph.":::
365+
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-3.png" alt-text="Container app metrics graph, showing requests split by replica, in a zoomed view.":::
376366

377367
## Clean up resources
378368

0 commit comments

Comments
 (0)