hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
14.78k stars 1.94k forks source link

Add docs about -dev flag for `nomad agent` CLI command #20323

Open GuyAtTheFront opened 5 months ago

GuyAtTheFront commented 5 months ago

Proposal

Add docs about -dev flag for nomad agent CLI command

Use-cases

It is unclear what -dev flag actually does:

It is common to start a POC by following Nomad Quick-Start guide, which recommends starting nomad with nomad agent -dev. However, it is difficult to know the exact steps required to move to the no--dev agent, since we have no information on what that does. In fact, I suspect (not tested) this flag is no longer necessary.

Attempted Solutions

NIL

tgross commented 5 months ago

Hi @GuyAtTheFront! You're right that there are some details missing from the -dev docs. There's a fairly large set of changes that the flag makes on top of the default configuration, as you can see from config.go#L1219-L1252. What I'll probably do is add a new section to that page describing the list of items.

In fact, I suspect (not tested) this flag is no longer necessary.

It never was! But the major thing that -dev mode does is ensures that the agent doesn't leave anything behind. For example, it creates the datadir inside of /tmp (or equivalent), and it stops workloads on exit instead of letting them persist. It also makes some choices around address binding that make local development and "messing around" easier that we wouldn't want to use for production. The "client + server in one agent" part of it is only a small portion.