Package: azure-batch-extensions
Microsoft Azure Batch ExtensionsThis 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 theofficial 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.FeaturesInput data upload to Batch linked storage accountsA 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 references using linked storage accountsInput data stored in linked storage under a file group can be simply referenced by a task by using some new ResourceFile properties.Automatic persistence of task output files to a file groupWhen declaring task output files, you can now persist outputs to a named file group, without the need to generate a container SAS URL.Download job outputs from directly from storageA 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.Pool and job templates with parameterizationTemplates allow pools and jobs to be defined in parameterized json files with a format inspired by ARM templates.Task factories for automatic task generation on job submissionTask factories provide a way for a job and all its tasks to be created in one command instead
of callingazure batch task createfor each task. There are currently three kinds of task factory:Task Collection- tasks are explicitly defined as a part of the jobParametric Sweep- a set of tasks are created by substituting a range or sequence of values into a templatePer File- a template task is replicated for each available input fileSplit job configuration and management with reusable application templatesApplication 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 theapplication 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.Easy software installation via package managersIntegration with existing 3rd party package managers to streamline the installation of applications. Currently the following package managers are supported:Chocolatey - for WindowsAPT - 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.SamplesSamples for all of the preview features can befound in samples.SDK Installation$pipinstallazure-batch-extensionsCLI Extensions InstallationIn order to make use of these features, you must have the Azure CLI installed.
You can find futher instructions inthe official documentationand in theAzure CLI GitHub repository.This extension package can be installed to supplement the existing Azure CLI Batch commands.
It can be installed using the CLI extension tools (recommended):$azextensionadd-nazure-batch-cli-extensionsEach 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 athttps://github.com/Azure/azure-batch-cli-extensions/releases/.
To add a specific extension version and pin to it:$azextensionadd--sourcehttps://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.whlUninstall CLI extensionsThe CLI extensions can be removed using theaz extension removecommand:$azextensionremove-nazure-batch-cli-extensionsAzure Batch account requirementsIn 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, seeCreate an Azure Batch account using the Azure Portal.ContributingThis project has adopted theMicrosoft Open Source Code of Conduct. For more information see theCode of Conduct FAQor contactopencode@microsoft.comwith any additional questions or comments.Developer InstallationPreparing your machineInstall Python 3.5.x fromhttp://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-mvenv<cloneroot>\envOSX/Ubuntu (bash)python–mvenv<cloneroot>/envActivate the env virtual environment by running:Windows<cloneroot>\env\scripts\activate.batOSX/Ubuntu (bash).<cloneroot>/env/bin/activateInstall the dependencies and load the command module as a local package using pip.pythonscripts/dev_setup.pySDK Release History9.0.0 (2022-08-30)Update to match latest Python SDK taking associated breaking changes.8.0.0 (2020-06-15)Update to match latest Python SDK taking associated breaking changes.7.0.0 (2019-08-20)Update to match latest Python SDK taking associated breaking changes.Add support in template parsing to support ARM object syntax.6.0.1 (2019-06-20)Align to Python SDK for breaking changes to shared models5.0.5 (2019-02-25)Fix bug in blobSource conversion to httpUrl5.0.4 (2019-02-25)Fix bug where specifying a mergeTask in a template would cause task add failures.5.0.3 (2019-02-19)Fix bug where blobSource was no longer an attribute of ExtendedResourceFileImprove test coverage5.0.2 (2019-02-15)Fix bug where apiVersion became required5.0.1 (2019-02-15)Fix bug where knack.get_logger was used instead of logging.getLogger5.0.0 (2019-02-01)Align to Python SDK for breaking changes to shared modelsThis also includes collapsing all models into one models file. Models should now be imported from the models namespace and not from their individual files.4.0.2 (2018-10-06)MoveExtendedTaskOperationfeature to standard Azure Batch SDK4.0.1 (2018-10-04)Clean up code to meet Python standards4.0.0 (2018-08-29)BreakingModel signatures are now using only keywords-arguments syntax. Each positional argument must be rewritten as a keyword argument.3.1.2 (2018-08-22)Fix bug related to mis-configured endpoints for storage operations.3.1.1 (2018-7-19)Enable using cloud shell AAD token for extension SDKFix bug on using default thread count to submit tasks on the machine with odd number CPU cores3.1.0 (2018-7-17)Align to Python SDK for shared models3.0.0 (2018-6-20)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.2.0.0 (2018-6-1)Rename the namespace to azext.batch1.1.2 (2018-5-21)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.1.1.1 (2018-4-10)Using azure-storage-blob as dependencyExpand template only accept JSON dictionary objectMinor bugs fix1.0.1 (2017-10-10)Better support for unicode in Python 2.71.0.0 (2017-10-03)Support for Batch SDK version 4.0Added support for extended common_resource_files in MultiInstanceSettingsAdded support for native containers in tasks (including RepeatTask in a task factory)0.2.0 (2017-07-29)Support for Batch SDK version 3.1Fix bug with pool OS version detectionDownload from file group now supports prefixSupport detection of Linux command using /bin/sh0.1.1 (2017-07-10)Fix to support azure-cli-core v2.0.110.1.0 (2017-06-28)Initial preview release.