From a98ca003533902e7144911c270751e3b7f1c5fff Mon Sep 17 00:00:00 2001 From: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:56:46 +0100 Subject: [PATCH 1/6] Add hybrid workflow documentation for Azure Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com> --- docs/azure.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/azure.md b/docs/azure.md index c17c9926a6..3e8f2b0dc8 100644 --- a/docs/azure.md +++ b/docs/azure.md @@ -405,6 +405,47 @@ The value of the setting must be the identifier of a subnet available in the vir Batch Authentication with Shared Keys does not allow to link external resources (like Virtual Networks) to the pool. Therefore, Active Directory Authentication must be used in conjunction with the `virtualNetwork` setting. ::: +### Hybrid workloads + +Nextflow allows the use of multiple executors in the same workflow application. This feature enables the deployment of hybrid workloads in which some jobs are executed in the local computer or local computing cluster and some jobs are offloaded to Azure Batch. + +To enable this feature, use one or more {ref}`config-process-selectors` in your Nextflow configuration to apply the Azure Batch configuration to the subset of processes that you want to offload. For example: + +```groovy +process { + withLabel: bigTask { + executor = 'azurebatch' + queue = 'my-batch-pool' + container = 'my/image:tag' + } +} + +azure { + storage { + accountName = '' + accountKey = '' + } + batch { + location = '' + accountName = '' + accountKey = '' + } +} +``` + +With the above configuration, processes with the `bigTask` {ref}`process-label` will run on Azure Batch, while the remaining processes will run in the local computer. + +Then launch the pipeline with the `-bucket-dir` option to specify an Azure Blob Storage path for the jobs computed with Azure Batch and, optionally, the `-work-dir` to specify the local storage for the jobs computed locally: + +```bash +nextflow run