open-nomad/website/content/docs/commands/job/init.mdx
Ashlee M Boyer 57f8ebfa26
docs: Migrate link formats (#15779)
* Adding check-legacy-links-format workflow

* Adding test-link-rewrites workflow

* chore: updates link checker workflow hash

* Migrating links to new format

Co-authored-by: Kendall Strautman <kendallstrautman@gmail.com>
2023-01-25 09:31:14 -08:00

44 lines
1.1 KiB
Plaintext

---
layout: docs
page_title: '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.
## Usage
```plaintext
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:
```shell-session
$ nomad job init
Example job file written to example.nomad
```
[jobspec]: /nomad/docs/job-specification 'Nomad Job Specification'
[drivers]: /nomad/docs/drivers 'Nomad Task Drivers documentation'