github.com/smintz/nomad@v0.8.3/website/source/docs/job-specification/ephemeral_disk.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "ephemeral_disk Stanza - Job Specification"
     4  sidebar_current: "docs-job-specification-ephemeral_disk"
     5  description: |-
     6    The "ephemeral_disk" stanza describes the ephemeral disk requirements of the
     7    group. Ephemeral disks can be marked as sticky and support live data
     8    migrations.
     9  ---
    10  
    11  # `ephemeral_disk` Stanza
    12  
    13  <table class="table table-bordered table-striped">
    14    <tr>
    15      <th width="120">Placement</th>
    16      <td>
    17        <code>job -> group -> **ephemeral_disk**</code>
    18      </td>
    19    </tr>
    20  </table>
    21  
    22  
    23  The `ephemeral_disk` stanza describes the ephemeral disk requirements of the
    24  group. Ephemeral disks can be marked as sticky and support live data migrations.
    25  All tasks in this group will share the same ephemeral disk.
    26  
    27  ```hcl
    28  job "docs" {
    29    group "example" {
    30      ephemeral_disk {
    31        migrate = true
    32        size    = "500"
    33        sticky  = true
    34      }
    35    }
    36  }
    37  ```
    38  
    39  ## `ephemeral_disk` Parameters
    40  
    41  - `migrate` `(bool: false)` - When `sticky` is true, this specifies that the
    42    Nomad client should make a best-effort attempt to migrate the data from a
    43    remote machine if placement cannot be made on the original node. During data
    44    migration, the task will block starting until the data migration has
    45    completed. Migration is atomic and any partially migrated data will be
    46    removed if an error is encountered.
    47  
    48  - `size` `(int: 300)` - Specifies the size of the ephemeral disk in MB.  The
    49    current Nomad ephemeral storage implementation does not enforce this limit;
    50    however, it is used during job placement.
    51  
    52  - `sticky` `(bool: false)` - Specifies that Nomad should make a best-effort
    53    attempt to place the updated allocation on the same machine. This will move
    54    the `local/` and `alloc/data` directories to the new allocation.
    55  
    56  ## `ephemeral_disk` Examples
    57  
    58  The following examples only show the `ephemeral_disk` stanzas. Remember that the
    59  `ephemeral_disk` stanza is only valid in the placements listed above.
    60  
    61  ### Sticky Volumes
    62  
    63  This example shows enabling sticky volumes with Nomad using ephemeral disks:
    64  
    65  ```hcl
    66  ephemeral_disk {
    67    sticky = true
    68  }
    69  ```
    70  
    71  [resources]: /docs/job-specification/resources.html "Nomad resources Job Specification"