mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
* changed list indicator from * -> - * moved in-text links to reference links * made commands `plaintext` * made command examples `console` * rewrapped text
42 lines
969 B
Plaintext
42 lines
969 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] pages to learn how to customize the
|
|
template.
|
|
|
|
## Usage
|
|
|
|
```plaintext
|
|
nomad job init [options]
|
|
```
|
|
|
|
## 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
|
|
$ nomad job init
|
|
Example job file written to example.nomad
|
|
```
|
|
|
|
[jobspec]: /docs/job-specification/index.html "Nomad Job Specification"
|
|
[drivers]: /docs/drivers/index.html
|