Nomad - ArchWiki

Jump to content
From ArchWiki

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:

- Docker (requires docker)
- Java (requires jre-openjdk or jre-openjdk-headless)
- QEMU (requires qemu-desktop)
- `exec` & `raw_exec`

#### containerd

In order to use the containerd driver, Install the nomad-driver-containerd package.

Enable the plugin in the client configuration, then Reload `nomad.service`.

    /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"
      }
    }

Note: More configuration parameters can be found in upstream documentation.

#### podman

In order to user the podman driver, Install the nomad-driver-podman.

Nomad requires `podman.service` to be started.

Note: `podman.service` can also be started as a user systemd unit.

Enable the driver in the client configuration, then reload `nomad.service`.

    /etc/nomad.d/podman.hcl

    plugin "nomad-driver-podman" {
      config {
        # Archlinux socket path for podman differs from the default value of socket_path (unix://run/podman/io.podman)
        socket_path = "unix://run/podman/podman.sock"
        # In case podman.service was started as user
        socket_path = "unix://run/user/USER_UID/podman/podman.sock"
      }
    }

Note: More configuration parameters can be found in upstream documentation.

## See also

- Official documentation
- External task driver documentation

Category:

- Virtualization