liveBook · Manning

Nomad CLI

As explained in Road to Kubernetes

The Nomad CLI is a command-line interface for scheduling jobs, managing tasks, and monitoring Nomad.

Nomad CLI helps configure and operate Nomad deployments. A first server setup defines storage, network addresses, server identity, and whether the instance also runs clients. section 9.2.3

A practical server setup proceeds by:

  • Creating /opt/nomad/data for cluster state. section 9.2.3
  • Writing /etc/nomad.d/nomad.hcl with HCL blocks, lists, and key-value pairs. section 9.2.3
  • Starting Nomad as a systemd service or with nomad agent in the foreground. section 9.2.3
Listing 9.6 Nomad server configuration
# Located at /etc/nomad.d/nomad.hcl
data_dir = "/opt/nomad/data"

bind_addr = "0.0.0.0"

name = "nomad-server-1"

advertise {
    http = "192.168.204.96"
    rpc = "192.168.204.96"
    serf = "192.168.204.96"
}

server {
    enabled = true
    bootstrap_expect = 1 # number of servers
}

client {
    enabled = false
}

Use the server configuration listing as a concrete template for a single Nomad server. section 9.2.3

How Road to Kubernetes covers it

How deep it goes
Walks through HCL creation, directory setup, networking declarations, server settings, and two startup methods.
Examples
Uses /etc/nomad.d/nomad.hcl, a private IP address, nomad agent, server-members output, and the Nomad user interface.
What you can do after
Operate/configure a single Nomad server with HCL and start it through systemctl or nomad agent.
How it connects
Connects HCL configuration with Nomad servers, Nomad clients, and the Kubernetes CLI.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.