You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/batch/quick-create-cli.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
-
title: 'Quickstart: Use the Azure CLI to create a Batch account and run a job
3
-
description: Follow this quickstart to use the Azure CLI to create a Batch account and run a Batch job.
2
+
title: 'Quickstart: Use the Azure CLI to create a Batch account and run a job'
3
+
description: Follow this quickstart to use the Azure CLI to create a Batch account, a pool of compute nodes, and a job that runs basic tasks on the pool.
4
4
ms.topic: quickstart
5
5
ms.date: 04/12/2023
6
6
ms.custom: mvc, devx-track-azurecli, mode-api
7
7
---
8
8
9
-
# Quickstart: Run your first Batch job with the Azure CLI
9
+
# Quickstart: Use the Azure CLI to create an Azure Batch account and run a job
10
10
11
-
This quickstart shows you how to get started with Azure Batch by using Azure CLI commands. You create a Batch account that has a *pool* of virtual machines, or compute *nodes*. You then create and run a *job* with *tasks* that run commands on the pool nodes.
11
+
This quickstart shows you how to get started with Azure Batch by using Azure CLI commands. You create a Batch account that has a *pool* of virtual machines, or compute *nodes*. You then create and run a *job* with *tasks* that run on the pool nodes.
12
12
13
-
This quickstart uses the Azure CLI to create and manage Azure resources from the command line and in a script. After you complete this quickstart, you understand the key concepts of the Batch service and are ready to use Batch with more realistic, larger scale workloads.
13
+
This quickstart uses the Azure CLI to create and manage Azure resources from the command line and in a script. After you complete this quickstart, you understand the [key concepts of the Batch service](batch-service-workflow-features.md) and are ready to use Batch with more realistic, larger scale workloads.
14
14
15
15
## Prerequisites
16
16
@@ -121,7 +121,7 @@ The command output shows the settings for each task. Batch distributes the tasks
121
121
122
122
## View task status
123
123
124
-
After you create the task, Batch queues the task to run on the pool. Once a node is available, the task runs.
124
+
After you create the task, Batch queues the task to run on the pool. Once a node is available, the task runs on the node.
125
125
126
126
Use the [az batch task show](/cli/azure/batch/task#az-batch-task-show) command to view the status of Batch tasks. The following example shows details about the status of `myTask1`:
127
127
@@ -166,7 +166,7 @@ az batch task file download \
166
166
--destination ./stdout.txt
167
167
```
168
168
169
-
You can view the contents of the *stdout.txt* output file in a text editor. The contents show the Azure Batch environment variables that are set on the node. You can reference these environment variables in your Batch job task command lines, and in the apps and scripts the command lines run. The following example shows a typical *stdout.txt* file:
169
+
You can view the contents of the *stdout.txt* output file in a text editor. The following example shows a typical *stdout.txt* file. The standard output from this task shows the Azure Batch environment variables that are set on the node. You can reference these environment variables in your Batch job task command lines, and in the apps and scripts the command lines run.
If you want to continue with Batch tutorials and samples, you can use the Batch account and linked storage account you created in this quickstart. There's no charge for the Batch account itself.
192
192
193
-
Pools and nodes incur charges while the nodes are running, even if they aren't running jobs. When you no longer need a pool, use the [az batch pool delete](/cli/azure/batch/pool#az-batch-pool-delete) command to delete it. Deleting a pool deletes all task output on the nodes and the nodes themselves.
193
+
Pools and nodes incur charges while the nodes are running, even if they aren't running jobs. When you no longer need a pool, use the [az batch pool delete](/cli/azure/batch/pool#az-batch-pool-delete) command to delete it. Deleting a pool deletes all task output on the nodes, and the nodes themselves.
194
194
195
195
```azurecli-interactive
196
196
az batch pool delete --pool-id myPool
197
197
```
198
198
199
-
When you no longer need the resources you created for this quickstart, you can use the [az group delete](/cli/azure/group#az-group-delete) command to delete the resource group and all its resources, including the storage account, Batch account, node pools, and all related resources. Run the following command:
199
+
When you no longer need any of the resources you created for this quickstart, you can use the [az group delete](/cli/azure/group#az-group-delete) command to delete the resource group and all its resources. To delete the resource group and the storage account, Batch account, node pools, and all related resources, run the following command:
200
200
201
201
```azurecli-interactive
202
202
az group delete --name qsBatch
203
203
```
204
204
205
205
## Next steps
206
206
207
-
In this quickstart, you created a Batch account, a Batch pool, and a Batch job. The job ran sample tasks, and you viewed output created on one of the nodes. Now that you understand the key concepts of the Batch service, you are ready to try Batch with more realistic workloads at larger scale. To learn more about Azure Batch, continue to the Azure Batch tutorials.
207
+
In this quickstart, you created a Batch account and a Batch pool, and created and ran a Batch job. The job ran sample tasks, and you viewed output from one of the nodes. Now that you understand the key concepts of the Batch service, you're ready to use Batch with more realistic workloads at larger scale. To learn more about Azure Batch, continue to the Azure Batch tutorials.
0 commit comments