Skip to content

Instantly share code, notes, and snippets.

@angrycub
Created April 26, 2021 16:39
Show Gist options
  • Select an option

  • Save angrycub/3a19f5fa18de8e0b4b40a24bbd462bd7 to your computer and use it in GitHub Desktop.

Select an option

Save angrycub/3a19f5fa18de8e0b4b40a24bbd462bd7 to your computer and use it in GitHub Desktop.
Single Node Nomad Configuration

Single Node Nomad Configuration

This is a complex and unsupported configuration

Nomad is designed to be a highly-available, quorum-based cluster scheduler. Nomad deployments need to have three or more server nodes and one or more client nodes.

That said, Nomad does provide a dev mode which enables you to run Nomad with a single agent process. However, Nomad dev agents do behave slightly different than non-dev agents. To create a more authentic feeling experience, you might want to run Nomad with a configuration that runs both the client and server processes.

This configuration will enable you to run a single-node Nomad "cluster".

Running Nomad in this configuration comes with several tradeoffs and caveats, for example

  • The node has zero high availability -- the main drive for a scheduler.
  • If the state is damaged, you will have to wipe it and start over.
  • If your IP address changes, you have to perform peers.json recovery or wipe the state.
  • You can't run more than one instance of a workload that uses static ports.

If you are still determined to run Nomad this way, here are some annotated configuration files. Typically, I put them in /etc/nomad.d and start Nomad with nomad agent -config=/etc/nomad.d

@bobhenkel

Copy link
Copy Markdown

Do you have the annotated configuration files somewhere? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment