Skip to content

Commit c384b9d

Browse files
adamrtalbotchristopher-hakkaartpditommaso
authored
Document Azure environment variables (#6084) [ci skip]
Signed-off-by: adamrtalbot <[email protected]> Signed-off-by: Adam Talbot <[email protected]> Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Chris Hakkaart <[email protected]> Co-authored-by: Paolo Di Tommaso <[email protected]>
1 parent 83b2c29 commit c384b9d

File tree

2 files changed

+49
-7
lines changed

2 files changed

+49
-7
lines changed

docs/azure.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ The value of `sasToken` is the token stripped by the character `?` from the begi
3434

3535
Once the Blob Storage credentials are set, you can access the files in the blob container like local files by prepending the file path with `az://` followed by the container name. For example, a blob container named `my-data` with a file named `foo.txt` can be specified in your Nextflow script as `az://my-data/foo.txt`.
3636

37+
:::{tip}
38+
Nextflow will use the following environment variables if storage settings are not provided in the Nextflow config file:
39+
40+
- `AZURE_STORAGE_ACCOUNT_NAME`: The name of your Azure Storage account.
41+
- `AZURE_STORAGE_ACCOUNT_KEY`: The access key for your Azure Storage account.
42+
- `AZURE_STORAGE_SAS_TOKEN`: A shared access signature (SAS) token for Azure Storage access.
43+
:::
44+
3745
## Azure File Shares
3846

3947
*New in `nf-azure` version `0.11.0`*
@@ -155,6 +163,13 @@ Replacing `<PIPELINE NAME>` with a pipeline name e.g. `nextflow-io/rnaseq-nf` an
155163

156164
See the [Batch documentation](https://docs.microsoft.com/en-us/azure/batch/quick-create-portal) for further details about the configuration for Azure Batch.
157165

166+
:::{tip}
167+
Nextflow will use the following environment variables if the Batch settings are not provided in the Nextflow config file:
168+
169+
- `AZURE_BATCH_ACCOUNT_NAME`: The name of your Azure Batch account.
170+
- `AZURE_BATCH_ACCOUNT_KEY`: The access key for your Azure Batch account.
171+
:::
172+
158173
### Autopools
159174

160175
When using the `autoPoolMode` option, Nextflow automatically creates a `pool` of compute nodes appropriate for your pipeline.
@@ -387,6 +402,13 @@ The private registry is an addition, not a replacement, to the existing configur
387402
When using containers hosted in a private registry, the registry name must also be provided in the container name specified via the {ref}`container <process-container>` directive using the format: `[server]/[your-organization]/[your-image]:[tag]`. Read more about fully qualified image names in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/pull/#pull-from-a-different-registry).
388403
:::
389404

405+
:::{tip}
406+
Nextflow will use the following environment variables if the registry credentials are not provided in the Nextflow config file:
407+
408+
- `AZURE_REGISTRY_USER_NAME`: The username for Azure Container Registry authentication
409+
- `AZURE_REGISTRY_PASSWORD`: The password for Azure Container Registry authentication
410+
:::
411+
390412
### Virtual Network
391413

392414
:::{versionadded} 23.03.0-edge
@@ -526,6 +548,12 @@ azure {
526548
}
527549
```
528550

551+
:::{note}
552+
Nextflow will use the following environment variable if the managed identity setting is not provided in the Nextflow config file:
553+
554+
- `AZURE_MANAGED_IDENTITY_SYSTEM`: When set to `true`, enables system-assigned managed identity.
555+
:::
556+
529557
#### User Assigned Managed Identity
530558

531559
A system-assigned managed identity is essentially 'anonymous' and is tied to a single resource. By comparison, a user-assigned managed identity is created by the user and can be assigned to multiple resources, furthermore the lifecycle of a user-assigned managed identity is not tied to the resource. See [the Azure Documentation](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/managed-identity-best-practice-recommendations#choosing-system-or-user-assigned-managed-identities) for further details.
@@ -556,6 +584,12 @@ azure {
556584
}
557585
```
558586

587+
:::{note}
588+
Nextflow will use the following environment variable if the managed identity client ID is not provided in the Nextflow config file:
589+
590+
- `AZURE_MANAGED_IDENTITY_USER`: The client ID for a user-assigned managed identity.
591+
:::
592+
559593
(azure-service-principal)=
560594

561595
### Service Principals
@@ -586,6 +620,14 @@ azure {
586620
}
587621
```
588622

623+
:::{note}
624+
Nextflow will use the following environment variables if the service principal settings are not provided in the Nextflow config file:
625+
626+
- `AZURE_CLIENT_ID`: The service principal client ID (also known as application ID).
627+
- `AZURE_CLIENT_SECRET`: The service principal secret key.
628+
- `AZURE_TENANT_ID`: The Azure Active Directory tenant ID.
629+
:::
630+
589631
## Advanced configuration
590632

591633
Read the {ref}`Azure configuration<config-azure>` section to learn more about advanced configuration options.

docs/reference/config.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,13 @@ Read the {ref}`azure-page` page for more information.
294294
The following settings are available:
295295

296296
`azure.activeDirectory.servicePrincipalId`
297-
: The service principal client ID
297+
: The service principal client ID. Defaults to environment variable `AZURE_CLIENT_ID`.
298298

299299
`azure.activeDirectory.servicePrincipalSecret`
300-
: The service principal client secret
300+
: The service principal client secret. Defaults to environment variable `AZURE_CLIENT_SECRET`.
301301

302302
`azure.activeDirectory.tenantId`
303-
: The Azure tenant ID
303+
: The Azure tenant ID. Defaults to environment variable `AZURE_TENANT_ID`.
304304

305305
`azure.azcopy.blobTier`
306306
: The blob [access tier](https://learn.microsoft.com/en-us/azure/storage/blobs/access-tiers-overview) used by `azcopy` to upload files to Azure Blob Storage. Valid options are `None`, `Hot`, or `Cool` (default: `None`).
@@ -309,10 +309,10 @@ The following settings are available:
309309
: The block size (in MB) used by `azcopy` to transfer files between Azure Blob Storage and compute nodes (default: 4).
310310

311311
`azure.batch.accountName`
312-
: The batch service account name.
312+
: The batch service account name. Defaults to environment variable `AZURE_BATCH_ACCOUNT_NAME`.
313313

314314
`azure.batch.accountKey`
315-
: The batch service account key.
315+
: The batch service account key. Defaults to environment variable `AZURE_BATCH_ACCOUNT_KEY`.
316316

317317
`azure.batch.allowPoolCreation`
318318
: Enable the automatic creation of batch pools specified in the Nextflow configuration file (default: `false`).
@@ -415,10 +415,10 @@ The following settings are available:
415415
: Specify the virtual machine type used by the pool identified with `<name>`.
416416

417417
`azure.managedIdentity.clientId`
418-
: Specify the client ID for an Azure [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview). See {ref}`azure-managed-identities` for more details.
418+
: Specify the client ID for an Azure [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview). See {ref}`azure-managed-identities` for more details. Defaults to environment variable `AZURE_MANAGED_IDENTITY_USER`.
419419

420420
`azure.managedIdentity.system`
421-
: When `true`, use the system-assigned [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) to authenticate Azure resources. See {ref}`azure-managed-identities` for more details.
421+
: When `true`, uses the system-assigned [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) to authenticate Azure resources. See {ref}`azure-managed-identities` for more details. Defaults to environment variable `AZURE_MANAGED_IDENTITY_SYSTEM`.
422422

423423
`azure.registry.server`
424424
: Specify the container registry from which to pull the Docker images (default: `docker.io`).

0 commit comments

Comments
 (0)