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

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