Files
nomad/website/source/docs/commands/job/init.html.md.erb
Tim Gross 992db3346c command: add -connect flag to job init
Adds an example job for Consul Connect integration as well as an
annotated example job.
2019-08-19 14:43:04 -04:00

34 lines
908 B
Plaintext

---
layout: "docs"
page_title: "Commands: job init"
sidebar_current: "docs-commands-job-init"
description: >
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][jobspec] in the
current directory that demonstrates some common configurations for tasks, task
groups, runtime constraints, and resource allocation.
Please refer to the [jobspec][] and [drivers](/docs/drivers/index.html)
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:
```text
$ nomad job init
Example job file written to example.nomad
```
[jobspec]: /docs/job-specification/index.html "Nomad Job Specification"