×

nf-nomad @ 0.5.0-edge2

Provider: nextflow-io
Claimed: 05 Sep 2025 07:05:53 (UTC)
Description: This plugin integrates Nextflow with HashiCorp Nomad, enabling bioinformatic workflows and distributed computing tasks to execute on Nomad clusters without shared filesystems through distributed workdir support and granular process-level job configuration. It solves the problem of orchestrating complex pipelines across heterogeneous Nomad infrastructure for organizations using Nomad for resource management. Teams running Nextflow pipelines on Nomad clusters would use this plugin to gain native Nomad job scheduling, custom naming, and comprehensive lifecycle management capabilities.
Latest version: 0.5.0-edge2
Total downloads: 6.5K View trends

Summary

This plugin implements a Nextflow executor for Hashicorp Nomad, enabling Nextflow pipelines to submit and manage tasks on Nomad clusters. It supports distributed workdirs via SPI for clusters without shared filesystems, custom job naming, process-level Nomad options, and comprehensive task lifecycle management.

Get Started

To use this plugin in your Nextflow pipeline, add the following to your nextflow.config file:

plugins {
    id 'nf-nomad'
}

process {
    executor = 'nomad'
}

nomad {
    client {
        address = 'http://your-nomad-server:4646'
    }
}

Testing and Debugging

To run and test the plugin in a development environment, configure a local Nextflow build with the following steps:

  1. Clone the Nextflow repository in your computer into a sibling directory:

    git clone --depth 1 https://github.com/nextflow-io/nextflow _resources/nextflow
    
  2. Generate the nextflow class path

    cd _resources/nextflow && ./gradlew exportClasspath
    
  3. Compile the plugin alongside the Nextflow code:

    cd ../../ && ./gradlew compileGroovy
    
  4. Run Nextflow with the plugin, using ./launch.sh as a drop-in replacement for the nextflow command, and adding the option -plugins nf-nomad to load the plugin:

    ./launch.sh run main.nf -plugins nf-nomad
    

Unit Testing

Run the following command in the project root directory (ie. where the file settings.gradle is located):

./gradlew check

The Gradle test task supports selecting the target environment with -PtestEnv:

  • ./gradlew test → unit tests only
  • ./gradlew test -PtestEnv=mock → unit + mock tests
  • ./gradlew test -PtestEnv=local → unit + local Nomad integration tests
  • ./gradlew test -PtestEnv=oci → unit + OCI Nomad integration tests

For local integration tests, the default Nomad address is http://localhost:4646. If you need a different endpoint, override explicitly:

./gradlew test -PtestEnv=local -PnomadAddr=http://<host>:4646

Examples

The following example demonstrates how to configure a Nextflow pipeline to target a specific process to run on Nomad with customized datacenters and resource limits:

// nextflow.config
plugins {
  id 'nf-nomad'
}

process {
  executor = 'nomad'
  
  withName: runAlignment {
    nomadOptions = [
      datacenters: ['dc-analytics'],
      priority: 'high',
      resources: [
        cores: 8,
        memoryMax: '32 GB'
      ]
    ]
  }
}

Process-level Nomad Options

Process directives support both legacy keys and the preferred map-based nomadOptions directive:

process {
  withName: sayHello {
    nomadOptions = [
      datacenters: ['dc1', 'dc2'],
      namespace: 'bio',
      constraints: { node { unique = [name: params.RUN_IN_NODE] } },
      affinity: [attribute: '${meta.workload}', operator: '=', value: 'batch', weight: 25],
      meta: [owner: 'team-x', step: 'align'],
      shutdownDelay: '15s',
      failures: [
        restart: [attempts: 1, delay: '5s', mode: 'fail'],
        reschedule: [attempts: 2, delay: '10s']
      ],
      volumes: [[type: 'host', name: 'ref-data', path: '/ref', readOnly: true]],
      secretsPath: 'secret/projects/team-x',
      secrets: ['MY_ACCESS_KEY', 'MY_SECRET_KEY'],
      spread: [name: 'node.datacenter', weight: 50, targets: ['us-east1': 70, 'us-east2': 30]],
      priority: 'high',
      resources: [memoryMax: '64 GB', cores: 4, device: [[name: 'nvidia/gpu', count: 1]]]
    ]
  }
}

Distributed Workdir via SPI

nf-nomad ships a DistributedWorkdirProvider SPI for clusters without a shared filesystem between head node and workers. The nf-nomad-s5cmd provider plugin offers S3-backed work-dir via s5cmd. Activate with:

nomad {
  s5cmd.enabled = true
  s5cmd.workDir.enabled = true
  s5cmd.workDir.bucket = 's3://…'
}

Custom Nomad Job Naming

If you wish to customize the Nomad job-id naming, set NF_NOMAD_RUN_TAG in the environment:

export NF_NOMAD_RUN_TAG=my-run

Runtime Security and Resource Configuration

Nomad Docker jobs are not privileged by default. To opt in:

nomad {
  jobs {
    privileged = true
  }
}

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Nextflow version >=26.04.3
Depends On -
Release Date 30 Jun 2026 12:01:45 (UTC)
Release Notes https://github.com/nextflow-io/nf-nomad/releases/tag/0.5.0-edge2
Download URL https://registry.nextflow.io/api/v1/plugins/nf-nomad/0.5.0-edge2/download/nf-nomad-0.5.0-edge2.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-nomad/blobs/sha256:d8cbfe77f0877cd54fd62378a575183b9bbc879279a2c1afa4ddadcf8302aeac
Size 4.6 MB
Checksum 7e11f70c03427534b1ee69117970b7852b00bc91c26479d118659dc57a76b70b854fd09fe6e91cf2bae6db240a7f7bee0404e554d0b4b9049a26c38b6140282d
Total downloads 0 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.5.0-edge2 >=26.04.3 30 Jun 2026 12:01:45 (UTC) 0
0.4.3 >=26.04.3 30 Jun 2026 11:03:49 (UTC) 0
0.4.2 >=26.04.3 30 Jun 2026 10:19:54 (UTC) 0
0.4.1 >=25.10.4 17 Jun 2026 08:43:43 (UTC) 355
0.5.0-edge1 >=26.04.3 07 Jun 2026 10:40:59 (UTC) 5
0.4.0 >=25.10.4 06 Jun 2026 06:42:08 (UTC) 202
0.4.0-edge8 >=25.10.4 04 Jun 2026 06:43:24 (UTC) 34
0.4.0-edge7 >=25.10.4 26 May 2026 09:52:03 (UTC) 103
0.4.0-edge6 >=25.10.4 25 May 2026 16:58:35 (UTC) 2
0.4.0-edge5 >=25.10.0 21 May 2026 14:13:53 (UTC) 24
0.4.0-edge4 >=25.10.0 11 May 2026 13:00:53 (UTC) 10
0.4.0-edge3 >=25.10.0 17 Mar 2026 15:44:41 (UTC) 4.5K
0.4.0-edge2 >=25.10.0 25 Oct 2025 17:01:39 (UTC) 53
0.4.0-edge1 >=24.10.4 12 Sep 2025 10:23:30 (UTC)