Files
nomad/website/source/docs/commands/job/init.html.md
Charlie Voiselle 0ff7c64e20 cli: Allow user to specify dest filename for nomad init (#6520)
* Allow user to specify dest filename for nomad init
* Create changelog entry for GH-6520
2019-12-19 14:59:12 -05:00

1.1 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
docs Commands: job init docs-commands-job-init The job init command is used to generate a skeleton jobspec template.

Command: job init

Alias: nomad init

The job init command creates an example job specification in the current directory that demonstrates some common configurations for tasks, task groups, runtime constraints, and resource allocation.

Usage

nomad job init [options] [filename]

You may optionally supply a filename for the example job to be written to. The default filename for the generated file is "example.nomad".

Please refer to the jobspec and drivers pages to learn how to customize the template.

Init Options

  • -short: If set, a minimal jobspec without comments is emitted.
  • -connect: If set, the jobspec includes Consul Connect integration.

Examples

Generate an example job file:

$ nomad job init
Example job file written to example.nomad