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-application-packages.md
+24-27Lines changed: 24 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,61 +2,58 @@
2
2
title: Deploy application packages to compute nodes
3
3
description: Use the application packages feature of Azure Batch to easily manage multiple applications and versions for installation on Batch compute nodes.
4
4
ms.topic: how-to
5
-
ms.date: 09/16/2020
6
-
ms.custom: "H1Hack27Feb2017, devx-track-csharp"
5
+
ms.date: 09/24/2020
6
+
ms.custom:
7
+
- H1Hack27Feb2017
8
+
- devx-track-csharp
9
+
- contperfq1
7
10
8
11
---
9
12
# Deploy applications to compute nodes with Batch application packages
10
13
11
-
The application packages feature of Azure Batch helps you manage task applications and their deployment to compute nodes in your pools. Application packages can simplify the code in your Batch solution and lower the overhead required to manage the applications that your tasks run. With application packages, you can upload and manage multiple versions of the applications your tasks run, including their supporting files. You can then automatically deploy one or more of these applications to the compute nodes in your pool.
14
+
Application packages can simplify the code in your Azure Batch solution and lower the overhead required to manage the applications that your tasks run. With application packages, you can upload and manage multiple versions of applications your tasks run, including their supporting files. You can then automatically deploy one or more of these applications to the compute nodes in your pool.
12
15
13
-
Application packages can help your customers select applications for their jobs, specifying the exact version to use when processing jobs with your Batch-enabled service. You can also provide the ability for your customers to upload and track their own applications in your service.
14
-
15
-
The APIs for creating and managing application packages are part of the [Batch Management .NET](/dotnet/api/overview/azure/batch/management) library. The APIs for installing application packages on a compute node are part of the [Batch .NET](/dotnet/api/overview/azure/batch/client) library. Comparable features are in the available Batch APIs for other languages.
16
+
The APIs for creating and managing application packages are part of the [Batch Management .NET](/dotnet/api/overview/azure/batch/management) library, and the APIs for installing application packages on a compute node are part of the [Batch .NET](/dotnet/api/overview/azure/batch/client) library. Comparable features are in the available Batch APIs for other languages.
16
17
17
18
This article explains how to upload and manage application packages in the Azure portal, and how to install them on a pool's compute nodes with the [Batch .NET](/dotnet/api/overview/azure/batch/client) library.
18
19
19
20
## Application package requirements
20
21
21
22
To use application packages, you need to [link an Azure Storage account](#link-a-storage-account) to your Batch account.
22
23
23
-
There are restrictions on the number of applications and application packages within a Batch account and on the maximum application package size. See [Quotas and limits for the Azure Batch service](batch-quota-limit.md) for details about these limits.
24
+
There are restrictions on the number of applications and application packages within a Batch account and on the maximum application package size. For more information, see [Quotas and limits for the Azure Batch service](batch-quota-limit.md).
24
25
25
26
> [!NOTE]
26
-
> Batch pools created prior to July 5, 2017 do not support application packages (unless they were created after March 10, 2016 using Cloud Services Configuration).
27
-
>
28
-
> The application packages feature described here supersedes the Batch Apps feature available in previous versions of the service.
29
-
30
-
## About applications and application packages
27
+
> Batch pools created prior to July 5, 2017 do not support application packages (unless they were created after March 10, 2016 using Cloud Services Configuration). The application packages feature described here supersedes the Batch Apps feature available in previous versions of the service.
31
28
32
-
Within Azure Batch, an *application* refers to a set of versioned binaries that can be automatically downloaded to the compute nodes in your pool. An *application package* refers to a specific set of those binaries, representing a given version of the application.
29
+
## Understand applications and application packages
33
30
34
-
:::image type="content" source="media/batch-application-packages/app_pkg_01.png" alt-text="Diagram showing a high-level view of applications and application packages.":::
31
+
Within Azure Batch, an *application* refers to a set of versioned binaries that can be automatically downloaded to the compute nodes in your pool. An application contains one or more *application packages*, which represent different versions of the application.
35
32
36
-
An*application* in Batch contains one or more application packages and specifies configuration options for the application. For example, an application can specify the default application package version to install on compute nodes and whether its packages can be updated or deleted.
33
+
Each*application package* is a .zip file that contains the application binaries and any supporting files. Only the .zip format is supported.
37
34
38
-
An *application package* is a .zip file that contains the application binaries and supporting files that are required for your tasks to run the application. Each application package represents a specific version of the application. Only the .zip format is supported.
35
+
:::image type="content" source="media/batch-application-packages/app_pkg_01.png" alt-text="Diagram showing a high-level view of applications and application packages.":::
39
36
40
-
You can specify application packages at the pool or task levels. You can specify one or more of these packages and (optionally) a version when you create a pool or task.
37
+
You can specify application packages at the pool or task level.
41
38
42
39
-**Pool application packages** are deployed to every node in the pool. Applications are deployed when a node joins a pool, and when it is rebooted or reimaged.
43
40
44
-
Pool application packages are appropriate when all nodes in a pool execute a job's tasks. You can specify one or more application packages when you create a pool, and you can add or update an existing pool's packages. If you update an existing pool's application packages, you must restart its nodes to install the new package.
41
+
Pool application packages are appropriate when all nodes in a pool will execute a job's tasks. You can specify one or more application packages when you create a pool, and you can add or update an existing pool's packages. If you update an existing pool's application packages, you must restart its nodes to install the new package.
45
42
46
43
-**Task application packages** are deployed only to a compute node scheduled to run a task, just before running the task's command line. If the specified application package and version is already on the node, it is not redeployed and the existing package is used.
47
44
48
45
Task application packages are useful in shared-pool environments, where different jobs are run on one pool, and the pool is not deleted when a job is completed. If your job has fewer tasks than nodes in the pool, task application packages can minimize data transfer since your application is deployed only to the nodes that run tasks.
49
46
50
-
Other scenarios that can benefit from task application packages are jobs that run a large application, but for only a few tasks. For example, a pre-processing stage or a merge task, where the pre-processing or merge application is heavyweight, may benefit from using task application packages.
47
+
Other scenarios that can benefit from task application packages are jobs that run a large application, but for only a few tasks. For example, task applications may be useful for a heavyweight pre-processing stage or a merge task.
51
48
52
-
With application packages, your pool's start task doesn't have to specify a long list of individual resource files to install on the nodes. You don't have to manually manage multiple versions of your application files in Azure Storage, or on your nodes. And, you don't need to worry about generating [SAS URLs](../storage/common/storage-sas-overview.md) to provide access to the files in your Storage account. Batch works in the background with Azure Storage to store application packages and deploy them to compute nodes.
49
+
With application packages, your pool's start task doesn't have to specify a long list of individual resource files to install on the nodes. You don't have to manually manage multiple versions of your application files in Azure Storage, or on your nodes. And you don't need to worry about generating [SAS URLs](../storage/common/storage-sas-overview.md) to provide access to the files in your Storage account. Batch works in the background with Azure Storage to store application packages and deploy them to compute nodes.
53
50
54
51
> [!NOTE]
55
-
> The total size of a start task must be less than or equal to 32768 characters, including resource files and environment variables. If your start task exceeds this limit, then using application packages is another option. You can also create a .zip file containing your resource files, upload it as a blob to Azure Storage, and then unzip it from the command line of your start task.
52
+
> The total size of a start task must be less than or equal to 32768 characters, including resource files and environment variables. If your start task exceeds this limit, using application packages is another option. You can also create a .zip file containing your resource files, upload it as a blob to Azure Storage, and then unzip it from the command line of your start task.
56
53
57
54
## Upload and manage applications
58
55
59
-
You can use the [Azure portal](https://portal.azure.com) or the Batch Management APIs to manage the application packages in your Batch account. In the next few sections, we first show how to link a Storage account, then discuss adding applications and packages and managing them with the portal.
56
+
You can use the [Azure portal](https://portal.azure.com) or the Batch Management APIs to manage the application packages in your Batch account. Below, we explain how to link a storage account, then show how to add and manage adding applications and application packages in the Azure portal.
60
57
61
58
### Link a storage account
62
59
@@ -69,7 +66,7 @@ After you've linked the two accounts, Batch can automatically deploy the package
69
66
> [!IMPORTANT]
70
67
> You can't use application packages with Azure Storage accounts configured with [firewall rules](../storage/common/storage-network-security.md), or with **Hierarchical namespace** set to **Enabled**.
71
68
72
-
The Batch service uses Azure Storage to store your application packages as block blobs. You are [charged as normal](https://azure.microsoft.com/pricing/details/storage/) for the block blob data, and the size of each package can't exceed the maximum block blob size. For more information, see [Azure Storage scalability and performance targets for storage accounts](../storage/blobs/scalability-targets.md). To minimize costs, bee sure to consider the size and number of your application packages, and periodically remove deprecated packages.
69
+
The Batch service uses Azure Storage to store your application packages as block blobs. You are [charged as normal](https://azure.microsoft.com/pricing/details/storage/) for the block blob data, and the size of each package can't exceed the maximum block blob size. For more information, see [Azure Storage scalability and performance targets for storage accounts](../storage/blobs/scalability-targets.md). To minimize costs, be sure to consider the size and number of your application packages, and periodically remove deprecated packages.
73
70
74
71
### View current applications
75
72
@@ -83,7 +80,7 @@ Selecting this menu option opens the **Applications** window. This window displa
83
80
-**Default version**: If applicable, the application version that will be installed if no version is specified when deploying the application.
84
81
-**Allow updates**: Specifies whether package updates and deletions are allowed.
85
82
86
-
To see the [file structure](files-and-directories.md) of the application package on your compute node, navigate to your Batch account in the Azure portal. Select **Pools** and then select the pool that contains the compute node you're interested in. Then select the compute node on which the application package is installed and open the **applications** folder.
83
+
To see the [file structure](files-and-directories.md) of the application package on a compute node, navigate to your Batch account in the Azure portal. Select **Pools**. then select the pool that contains the compute node. Select the compute node on which the application package is installed and open the **applications** folder.
87
84
88
85
### View application details
89
86
@@ -95,7 +92,7 @@ To see the details for an application, select it in the **Applications** window.
95
92
96
93
### Add a new application
97
94
98
-
To create a new application, you add an application package and specify a new, unique application ID.
95
+
To create a new application, you add an application package and specify a unique application ID.
99
96
100
97
In your Batch account, select **Applications** and then select **Add**.
> If an application package deployment fails for any reason, the Batch service marks the node [unusable](/dotnet/api/microsoft.azure.batch.computenode.state), and no tasks are scheduled for execution on that node. In this case, you should restart the node to reinitiate the package deployment. Restarting the node also enables task scheduling again on the node.
165
+
> If an application package deployment fails, the Batch service marks the node [unusable](/dotnet/api/microsoft.azure.batch.computenode.state), and no tasks are scheduled for execution on that node. If this happens, restart the node to reinitiate the package deployment. Restarting the node also enables task scheduling again on the node.
169
166
170
167
### Install task application packages
171
168
@@ -241,7 +238,7 @@ CloudTask blenderTask = new CloudTask(taskId, commandLine);
241
238
242
239
## Update a pool's application packages
243
240
244
-
If an existing pool has already been configured with an application package, you can specify a new package for the pool. If you specify a new package reference for a pool, the following apply:
241
+
If an existing pool has already been configured with an application package, you can specify a new package for the pool. This means:
245
242
246
243
- The Batch service installs the newly specified package on all new nodes that join the pool and on any existing node that is rebooted or reimaged.
247
244
- Compute nodes that are already in the pool when you update the package references do not automatically install the new application package. These compute nodes must be rebooted or reimaged to receive the new package.
0 commit comments