Configuration
Most of the basic configuration is in a nomad closure in the nextflow.config file
i.e.
nomad{
client{
address = "http://localhost:4646"
token = "YOUR_NOMAD_TOKEN"
connectionTimeout = 6000
readTimeout = 6000
writeTimeout = 6000
retryConfig = {
delay = 500
maxDelay = 90
maxAttempts = 10
jitter = 0.25
}
}
jobs{
namespace = 'nf-nomad'
deleteOnCompletion = false
privileged = true
volumes = [
{ type "host" name "scratchdir" },
{ type "csi" name "nextflow-fs-volume" },
{ type "csi" name "nextflow-fs-volume" path "/var/data" readOnly true}
]
constraints = {
node {
unique = [ name: 'nomad01' ]
}
}
spreads = {
spread = [ name:'node.datacenter', weight: 50 ]
}
secrets = [enabled: true]
// Fail jobs that cannot be placed due to insufficient resources
failOnPlacementFailure = true
placementFailureTimeout = '2m' // Wait 2 minutes before failing
}
}
Client configuration
-
address: The URL for the nomad server node. -
token: If the cluster is protected you must to provide a token. -
connectionTimeout: The maximum time to wait before giving up on establishing a connection with the cluster (default6000ms). -
readTimeout: The maximum time to wait before indicating inability to read from the connection (default6000ms). -
writeTimeout: The maximum time to wait before indicating inability to write to the connection (default6000ms). -
retryConfig.delay: Delay when retrying failed API requests (default: 500ms). -
retryConfig.jitter: Jitter value when retrying failed API requests (default: 0.25) -
retryConfig.maxAttempts: Max attempts when retrying failed API requests (default: 10) -
retryConfig.maxDelay: Max delay when retrying failed API requests (default: 90s)
Jobs configuration
-
deleteOnCompletion: A boolean indicating if the job will be removed once completed -
datacenters: A list of datacenters for the job submission. -
region: The region for job submission. -
namespace: The namespace to be used for all Nextflow jobs. -
privileged: Run Docker tasks in privileged mode (defaulttrue). -
volumeSpec: The volumes which should be accessible to the jobs. -
affinitiesSpec: The affinities which should be attached to the job spec. -
constraintsSpec: The constraints which should be attached to the job spec. -
spreadsSpec: The spreads spec which should be used with all generated jobs. -
rescheduleAttempts: Number of rescheduling (to a different node) attempts for the generated jobs. -
restartAttempts: Number of restart (on the same node) attempts for the generated jobs. -
failOnPlacementFailure: A boolean flag to automatically fail jobs that cannot be placed on any node due to insufficient resources (defaultfalse). When enabled, jobs that remain unscheduled (have no node assignment) beyond theplacementFailureTimeoutthreshold will be marked as failed instead of indefinitely waiting. -
placementFailureTimeout: The time to wait before considering a job as failed due to placement failure (default60s). Supports Nextflow duration format:20s,2m,5m,1h,2d, etc. Can also be set via theNF_NOMAD_PLACEMENT_FAILURE_TIMEOUTenvironment variable. -
secretOpts: The configuration for Nomad Secret Store. -
dockerVolume, DEPRECATED -
affinitySpec, DEPRECATED -
constraintSpec, DEPRECATED