Skip to content

Commit 819eba6

Browse files
committed
updates
1 parent cf84903 commit 819eba6

File tree

4 files changed

+24
-23
lines changed

4 files changed

+24
-23
lines changed

articles/batch/quick-create-cli.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ This quickstart uses Azure CLI commands and scripts to create and manage Batch r
2020

2121
You can run the Azure CLI commands in this quickstart interactively in Azure Cloud Shell. To run the commands in the Cloud Shell, select **Open Cloudshell** at the upper-right corner of a code block. Select **Copy** to copy the code, and paste it into Cloud Shell to run it. You can also [run Cloud Shell from within the Azure portal](https://shell.azure.com). Cloud Shell always uses the latest version of the Azure CLI.
2222

23-
You can also [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. The steps in this article require Azure CLI version 2.0.20 or later. Run [az version](/cli/azure/reference-index?#az-version) to see your installed version and dependent libraries, and run [az upgrade](/cli/azure/reference-index?#az-upgrade) to upgrade. If you use a local installation, sign in to Azure by using the [az login](/cli/azure/reference-index#az-login) command.
23+
Alternatively, you can [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. The steps in this article require Azure CLI version 2.0.20 or later. Run [az version](/cli/azure/reference-index?#az-version) to see your installed version and dependent libraries, and run [az upgrade](/cli/azure/reference-index?#az-upgrade) to upgrade. If you use a local installation, sign in to Azure by using the [az login](/cli/azure/reference-index#az-login) command.
24+
25+
>[!NOTE]
26+
>For some regions and subscription types, quota restrictions might cause Batch account or node creation to fail or not complete. In this situation, you can request a quota increase at no charge. For more information, see [Batch service quotas and limits](batch-quota-limit.md).
2427
2528
## Create a resource group
2629

27-
Run the following [az group create](/cli/azure/group#az-group-create) command to create an Azure resource group named `qsBatch` in the `eastus` Azure region. The resource group is a logical container that holds the Azure resources for this quickstart.
30+
Run the following [az group create](/cli/azure/group#az-group-create) command to create an Azure resource group named `qsBatch` in the `eastus2` Azure region. The resource group is a logical container that holds the Azure resources for this quickstart.
2831

2932
```azurecli-interactive
3033
az group create \
@@ -36,7 +39,7 @@ az group create \
3639

3740
Use the [az storage account create](/cli/azure/storage/account#az-storage-account-create) command to create an Azure Storage account to link to your Batch account. Although this quickstart doesn't use the storage account, most real-world Batch workloads use a linked storage account to deploy applications and store input and output data.
3841

39-
Run the following command to create a `Stamdard_LRS` SKU storage account named `mybatchstorage` in your resource group:
42+
Run the following command to create a Standard_LRS SKU storage account named `mybatchstorage` in your resource group:
4043

4144
```azurecli-interactive
4245
az storage account create \
@@ -58,7 +61,7 @@ az batch account create \
5861
--location eastus2
5962
```
6063

61-
Sign in to the new Batch account by running the [az batch account login](/cli/azure/batch/account#az-batch-account-login) command. After you authenticate your account with Batch, the rest of the `az batch` quickstart commands use this account context.
64+
Sign in to the new Batch account by running the [az batch account login](/cli/azure/batch/account#az-batch-account-login) command. Once you authenticate your account with Batch, subsequent `az batch` commands in this session use this account context.
6265

6366
```azurecli-interactive
6467
az batch account login \
@@ -69,7 +72,7 @@ az batch account login \
6972

7073
## Create a pool of compute nodes
7174

72-
Use the [az batch pool create](/cli/azure/batch/pool#az-batch-pool-create) command to create a pool of Linux compute nodes in your Batch account. The following example creates a pool named `myPool` that consists of two `Standard_A1_v2` size nodes running `Ubuntu 18.04 LTS` OS. This node size offers a good balance of performance versus cost for this quickstart example.
75+
Run the [az batch pool create](/cli/azure/batch/pool#az-batch-pool-create) command to create a pool of Linux compute nodes in your Batch account. The following example creates a pool named `myPool` that consists of two Standard_A1_v2 size VMs running Ubuntu 18.04 LTS OS. This node size offers a good balance of performance versus cost for this quickstart example.
7376

7477
```azurecli-interactive
7578
az batch pool create \
@@ -79,20 +82,18 @@ az batch pool create \
7982
--node-agent-sku-id "batch.node.ubuntu 18.04"
8083
```
8184

82-
Batch creates the pool immediately, but takes a few minutes to allocate and start the compute nodes. During this time, the pool is in the `resizing` state.
83-
84-
To see the pool status, run the [az batch pool show](/cli/azure/batch/pool#az-batch-pool-show) command. This command shows all the properties of the pool, and you can query for specific properties. The following command queries for the pool allocation state:
85+
Batch creates the pool immediately, but takes a few minutes to allocate and start the compute nodes. To see the pool status, use the [az batch pool show](/cli/azure/batch/pool#az-batch-pool-show) command. This command shows all the properties of the pool, and you can query for specific properties. The following command queries for the pool allocation state:
8586

8687
```azurecli-interactive
8788
az batch pool show --pool-id myPool \
8889
--query "allocationState"
8990
```
9091

91-
You can do the following steps to create a job and tasks while the pool state is still `resizing`. The pool is ready to run tasks when the allocation state is `steady` and all the nodes are running.
92+
While Batch allocates and starts the nodes, the pool is in the `resizing` state. You can create a job and tasks while the pool state is still `resizing`. The pool is ready to run tasks when the allocation state is `steady` and all the nodes are running.
9293

9394
## Create a job
9495

95-
Use the [az batch job create](/cli/azure/batch/job#az-batch-job-create) command to create a Batch job to run on your pool. A Batch job is a logical group of one or more tasks. The job includes settings common to the tasks, such as the pool to run tasks on. The following example creates a job called `myJob` on `myPool` that initially has no tasks.
96+
Use the [az batch job create](/cli/azure/batch/job#az-batch-job-create) command to create a Batch job to run on your pool. A Batch job is a logical group of one or more tasks. The job includes settings common to the tasks, such as the pool to run on. The following example creates a job called `myJob` on `myPool` that initially has no tasks.
9697

9798
```azurecli-interactive
9899
az batch job create \
@@ -102,11 +103,10 @@ az batch job create \
102103

103104
## Create job tasks
104105

105-
Use the [az batch task create](/cli/azure/batch/task#az-batch-task-create) command to create some tasks to run in the job. Each task has a command line that specifies an app or script. Batch provides several ways to deploy apps and scripts to compute nodes.
106+
Batch provides several ways to deploy apps and scripts to compute nodes. Use the [az batch task create](/cli/azure/batch/task#az-batch-task-create) command to create tasks to run in the job. Each task has a command line that specifies an app or script.
106107

107108
The following Bash script creates four identical, parallel tasks called `myTask1` through `myTask4`. The task command line displays the Batch environment variables on the compute node, and then waits 90 seconds.
108109

109-
110110
```azurecli-interactive
111111
for i in {1..4}
112112
do
@@ -131,7 +131,7 @@ az batch task show \
131131
--task-id myTask1
132132
```
133133

134-
The command output includes many details. For example, the `nodeId` shows the name of the pool node that ran the task. An `exitCode` of `0` indicates that the task command line completed successfully.
134+
The command output includes many details. For example, an `exitCode` of `0` indicates that the task command completed successfully. The `nodeId` shows the name of the pool node that ran the task.
135135

136136
## View task output
137137

@@ -156,7 +156,7 @@ stderr.txt https://mybatchaccount.eastus2.batch.azure.com/jobs/myJob/tasks/myTa
156156
157157
```
158158

159-
Use the [az batch task file download](/cli/azure/batch/task#az-batch-task-file-download) command to download output files to a local directory. The following example downloads the *stdout.txt* file:
159+
The [az batch task file download](/cli/azure/batch/task#az-batch-task-file-download) command downloads output files to a local directory. Run the following example to download the *stdout.txt* file:
160160

161161
```azurecli-interactive
162162
az batch task file download \

articles/batch/quick-create-portal.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ After you complete this quickstart, you understand the [key concepts of the Batc
1616

1717
- [!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
1818

19+
>[!NOTE]
20+
>For some regions and subscription types, quota restrictions might cause Batch account or node creation to fail or not complete. In this situation, you can request a quota increase at no charge. For more information, see [Batch service quotas and limits](batch-quota-limit.md).
21+
1922
<a name="create-a-batch-account"></a>
2023
## Create a Batch account and Azure Storage account
2124

articles/batch/quick-run-dotnet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private const string StorageAccountKey = "<key1>
7373

7474
### Build and run the app and view output
7575

76-
To see the Batch workflow in action, build and run the application in Visual Studio or at the command line with the `dotnet build` and `dotnet run` commands.
76+
To see the Batch workflow in action, build and run the application in Visual Studio. You can also use the command line `dotnet build` and `dotnet run` commands.
7777

7878
In Visual Studio:
7979

@@ -155,7 +155,7 @@ Review the code to understand the steps in the [Azure Batch .NET Quickstart](htt
155155

156156
To create a Batch pool, the app uses the [BatchClient.PoolOperations.CreatePool](/dotnet/api/microsoft.azure.batch.pooloperations.createpool) method to set the number of nodes, VM size, and pool configuration. The following [VirtualMachineConfiguration](/dotnet/api/microsoft.azure.batch.virtualmachineconfiguration) object specifies an [ImageReference](/dotnet/api/microsoft.azure.batch.imagereference) to a Windows Server Marketplace image. Batch supports a wide range of Windows Server and Linux Marketplace OS images, and also supports custom VM images.
157157

158-
The `PoolNodeCount` and VM size `PoolVMSize` are defined constants. The app creates a pool of two *Standard_A1_v2* nodes. This size offers a good balance of performance versus cost for this quickstart.
158+
The `PoolNodeCount` and VM size `PoolVMSize` are defined constants. The app creates a pool of two Standard_A1_v2 nodes. This size offers a good balance of performance versus cost for this quickstart.
159159

160160
The [Commit](/dotnet/api/microsoft.azure.batch.cloudpool.commit) method submits the pool to the Batch service.
161161

@@ -213,7 +213,7 @@ try
213213

214214
### Create tasks
215215

216-
This app creates a list of [CloudTask](/dotnet/api/microsoft.azure.batch.cloudtask) objects. Each task processes an input `ResourceFile` object by using a [CommandLine](/dotnet/api/microsoft.azure.batch.cloudtask.commandline) property. Batch provides several ways to deploy apps and scripts to compute nodes. The Batch command line is where you specify your app or script.
216+
Batch provides several ways to deploy apps and scripts to compute nodes. This app creates a list of [CloudTask](/dotnet/api/microsoft.azure.batch.cloudtask) input `ResourceFile` objects. Each task processes an input file by using a [CommandLine](/dotnet/api/microsoft.azure.batch.cloudtask.commandline) property. The Batch command line is where you specify your app or script.
217217

218218
The command line in the following code runs the Windows `type` command to display the input files. Then, the app adds each task to the job with the [AddTask](/dotnet/api/microsoft.azure.batch.joboperations.addtask) method, which queues the task to run on the compute nodes.
219219

articles/batch/quick-run-python.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Review the code to understand the steps in the [Azure Batch Python Quickstart](h
152152

153153
To create a Batch pool, the app uses the [PoolAddParameter](/python/api/azure-batch/azure.batch.models.pooladdparameter) class to set the number of nodes, VM size, and pool configuration. The following [VirtualMachineConfiguration](/python/api/azure-batch/azure.batch.models.virtualmachineconfiguration) object specifies an [ImageReference](/python/api/azure-batch/azure.batch.models.imagereference) to an Ubuntu Server 20.04 LTS Azure Marketplace image. Batch supports a wide range of Linux and Windows Server Marketplace images, and also supports custom VM images.
154154

155-
The `POOL_NODE_COUNT` and `POOL_VM_SIZE` are defined constants. The app creates a pool of two size *Standard_DS1_v2* nodes. This size offers a good balance of performance versus cost for this quickstart.
155+
The `POOL_NODE_COUNT` and `POOL_VM_SIZE` are defined constants. The app creates a pool of two size Standard_DS1_v2 nodes. This size offers a good balance of performance versus cost for this quickstart.
156156

157157
The [pool.add](/python/api/azure-batch/azure.batch.operations.pooloperations#azure-batch-operations-pooloperations-add) method submits the pool to the Batch service.
158158

@@ -189,11 +189,9 @@ batch_service_client.job.add(job)
189189

190190
### Create tasks
191191

192-
The app creates a list of task objects by using the [TaskAddParameter](/python/api/azure-batch/azure.batch.models.taskaddparameter) class. Each task uses a `command_line` parameter to specify an app or script. Batch provides several ways to deploy apps and scripts to compute nodes.
192+
Batch provides several ways to deploy apps and scripts to compute nodes. This app creates a list of task objects by using the [TaskAddParameter](/python/api/azure-batch/azure.batch.models.taskaddparameter) class. Each task processes an input file by using a `command_line` parameter to specify an app or script.
193193

194-
The following command line script processes the input `resource_files` objects. The script runs the Bash shell `cat` command to display the text files.
195-
196-
The app then uses the [task.add_collection](/python/api/azure-batch/azure.batch.operations.taskoperations#azure-batch-operations-taskoperations-add-collection) method to add each task to the job, which queues the tasks to run on the compute nodes.
194+
The following script processes the input `resource_files` objects by running the Bash shell `cat` command to display the text files. The app then uses the [task.add_collection](/python/api/azure-batch/azure.batch.operations.taskoperations#azure-batch-operations-taskoperations-add-collection) method to add each task to the job, which queues the tasks to run on the compute nodes.
197195

198196
```python
199197
tasks = []
@@ -212,7 +210,7 @@ batch_service_client.task.add_collection(job_id, tasks)
212210

213211
### View task output
214212

215-
The app monitors task state to make sure the tasks complete. When each task runs successfully, the output of the task command writes to the *stdout.txt* file. The app then displays the *stdout.txt* file for each completed task.
213+
The app monitors task state to make sure the tasks complete. When each task runs successfully, the task command output writes to the *stdout.txt* file. The app then displays the *stdout.txt* file for each completed task.
216214

217215
```python
218216
tasks = batch_service_client.task.list(job_id)

0 commit comments

Comments
 (0)