Monday, November 13, 2023

Deploying Batch Application Packages

Azure Batch Service allows deploying and executing batch applications as parallel tasks. Scalability of the underlying compute nodes support parallel processing and efficiency on resource consumption. In this article we will discuss the lifecycle of applications referenced in Azure Batch service. 

You can access the Applications within a Batch account via the Azure Portal. 

Once you select one application, you can see all the available versions listed.

Ideally an application has a major version and a minor version. Deployment of these applications are simplified with the Azure CLI commands. 

First I would like to ensure an application exist in the Batch account. 

az batch application create --application-name $(batchAccountApplicationName) --name $(batchAccountName) --resource-group $(resourceGroupName)

Then we can deploy the package with a desired version. 

az batch application package create --application-name $(batchAccountApplicationName) --name $(batchAccountName) --resource-group $(resourceGroupName) --version $(batchApplicationVersion) --package-file=$(System.DefaultWorkingDirectory)/_Event1/drop/$(Release.Artifacts._Event1.BuildId).zip

In the example above I am referencing the package file from a Azure CI build output. Version parameter and other parameter values are passed in as pipeline variables.

No comments:

Post a Comment