Azure Batch
Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use, which are available at Stonebranch Integration Hub - Terms of Use.
Overview
Azure Batch is a set of batch management capabilities that enables developers, scientists, and engineers to easily and efficiently create Azure Batch jobs and tasks. This Universal Extension provides the capability to add Azure Jobs, add Azure Batch Tasks to existing Azure Jobs, and optionally monitor Azure Task execution for completion (successful or failed).
Version Information
Template Name | Extension Name | Extension Version |
---|---|---|
Azure Batch | ue-azure-batch | 1.0.0 |
Refer to Changelog for version history information.
Key Features
Actions:
Add an Azure Batch Job to a specific pool of nodes by providing the Azure Batch Job configuration in JSON format.
Add a task as part of a specific job & optionally monitor task for completion.
Authentication/Authorization:
Ability to connect to Azure using Client Credentials Grant Type.
Ability to connect to Azure using User Credentials Grant Type.
Requirements
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Area | Details |
---|---|
Python Version | Requires Python 3.7.6 or higher. Tested with the Universal Agent bundled Python distribution. |
Python Libraries | Microsoft Authentication Library (MSAL) |
Universal Agent | Both Windows and Linux agents are supported:
|
Universal Controller | Universal Controller Version 7.1.0.0 and later. |
Network and Connectivity | Needed outbound internet connectivity. |
Southbound Systems | Microsoft Azure |
Supported Actions
Action: “Job | Add”
Upload a Job to Azure Batch, assigned it the specified pool and verify its proper initialization. If Azure fails to initialize the task after 30 seconds, the initialization is considered a failure. After a successful execution, the job's status is "Active" and is ready for use.
Configuration examples
User Scenario: Upload a Job definition using User Credentials.
Action Output
Output Type | Description (Successful Execution) | Example (Successful Execution) |
---|---|---|
EXTENSION | Standard UC format The extension output follows the standard UC output format, providing:
Result fields
|
|
Description (Failed Execution) | Example (Failed Execution) | |
Standard UC format
Result fields
|
|
Action: “Task | Add”
Add a task as part of a specific job and verify its proper initialization. After a successful initialization, the task's state is "Active" and will be automatically run by Azure Batch.
The task can optionally be monitored for completion. In that case, Azure is polled every one second by default (can be parameterized by the user) for the task’s execution status.
Configuration examples
User scenario: Add a task and do not wait for its completion. | User scenario: Add a task and wait for its completion. |
Action Output
Output Type | Description (Successful Execution) | Example (Successful Execution) |
---|---|---|
EXTENSION | Standard UC format The extension output follows the standard UC output format, providing:
Result fields
|
|
Description (Failed Execution) | Example (Failed Execution) | |
Standard UC format
Result fields
|
|
Extension Parameters & Fields
Field | Type | Default Value | Mandatory | Description | Introduced in Version |
---|---|---|---|---|---|
Action | Choice | Job | Add | Yes | The action performed upon the task execution. Available options:
| 1.0.0 |
Authentication | Choice | Client Credentials | Yes | The authentication method for this task to be run with. Available options:
| 1.0.0 |
Credentials | Credentials | Yes | The Azure AD user credentials or the Azure application client secret.
| 1.0.0 | |
Application (client) ID | Text | Yes | The Application (client) ID your application belongs to. You can find it in “Overview” section of your App registration, in Azure Active Directory. | 1.0.0 | |
Directory (tenant) ID | Text | Yes | The Directory (tenant) ID your application belongs to. You can find it in “Overview” section of your App registration, in Azure Active Directory. | 1.0.0 | |
Batch Account Endpoint | Text | Yes | The Batch account endpoint. You can find it in “Overview” section of your Batch Account, in Azure Active Directory. | 1.0.0 | |
Job ID | Text | Yes, when Action “Task(s) | Add“ is selected. | The Job ID the new task will be added to. | 1.0.0 | |
Wait for Success or Failure | Checkbox | False | No | Wait for the added task to be completed or not. | 1.0.0 |
Polling Interval | Integer | 1 | Yes if “Wait for Completion“ is checked | The polling interval in seconds between checking for the task status. Minimum acceptable value is “1“. | 1.0.0 |
JSON Payload (Job / Task) | Large Text | Yes | The JSON payload used to create a job or a task. | 1.0.0 |
Extension Exit Codes
Extension Exit Code | Status | Status Description | Meaning |
---|---|---|---|
0 | SUCCESS | “Task executed successfully.“ | Successful Execution |
1 | FAIL | “Execution Failed: <error details>” | Task Add: The task was added & executed, but the task result was failure (raised only if the user selected to wait for task completion). Other cases: Any error that can not be mapped to the rest of the error codes. |
3 | AUTHORIZATION_ERROR | “Authorization Error: <error details>.” | Account is not authorized to perform the requested action. |
10 | CONNECTION_ERROR | “Connection failed: <error details>.“ | Connectivity to Azure API endpoint failed. |
20 | DATA_VALIDATION_ERROR | “Data Validation Error: <error details>.“ | User data validation error. |
30 | JOB_ADD_FAILED | “Job add failure: <error details>.“ | Job add failed (operation not completed within a time window of 30 seconds is also considered a failure). |
40 | TASK_ADD_FAILED | “Task add failure: <error details>.“ | Task add failed (operation not completed within a time window of 30 seconds is also considered a failure). |
Import Universal Template
To use the Universal Template, you first must perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow these instructions.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Modifications of this integration, applied by users or customers, before or after import, might affect the supportability of this integration. For more information refer to Integration Modifications.
Configure Universal Task
For a new Universal Task, create a new task, and enter the required input fields.
Integration Modifications
Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.
Python code modifications should not be done.
Template Modifications
General Section
"Name", "Extension", "Variable Prefix", "Icon" should not be changed.
Universal Template Details Section
"Template Type", "Agent Type", "Send Extension Variables", "Always Cancel on Force Finish" should not be changed.
Result Processing Defaults Section
Success and Failure Exit codes should not be changed.
Success and Failure Output processing should not be changed.
Fields Restriction Section
The setup of the template does not impose any restrictions, However with respect to "Exit Code Processing Fields" section.Success/Failure exit codes need to be respected.
In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining success or failure of a task.
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
Document References
This document references the following documents:
Document Link | Description |
---|---|
User documentation for creating, working with and understanding Universal Templates and Integrations. | |
User documentation for creating Universal Tasks in the Universal Controller user interface. | |
User Documentation for Microsoft Azure Batch service. |
Changelog
ue-azure-batch-1.0.0 (2023-03-20)
Initial Version