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/batch-docker-container-workloads.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Container workloads
3
3
description: Learn how to run and scale apps from container images on Azure Batch. Create a pool of compute nodes that support running container tasks.
4
4
ms.topic: how-to
5
-
ms.date: 08/13/2021
5
+
ms.date: 08/18/2021
6
6
ms.custom: "seodec18, devx-track-csharp"
7
7
---
8
8
# Run container applications on Azure Batch
@@ -269,7 +269,7 @@ CloudPool pool = batchClient.PoolOperations.CreatePool(
269
269
270
270
### Managed Identity support for ACR
271
271
272
-
When accessing containers stored in [Azure Container Registry](https://azure.microsoft.com/services/container-registry), either a username/password or a Managed Identity can be used to authenticate with the service. To use a Managed Identity, first ensure that the identity has been [assigned to the pool](managed-identity-pools.md) and that the identity has the `AcrPull` role assigned for the container registry you wish to access. Then, simply tell Batch which identity to use when authenticating with ACR.
272
+
When accessing containers stored in [Azure Container Registry](https://azure.microsoft.com/services/container-registry), either a username/password or a managed identity can be used to authenticate with the service. To use a managed identity, first ensure that the identity has been [assigned to the pool](managed-identity-pools.md) and that the identity has the `AcrPull` role assigned for the container registry you wish to access. Then, simply tell Batch which identity to use when authenticating with ACR.
The Batch service API supports persisting output data to Azure Storage for tasks and job manager tasks that run on pools with the virtual machineconfiguration. When you add a task, you can specify a container in Azure Storage as the destination for the task's output. The Batch service then writes any output data to that container when the task is complete.
14
+
The Batch service API supports persisting output data to Azure Storage for tasks and job manager tasks that run on pools with [Virtual Machine Configuration](nodes-and-pools.md#virtual-machine-configuration). When you add a task, you can specify a container in Azure Storage as the destination for the task's output. The Batch service then writes any output data to that container when the task is complete.
15
15
16
-
An advantage to using the Batch service API to persist task output is that you do not need to modify the application that the task is running. Instead, with a few modifications to your client application, you can persist the task's output from within the same code that creates the task.
16
+
When using the Batch service API to persist task output, you don't need to modify the application that the task is running. Instead, with a few modifications to your client application, you can persist the task's output from within the same code that creates the task.
17
17
18
18
> [!IMPORTANT]
19
19
> Persisting task data to Azure Storage with the Batch service API does not work with pools created before [February 1, 2018](https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md#1204).
@@ -27,11 +27,11 @@ Azure Batch provides more than one way to persist task output. Using the Batch s
27
27
- You want to persist output to an Azure Storage container with an arbitrary name.
28
28
- You want to persist output to an Azure Storage container named according to the [Batch File Conventions standard](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/batch/Microsoft.Azure.Batch.Conventions.Files).
29
29
30
-
If your scenario differs from those listed above, you may need to consider a different approach. For example, the Batch service API does not currently support streaming output to Azure Storage while the task is running. To stream output, consider using the Batch File Conventions library, available for .NET. For other languages, you'll need to implement your own solution. For information on other options for persisting task output, see [Persist job and task output to Azure Storage](batch-task-output.md).
30
+
If your scenario differs from those listed above, you may need to consider a different approach. For example, the Batch service API does not currently support streaming output to Azure Storage while the task is running. To stream output, consider using the Batch File Conventions library, available for .NET. For other languages, you'll need to implement your own solution. For more information about other options, see [Persist job and task output to Azure Storage](batch-task-output.md).
31
31
32
32
## Create a container in Azure Storage
33
33
34
-
To persist task output to Azure Storage, you'll need to create a container that serves as the destination for your output files. Create the container before you run your task, preferably before you submit your job. To create the container, use the appropriate Azure Storage client library or SDK. For more information about Azure Storage APIs, see the [Azure Storage documentation](../storage/index.yml).
34
+
To persist task output to Azure Storage, you'll need to create a container that serves as the destination for your output files. Create the container before you run your task, preferably before you submit your job, by using the appropriate Azure Storage client library or SDK. For more information about Azure Storage APIs, see the [Azure Storage documentation](../storage/index.yml).
35
35
36
36
For example, if you are writing your application in C#, use the [Azure Storage client library for .NET](https://www.nuget.org/packages/WindowsAzure.Storage/). The following example shows how to create a container:
## Get a shared access signature for the container
44
44
45
-
After you create the container, get a shared access signature (SAS) with write access to the container. A SAS provides delegated access to the container. The SAS grants access with a specified set of permissions and over a specified time interval. The Batch service needs a SAS with write permissions to write task output to the container. For more information about SAS, see [Using shared access signatures \(SAS\) in Azure Storage](../storage/common/storage-sas-overview.md).
45
+
After you create the container, get a shared access signature (SAS) with write access to the container. A SAS provides delegated access to the container. The SAS grants access with a specified set of permissions and over a specified time interval. The Batch service needs an SAS with write permissions to write task output to the container. For more information about SAS, see [Using shared access signatures \(SAS\) in Azure Storage](../storage/common/storage-sas-overview.md).
46
46
47
47
When you get a SAS using the Azure Storage APIs, the API returns a SAS token string. This token string includes all parameters of the SAS, including the permissions and the interval over which the SAS is valid. To use the SAS to access a container in Azure Storage, you need to append the SAS token string to the resource URI. The resource URI, together with the appended SAS token, provides authenticated access to Azure Storage.
To specify output files for a task, create a collection of [OutputFile](/dotnet/api/microsoft.azure.batch.outputfile) objects and assign it to the [CloudTask.OutputFiles](/dotnet/api/microsoft.azure.batch.cloudtask.outputfiles#Microsoft_Azure_Batch_CloudTask_OutputFiles) property when you create the task.
63
+
To specify output files for a task, create a collection of [OutputFile](/dotnet/api/microsoft.azure.batch.outputfile) objects and assign it to the [CloudTask.OutputFiles](/dotnet/api/microsoft.azure.batch.cloudtask.outputfiles) property when you create the task.
64
64
65
-
The following C# code example creates a task that writes random numbers to a file named `output.txt`. The example creates an output file for `output.txt` to be written to the container. The example also creates output files for any log files that match the file pattern `std*.txt` (_e.g._, `stdout.txt` and `stderr.txt`). The container URL requires the SAS that was created previously for the container. The Batch service uses the SAS to authenticate access to the container:
65
+
The following C# code example creates a task that writes random numbers to a file named `output.txt`. The example creates an output file for `output.txt` to be written to the container. The example also creates output files for any log files that match the file pattern `std*.txt` (_e.g._, `stdout.txt` and `stderr.txt`). The container URL requires the SAS that was created previously for the container. The Batch service uses the SAS to authenticate access to the container.
66
66
67
67
```csharp
68
68
newCloudTask(taskId, "cmd /v:ON /c \"echo off && set && (FOR /L %i IN (1,1,100000) DO (ECHO !RANDOM!)) > output.txt\"")
@@ -118,7 +118,7 @@ new CloudTask(taskId, "cmd /v:ON /c \"echo off && set && (FOR /L %i IN (1,1,1000
@@ -142,7 +142,7 @@ For other settings, see the [OutputFileUploadCondition](/dotnet/api/mic
142
142
143
143
Thetasksinajobmayproducefilesthathavethesamename. Forexample, `stdout.txt` and `stderr.txt` arecreatedforeverytaskthatrunsinajob. Becauseeachtaskrunsinitsowncontext, thesefilesdon't conflict on the node'sfilesystem. However, whenyouuploadfilesfrommultipletaskstoasharedcontainer, you'll need to disambiguate files with the same name.
144
144
145
-
The [OutputFileBlobContainerDestination.Path](/dotnet/api/microsoft.azure.batch.outputfileblobcontainerdestination.path#Microsoft_Azure_Batch_OutputFileBlobContainerDestination_Path) propertyspecifiesthedestinationbloborvirtualdirectoryforoutputfiles. Youcanusethe**Path**propertytonamethebloborvirtualdirectoryinsuchawaythatoutputfileswiththesamenameareuniquelynamedinAzureStorage. UsingthetaskIDinthepathisagoodwaytoensureuniquenamesandeasilyidentifyfiles.
145
+
The [OutputFileBlobContainerDestination.Path](/dotnet/api/microsoft.azure.batch.outputfileblobcontainerdestination.path) propertyspecifiesthedestinationbloborvirtualdirectoryforoutputfiles. Youcanusethe**Path**propertytonamethebloborvirtualdirectoryinsuchawaythatoutputfileswiththesamenameareuniquelynamedinAzureStorage. UsingthetaskIDinthepathisagoodwaytoensureuniquenamesandeasilyidentifyfiles.
Copy file name to clipboardExpand all lines: articles/batch/managed-identity-pools.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Configure managed identities in Batch pools
3
3
description: Learn how to enable user-assigned managed identities on Batch pools and how to use managed identities within the nodes.
4
4
ms.topic: conceptual
5
-
ms.date: 05/25/2021
5
+
ms.date: 08/18/2021
6
6
7
7
---
8
8
# Configure managed identities in Batch pools
@@ -66,13 +66,12 @@ var pool = await managementClient.Pool.CreateWithHttpMessagesAsync(
66
66
67
67
## Use user-assigned managed identities in Batch nodes
68
68
69
-
Many Azure Batch technologies which access other Azure resources, such as Azure Storage or Azure Container Registries, support using Managed Identities.
70
-
Please refer to the following for more information on using Managed Identity with Azure Batch:
69
+
Many Azure Batch technologies which access other Azure resources, such as Azure Storage or Azure Container Registry, support managed identities. For more information on using managed identities with Azure Batch, see the following links:
You can also manually configure your tasks so that the managed identities can directly access [Azure resources that support managed identities](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md).
Copy file name to clipboardExpand all lines: articles/batch/resource-files.md
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Creating and using resource files
3
3
description: Learn how to create Batch resource files from various input sources. This article covers a few common methods on how to create and place them on a VM.
4
-
ms.date: 05/25/2021
4
+
ms.date: 08/18/2021
5
5
ms.topic: how-to
6
6
---
7
7
@@ -28,8 +28,7 @@ There are a few different options available to generate resource files, each wit
28
28
29
29
Using a storage container URL means, with the correct permissions, you can access files in any storage container in Azure.
30
30
31
-
In this C# example, the files have already been uploaded to an Azure storage container as blob storage. To access the data needed to create a resource file, we first need to get access to the storage container.
32
-
31
+
In this C# example, the files have already been uploaded to an Azure storage container as blob storage. To access the data needed to create a resource file, we first need to get access to the storage container. This can be done in several ways.
33
32
34
33
#### Shared Access Signature
35
34
@@ -63,19 +62,19 @@ If desired, you can use the [blobPrefix](/dotnet/api/microsoft.azure.batch.resou
Create a User Assigned Managed Identity and assign it the `Storage Blob Data Reader` role for your Azure Storage container. Next, [assign the managed identity to your pool](managed-identity-pools.md) so that your VMs can access the identity. Finally, you can access the files in your container by specifying the identity for Batch to use.
67
+
Create a [user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md#create-a-user-assigned-managed-identity) and assign it the `Storage Blob Data Reader` role for your Azure Storage container. Next, [assign the managed identity to your pool](managed-identity-pools.md) so that your VMs can access the identity. Finally, you can access the files in your container by specifying the identity for Batch to use.
An alternative to generating a SAS URL or using a Managed Identity is to enable anonymous, public read-access to a container and its blobs in Azure Blob storage. By doing so, you can grant read-only access to these resources without sharing your account key, and without requiring a SAS. Public read-access is typically used for scenarios where you want certain blobs to be always available for anonymous read-access. If this scenario suits your solution, see the [Anonymous access to blobs](../storage/blobs/anonymous-read-access-configure.md) article to learn more about managing access to your blob data.
77
+
An alternative to generating a SAS URL or using a managed identity is to enable anonymous, public read-access to a container and its blobs in Azure Blob storage. By doing so, you can grant read-only access to these resources without sharing your account key, and without requiring a SAS. Public access is typically used for scenarios where you want certain blobs to be always available for anonymous read-access. If this scenario suits your solution, see [Configure anonymous public read access for containers and blobs](../storage/blobs/anonymous-read-access-configure.md) to learn more about managing access to your blob data.
79
78
80
79
### Storage container name (autostorage)
81
80
@@ -111,7 +110,7 @@ You can also use a string that you define as a URL (or a combination of strings
> Managed Identity authentication will only work with files in Azure Storage. The Managed Identity needs the `Storage Blob Data Reader` role assignment for the container the file is in and it must also be [assigned to the Batch pool](managed-identity-pools.md).
123
+
> Managed identity authentication will only work with files in Azure Storage. The nanaged identity needs the `Storage Blob Data Reader` role assignment for the container the file is in, and it must also be [assigned to the Batch pool](managed-identity-pools.md).
Copy file name to clipboardExpand all lines: articles/batch/virtual-file-mount.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Mount a virtual file system on a pool
3
3
description: Learn how to mount a virtual file system on a Batch pool.
4
4
ms.topic: how-to
5
5
ms.custom: devx-track-csharp
6
-
ms.date: 03/26/2021
6
+
ms.date: 08/18/2021
7
7
---
8
8
9
9
# Mount a virtual file system on a Batch pool
@@ -73,7 +73,7 @@ new PoolAddParameter
73
73
74
74
### Azure Blob container
75
75
76
-
Another option is to use Azure Blob storage via [blobfuse](../storage/blobs/storage-how-to-mount-container-linux.md). Mounting a blob file system requires an `AccountKey`, `SasKey` or `Managed Identity` with access to your storage account. For information on getting these keys, see [Manage storage account access keys](../storage/common/storage-account-keys-manage.md), [Grant limited access to Azure Storage resources using shared access signatures (SAS)](../storage/common/storage-sas-overview.md) or [Assigning Managed Identities to pools](managed-identity-pools.md). For more information and tips on using blobfuse, see the [blobfuse project](https://github.com/Azure/azure-storage-fuse).
76
+
Another option is to use Azure Blob storage via [blobfuse](../storage/blobs/storage-how-to-mount-container-linux.md). Mounting a blob file system requires an `AccountKey`, `SasKey` or `Managed Identity` with access to your storage account. For information on getting these keys, see [Manage storage account access keys](../storage/common/storage-account-keys-manage.md), [Grant limited access to Azure Storage resources using shared access signatures (SAS)](../storage/common/storage-sas-overview.md), and [Configure managed identities in Batch pools](managed-identity-pools.md). For more information and tips on using blobfuse, see the [blobfuse project](https://github.com/Azure/azure-storage-fuse).
77
77
78
78
To get default access to the blobfuse mounted directory, run the task as an **Administrator**. Blobfuse mounts the directory at the user space, and at pool creation it is mounted as root. In Linux all **Administrator** tasks are root. All options for the FUSE module are described in the [FUSE reference page](https://manpages.ubuntu.com/manpages/xenial/man8/mount.fuse.8.html).
79
79
@@ -106,7 +106,7 @@ new PoolAddParameter
106
106
> `AccountKey`, `SasKey` and `IdentityReference` are mutually exclusive, only one can be specified.
107
107
108
108
> [!NOTE]
109
-
>If using a Managed Identity, ensure that the Identity has been assigned to the pool so that it is available on the VM doing the mounting. The identity will need to have the `Storage Blob Data Contributor` role assigned to function properly.
109
+
>If using a managed identity, ensure that the identity has been [assigned to the pool](managed-identity-pools.md) so that it is available on the VM doing the mounting. The identity will need to have the `Storage Blob Data Contributor` role in order to function properly.
110
110
111
111
### Network File System
112
112
@@ -162,7 +162,7 @@ If a mount configuration fails, the compute node in the pool will fail and the n
162
162
163
163
To get the log files for debugging, use [OutputFiles](batch-task-output-files.md) to upload the `*.log` files. The `*.log` files contain information about the file system mount at the `AZ_BATCH_NODE_MOUNTS_DIR` location. Mount log files have the format: `<type>-<mountDirOrDrive>.log` for each mount. For example, a `cifs` mount at a mount directory named `test` will have a mount log file named: `cifs-test.log`.
164
164
165
-
## Support Matrix
165
+
## Support matrix
166
166
167
167
Azure Batch supports the following virtual file system types for node agents produced for their respective publisher and offer.
0 commit comments