×

nf-nomad @ 0.5.0

Provider: nextflow-io
Claimed: 05 Sep 2025 07:05:53 (UTC)
Description: The nf-nomad plugin enables Nextflow pipelines to submit and manage workflow tasks on HashiCorp Nomad clusters, allowing users to leverage Nomad's orchestration capabilities for distributed bioinformatics and data processing workloads. It solves the problem of integrating Nextflow with Nomad infrastructure by providing a custom executor with support for advanced features like resource constraints, datacenter targeting, and failure handling. This plugin is used by data scientists and bioinformaticians who want to run Nextflow pipelines on existing Nomad clusters.
Latest version: 0.5.0
Total downloads: 7.3K View trends

Summary

This plugin implements a Nextflow executor for Hashicorp Nomad, enabling Nextflow pipelines to submit and manage tasks on Nomad clusters.

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, follow these 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:

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

Unit testing

Run the following command in the project root directory:

./gradlew check

Test environment selection

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

Basic process configuration with custom datacenters and resources

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'
      ]
    ]
  }
}

Advanced 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]]]
    ]
  }
}

CPU mode configuration for cluster sizing

Configure CPU mode to control task concurrency on your cluster:

nomad {
    jobs {
        cpuMode = 'cpu'     // oversubscribe; default is 'cores'
    }
}

executor {
    queueSize = 12          // e.g. one 48-core node, cpus = 4, cpuMode = 'cores'
}

Placement failure handling

Enable explicit error reporting for unplaceable tasks:

nomad {
    jobs {
        failOnPlacementFailure = true
        placementFailureTimeout = '30m'
    }
}

License

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

Nextflow version >=26.10.5
Depends On -
Release Date 08 Nov 2026 17:15:29 (UTC)
Release Notes https://github.com/nextflow-io/nf-nomad/releases/tag/0.5.0
Download URL https://registry.nextflow.io/api/v1/plugins/nf-nomad/0.5.0/download/nf-nomad-0.5.0.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-nomad/blobs/sha256:28f718f0911980e16c1f30f6d16e3fbb0416270fd6413e880cbde21480979efc
Size 4.6 MB
Checksum c651d3a30ef3794e97974a044b1456afd3218796758ba9b756fcc426542bf2291cb5e95d95958ae21a367dc9b83c21d868b34dfcc7b7bb5a9f2c39a7dcfb0fd6
Total downloads 1 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.5.0 >=26.10.5 08 Nov 2026 17:15:29 (UTC) 1
0.5.0-edge7 >=26.04.3 04 Sep 2026 18:31:57 (UTC) 35
0.5.0-edge6 >=26.04.3 31 Aug 2026 12:54:29 (UTC) 18
0.5.0-edge5 >=26.04.3 30 Aug 2026 10:30:00 (UTC) 23
0.5.0-edge4 >=26.04.3 28 Aug 2026 05:26:05 (UTC) 42
0.5.0-edge3 >=26.04.3 03 Aug 2026 15:14:20 (UTC) 14
0.4.4 >=26.04.3 30 Jun 2026 19:58:39 (UTC) 201
0.5.0-edge2 >=26.04.3 30 Jun 2026 12:01:45 (UTC) 5
0.4.3 >=26.04.3 30 Jun 2026 11:03:49 (UTC) 6
0.4.2 >=26.04.3 30 Jun 2026 10:19:54 (UTC) 4
0.4.1 >=25.10.4 17 Jun 2026 08:43:43 (UTC) 797
0.5.0-edge1 >=26.04.3 07 Jun 2026 10:40:59 (UTC) 9
0.4.0 >=25.10.4 06 Jun 2026 06:42:08 (UTC) 206
0.4.0-edge8 >=25.10.4 04 Jun 2026 06:43:24 (UTC) 37
0.4.0-edge7 >=25.10.4