Nomad

From ArchWiki
Jump to navigation Jump to search

Nomad is a workload orchestrator to deploy and manage containers and non-containerized applications.

Installation

Install the nomad package.

Known issues

NVIDIA not supported

NVIDIA support has been disabled due to there being no way to disable a non-existent driver being loaded. When compiled with NVIDIA support, the instance immediately crashes with the following error:

/usr/bin/nomad: undefined symbol: nvmlDeviceGetGraphicsRunningProcesses

The NVIDIA driver plugin will be externalised, see GitHub issue #8330.

Default plugin directory

The default plugin directory /var/lib/nomad/plugins has been changed to /usr/lib/nomad/plugins to reflect FHS.

Configuration

Nomad loads all configuration files in the /etc/nomad.d directory on startup.

See https://learn.hashicorp.com/tutorials/nomad/security-enable-tls to set up TLS encryption with Nomad.

Server

Create a configuration file at /etc/nomad.d/server.hcl:

Note: Replace the bootstrap_expect value with the number of Nomad servers you are deploying; three or five is recommended.
/etc/nomad.d/server.hcl
server {
  enabled = true
  bootstrap_expect = 3
}

Client

Create a configuration file at /etc/nomad.d/client.hcl:

/etc/nomad.d/client.hcl
client {
  enabled = true
}

Task drivers

Task drivers are used by Nomad clients to execute a task and provide resource isolation.

Nomad ships with support for the following task drivers out of the box:

containerd

Note: More configuration parameters can be found in upstream documentation.
/etc/nomad.d/containerd.hcl
plugin "containerd-driver" {
  config {
    # Arch Linux uses cgroups v2 by default
    # For cgroups v1, use "io.containerd.runc.v1"
    containerd_runtime = "io.containerd.runc.v2"
  }
}

See also