Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs and changelog for nomad config validate #12031

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .changelog/9198.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
```release-note:improvement
cli: add Usage: nomad [-version] [-help] [-autocomplete-(un)install] <command> [args]
tgross marked this conversation as resolved.
Show resolved Hide resolved

Common commands:
run Run a new job or update an existing job
stop Stop a running job
status Display the status output for a resource
alloc Interact with allocations
job Interact with jobs
node Interact with nodes
agent Runs a Nomad agent

Other commands:
acl Interact with ACL policies and tokens
agent-info Display status information about the local agent
deployment Interact with deployments
eval Interact with evaluations
exec Execute commands in task
license Interact with Nomad Enterprise License
monitor Stream logs from a Nomad agent
namespace Interact with namespaces
operator Provides cluster-level tools for Nomad operators
plugin Inspect plugins
quota Interact with quotas
recommendation Interact with the Nomad recommendation endpoint
scaling Interact with the Nomad scaling endpoint
sentinel Interact with Sentinel policies
server Interact with servers
system Interact with the system API
ui Open the Nomad Web UI
version Prints the Nomad version
volume Interact with volumes command to check configuration files without an agent
```
21 changes: 21 additions & 0 deletions website/content/docs/commands/config/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout: docs
page_title: 'Commands: config'
description: |
The config command interacting with configurations.
---

# Command: config

The `config` command is used to interact with configurations.

## Usage

Usage: `nomad config <subcommand> [options]`

Run `nomad config <subcommand> -h` for help on that subcommand. The
following subcommands are available:

- [`config validate`][validate] - Validate configuration files

[gc]: /docs/commands/config/validate 'Validate configuration files'
tgross marked this conversation as resolved.
Show resolved Hide resolved
51 changes: 51 additions & 0 deletions website/content/docs/commands/config/validate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
layout: docs
page_title: 'Commands: config validate'
description: |
The config validate command is used to validate Nomad configuration files.
---

# Command: config validate

The `config validate` command performs validation on a set of Nomad
configuration files. This is useful to test the Nomad configuration
without starting the agent.

## Usage

```plaintext
nomad config validate <config_path> [<config_path...>]
```

The `config validate` command requires a path to either a single
configuration file or a directory of configuration files to use for
configuring the Nomad agent. This option can be specified multiple
times. If multiple config files are passed, the values from each will
be merged together. During merging, values from files found later in
the list are merged over values from previously parsed files.

This command cannot operate on partial configuration fragments since
those won't pass the full agent validation. This command does not
require an ACL token.

Returns 0 if the configuration is valid, or 1 if there are problems.

## General Options

@include 'general_options.mdx'

## Examples

Validate a configuration file:

```shell-session
$ nomad config validate ./nomad.hcl
Configuration is valid!
```

Validate a directory of configuration files:

```shell-session
$ nomad config validate /etc/nomad.d
Configuration is valid!
```
13 changes: 13 additions & 0 deletions website/data/docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,19 @@
}
]
},
{
"title": "config",
"routes": [
{
"title": "Overview",
"path": "commands/config"
},
{
"title": "validate",
"path": "commands/config/validate"
}
]
},
{
"title": "deployment",
"routes": [
Expand Down