Development

Firstly you need a nomad cluster. See https://developer.hashicorp.com/nomad/intro

In this setup, we have made the following assumptions

  • You want to create a minimal Nomad cluster for evaluation purposes

  • You have access to an AWS S3-compatible storage or GCP Storage

  • Your linux instance already has docker installed

Setup local nomad dev cluster with FusionFS

Here’s a sample Nomad client configuration. Please refer to the official installation and dev cluster instructions for customizing this for your own linux machine.

nomad.hcl
# Full configuration options can be found at https://www.nomadproject.io/docs/configuration

data_dir  = "/opt/nomad/data"
datacenter = "dc"

server {
  enabled          = true
  bootstrap_expect = 1
}

client {
  enabled = true

  options = {
    "driver.allowlist" = "docker,raw_exec"
  }

  host_volume "scratch" {
    path      = "/home/<USERNAME>/_nomad_volume_scratch"
    read_only = false
  }

}

acl {
  enabled = true
}


plugin "raw_exec" {
  config {
    enabled = true
  }
}


plugin "docker" {
  config {
    allow_privileged = true

    volumes {
      enabled      = true
    }
}
$ sudo nomad agent -dev \
  -bind 0.0.0.0 \
  -network-interface='{{ GetDefaultInterfaces | attr "name" }}'

$ export NOMAD_ADDR=http://localhost:4646

Build and use nf-nomad plugin

If you’d like to contribute to the plugin (yay!), please follow these instructions.

As of 08-MARCH-2024, we are using Java-19 for the gradle build tasks. We recommend that you setup your Java SDK accordingly.
  1. Clone the repository

$ git clone https://github.com/nextflow-io/nf-nomad.git
  1. Open the project in IntelliJ

  2. Make your changes to the plugin codebase

  3. Run the following gradle tasks on the command line from the project root (or via IntelliJ)

$ ./gradlew clean zipPlugin
  1. Install the locally built plugin to the $HOME/.nextflow/plugins folder

$ ./gradlew unzipPlugin