github.com/ncodes/nomad@v0.5.7-0.20170403112158-97adf4a74fb3/website/source/docs/job-specification/update.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "update Stanza - Job Specification"
     4  sidebar_current: "docs-job-specification-update"
     5  description: |-
     6    The "update" stanza specifies the job update strategy. The update strategy is
     7    used to control things like rolling upgrades. If omitted, rolling updates are
     8    disabled.
     9  ---
    10  
    11  # `update` Stanza
    12  
    13  <table class="table table-bordered table-striped">
    14    <tr>
    15      <th width="120">Placement</th>
    16      <td>
    17        <code>job -> **update**</code>
    18      </td>
    19    </tr>
    20  </table>
    21  
    22  The `update` stanza specifies the job update strategy. The update strategy is
    23  used to control things like rolling upgrades. If omitted, rolling updates are
    24  disabled.
    25  
    26  ```hcl
    27  job "docs" {
    28    update {
    29      max_parallel = 3
    30      stagger      = "30s"
    31    }
    32  }
    33  ```
    34  
    35  ## `update` Parameters
    36  
    37  - `max_parallel` `(int: 0)` - Specifies the number of task groups that can be
    38    updated at the same time.
    39  
    40  - `stagger` `(string: "0ms")` - Specifies the delay between sets of updates.
    41    This is specified using a label suffix like "30s" or "1h".
    42  
    43  ## `update` Examples
    44  
    45  The following examples only show the `update` stanzas. Remember that the
    46  `update` stanza is only valid in the placements listed above.
    47  
    48  ### Serial Upgrades
    49  
    50  This example uses a serial upgrade strategy, meaning exactly one task group will
    51  be updated at a time, waiting 60 seconds until the next task group is upgraded.
    52  
    53  ```hcl
    54  update {
    55    max_parallel = 1
    56    stagger      = "60s"
    57  }
    58  ```
    59  
    60  ### Parallel Upgrades
    61  
    62  This example performs 10 upgrades at a time, waiting 30 seconds before moving on
    63  to the next batch:
    64  
    65  ```hcl
    66  update {
    67    max_parallel = 10
    68    stagger      = "30s"
    69  }
    70  ```