Microsoft Azure Batch Extended Features
Microsoft Azure Batch Extensions
This project is a preview build of the Microsoft Azure command-line interface to demonstrate proposed features in Azure Batch. For further details on the Azure CLI, please check the official documentation.
The purpose of this project is to allow customers to try out proposed Batch features and provide feedback to help shape the direction of the Batch service. The features presented here may not be compatible with other Batch client SDKs and tools, nor will they necessarily be adopted into the core Batch service.
As these features are still in preview, they will be updated regularly, and refined based on customer feedback. Unfortunately this may result in occasional breaking changes, though every effort will be made to keep this to a minimum.
A new command to allow a user to upload a set of files directly into the storage account linked to their Azure Batch account.
Input data stored in linked storage under a file group can be simply referenced by a task by using some new ResourceFile properties.
When declaring task output files, you can now persist outputs to a named file group, without the need to generate a container SAS URL.
A new command to allow a user to download job output files from a file group in the storage account linked to their Azure Batch account.
Templates allow pools and jobs to be defined in parameterized json files with a format inspired by ARM templates.
Task factories provide a way for a job and all its tasks to be created in one command instead of calling azure batch task create for each task. There are currently three kinds of task factory:
Application templates provide a way to partition the details of a job into two parts. All of the details about how the job should be processed are moved into the application template, creating a reusable definition that is independent of a particular account. Application templates are parameterized to allow the processing to be customized without requiring modification of the template itself.
Integration with existing 3rd party package managers to streamline the installation of applications. Currently the following package managers are supported:
- Chocolatey - for Windows
- APT - as used by some Linux distros including Ubuntu, Debian, and Fedora.
- Yum - a package manager used by some Linux distros including Red Hat Enterprise Linux, Fedora, CentOS.
Samples for all of the preview features can be found in samples.
$ pip install azure-batch-extensions
CLI Extensions Installation
This extension package can be installed to supplement the existing Azure CLI Batch commands. It can be installed using the CLI extension tools (recommended):
$ az extension add -n azure-batch-cli-extensions
Each release of the CLI ships with a specific version of the azure-batch-cli-extensions. This is considered the official version for the CLI release. If you would like to install a different version you can specify any release listed at https://github.com/Azure/azure-batch-cli-extensions/releases/. To add a specific extension version and pin to it:
$ az extension add --source https://github.com/Azure/azure-batch-cli-extensions/releases/download/azure-batch-cli-extensions-x.x.x/azure_batch_cli_extensions-x.x.x-py2.py3-none-any.whl
Uninstall CLI extensions
The CLI extensions can be removed using the az extension remove command:
$ az extension remove -n azure-batch-cli-extensions
Azure Batch account requirements
In order to make use of the new features previewed here, you will need an Azure Batch account with a linked storage account. For more information on this, see Create an Azure Batch account using the Azure Portal.
Preparing your machine
- Install Python 3.5.x from http://python.org. Please note that the version of Python that comes preinstalled on OSX is 2.7.
- Clone your repository and check out the master branch.
- Create a new virtual environment “env” for Python 3.5 in the root of your clone. You can do this by running:
Windowspython -m venv <clone root>\env
OSX/Ubuntu (bash)python –m venv <clone root>/env
- Activate the env virtual environment by running:
OSX/Ubuntu (bash). <clone root>/env/bin/activate
- Install the dependencies and load the command module as a local package using pip.
SDK Release History
- Update to match latest Python SDK taking associated breaking changes.
- Add support in template parsing to support ARM object syntax.
- Align to Python SDK for breaking changes to shared models
- Fix bug in blobSource conversion to httpUrl
- Fix bug where specifying a mergeTask in a template would cause task add failures.
- Fix bug where blobSource was no longer an attribute of ExtendedResourceFile
- Improve test coverage
- Fix bug where apiVersion became required
- Fix bug where knack.get_logger was used instead of logging.getLogger
- Align to Python SDK for breaking changes to shared models
- This also includes collapsing all models into one models file. Models should now be imported from the models namespace and not from their individual files.
- Move ExtendedTaskOperation feature to standard Azure Batch SDK
- Clean up code to meet Python standards
- Breaking Model signatures are now using only keywords-arguments syntax. Each positional argument must be rewritten as a keyword argument.
- Fix bug related to mis-configured endpoints for storage operations.
- Enable using cloud shell AAD token for extension SDK
- Fix bug on using default thread count to submit tasks on the machine with odd number CPU cores
- Align to Python SDK for shared models
- Update add_collection function of ExtendedTaskOperations to retry failed requests due to server errors.
- Update add_collection function of ExtendedTaskOperations to track failed requests due to client errors and raise a CreateTasksErrorException if any occured.
- Elements of input template/json can be case insensitive.
- Escape in parameter json file doesn’t need double escape.
- The callback of file operations include file name.
- Rename the namespace to azext.batch
- Update add_collection function of ExtendedTaskOperations to handle RequestBodyTooLarge error for well behaved tasks.
- Update add_collection function of ExtendedTaskOperations to enable degrees of parallelism.
- Using azure-storage-blob as dependency
- Expand template only accept JSON dictionary object
- Minor bugs fix
- Better support for unicode in Python 2.7
- Support for Batch SDK version 4.0
- Added support for extended common_resource_files in MultiInstanceSettings
- Added support for native containers in tasks (including RepeatTask in a task factory)
- Support for Batch SDK version 3.1
- Fix bug with pool OS version detection
- Download from file group now supports prefix
- Support detection of Linux command using /bin/sh
- Fix to support azure-cli-core v2.0.11
- Initial preview release.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size azure_batch_extensions-7.0.0-py2.py3-none-any.whl (84.1 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View hashes|
|Filename, size azure-batch-extensions-7.0.0.tar.gz (71.4 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for azure_batch_extensions-7.0.0-py2.py3-none-any.whl
Hashes for azure-batch-extensions-7.0.0.tar.gz