Update nf-azure: Add Azure Compute Gallery image and verification options - #7338
Update nf-azure: Add Azure Compute Gallery image and verification options#7338LennyBEL wants to merge 22 commits into
Conversation
Add support for provisioning Azure Batch pool nodes from a custom VM
image in an Azure Compute Gallery via the new
'azure.batch.pools.<name>.virtualMachineImageId' option, and add the
'azure.batch.pools.<name>.verification' option to choose the image
verification type ('verified', 'unverified' or 'any').
Signed-off-by: Lenny Van de Winkel <vdwlenny@outlook.be>
✅ Deploy Preview for nextflow-docs canceled.
|
Signed-off-by: Lenny <vdwlenny@outlook.be>
adamrtalbot
left a comment
There was a problem hiding this comment.
This would also help when Azure deprecates a Batch image without a replacement image lined up. It would improve the supply chain security of our Azure users. So worth it overall.
There was a problem hiding this comment.
(Claude review here, but raised some good points)
Focused, sensible change — the verification == null = "any" handling in getImage, the gallery/marketplace branch in poolVmConfig, and the verified default all look correct. A few points below, most-important first.
Cache-key note (whole-PR): the pool funnel now hashes verification, which was a field but was previously not hashed. On upgrade every existing auto-pool id changes (hence the test hash change 42f3635f…→7483c5b1…), so existing pools won't be reused and will idle out. Worth calling out in the description — "Expected Impact: None" isn't quite accurate for users relying on pool reuse across the upgrade.
christopher-hakkaart
left a comment
There was a problem hiding this comment.
I've added some editorial suggestions. I'll defer to Adam for the exact location of the more advanced content.
|
@adamrtalbot Would you like me to incorporate your suggested changes, or leave it as-is? You approved the PR so I'm a bit confused ;) |
Oh, sorry. I think this works fine which is why I approved, but I think I'm not a codeowner (not a Nextflow developer), so we need someone with higher powers to approve.
|
…eReference to comply with SDK changes in beta.6
…s' boolean. Move to advanced features in documentation
Signed-off-by: Lenny Van de Winkel <vdwlenny@outlook.be>
…s compatibility with existing pools pre-upgrade Signed-off-by: Lenny Van de Winkel <vdwlenny@outlook.be>
Signed-off-by: Lenny Van de Winkel <vdwlenny@outlook.be>
…geId is set Signed-off-by: Lenny Van de Winkel <vdwlenny@outlook.be>
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Lenny <vdwlenny@outlook.be>
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Lenny <vdwlenny@outlook.be>
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Lenny <vdwlenny@outlook.be>
Signed-off-by: Lenny Van de Winkel <vdwlenny@outlook.be>
…ow into nf-azure-compute-gallery Merge
Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Signed-off-by: Lenny <vdwlenny@outlook.be>
adamrtalbot
left a comment
There was a problem hiding this comment.
Nice, this looks really good.
Just minor docs and comments to add.
Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Signed-off-by: Lenny <vdwlenny@outlook.be>
…ts.groovy Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Signed-off-by: Lenny <vdwlenny@outlook.be>
Split from #7321
Overview
Azure Compute Gallery
Last year we had a major outage when an update to the Microsoft Marketplace Ubuntu 22.04 HPC image flipped its verification state to
unverified. Because Nextflow only targetsverifiedimages, new pools could no longer be created. Our pipeline tooling did not support Ubuntu 24.04 yet, so we had to scramble to restore service.In order to avoid such an event again, Microsoft suggested that we switch to Azure Compute Gallery images. Within Azure Compute Gallery, we have full control over the images. However, Nextflow did not support the usage of them yet.
A new option
virtualMachineImageIdhas been introduced to support usage of the Azure Compute Gallery.Image verification state
For non-production and testing purposes we occasionally need to use unverified Marketplace images, but Nextflow always forced
verified.This PR adds
azure.batch.pools.<name>.verificationwith valuesverified(default),unverified, orany- whereanyignores the verification state entirely. This setting is ignored whenvirtualMachineImageIdis set.Note: Windows support was left out compared to the original PR. OsType is no longer configurable and remains fixed on Linux.
Expected Impact
None, as the default behavior does not change at all.
We have been running these changes as a custom
nf-azurefork (based on the upstream plugin) in production for a while, so we are confident they behave as intended.Tests
Unit tests added/updated in
nf-azure:AzPoolOptsTestvirtualMachineImageId+sku).verification(verified/unverified/any, case-insensitive), with an error on invalid values.funnel) sensitivity: the pool hash changes when the image config changes.AzBatchServiceTestDocs updated:
docs/azure.mdxanddocs/reference/config.mdx.