github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/website/pages/docs/commands/job/init.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: job init'
     4  sidebar_title: init
     5  description: |
     6    The job init command is used to generate a skeleton jobspec template.
     7  ---
     8  
     9  # Command: job init
    10  
    11  **Alias: `nomad init`**
    12  
    13  The `job init` command creates an example [job specification][jobspec] in the
    14  current directory that demonstrates some common configurations for tasks, task
    15  groups, runtime constraints, and resource allocation.
    16  
    17  ## Usage
    18  
    19  ```plaintext
    20  nomad job init [options] [filename]
    21  ```
    22  
    23  You may optionally supply a filename for the example job to be written to. The
    24  default filename for the generated file is "example.nomad".
    25  
    26  Please refer to the [jobspec] and [drivers] pages to learn how to customize the
    27  template.
    28  
    29  ## Init Options
    30  
    31  - `-short`: If set, a minimal jobspec without comments is emitted.
    32  - `-connect`: If set, the jobspec includes Consul Connect integration.
    33  
    34  ## Examples
    35  
    36  Generate an example job file:
    37  
    38  ```shell-sessionnomad job init
    39  Example job file written to example.nomad
    40  ```
    41  
    42  [jobspec]: /docs/job-specification 'Nomad Job Specification'
    43  [drivers]: /docs/drivers 'Nomad Task Drivers documentation'