open-nomad/website/source/docs/job-specification/ephemeral_disk.html.md
2016-10-31 21:52:45 -04:00

1.9 KiB

layout page_title sidebar_current description
docs ephemeral_disk Stanza - Job Specification docs-job-specification-ephemeral_disk The "ephemeral_disk" stanza describes the ephemeral disk requirements of the task group. Ephemeral disks can be marked as sticky and support live data migrations.

ephemeral_disk Stanza

Placement job -> group -> **ephemeral_disk**

The ephemeral_disk stanza describes the ephemeral disk requirements of the task group. Ephemeral disks can be marked as sticky and support live data migrations. All tasks in this group will share the same ephemeral disk.

job "docs" {
  group "example" {
    ephemeral_disk {
      migrate = true
      size    = "500"
      sticky  = true
    }
  }
}

ephemeral_disk Parameters

  • migrate (bool: false) - Specifies that the Nomad client should make a best-effort attempt to migrate the data from a remote machine if placement cannot be made on the original node. During data migration, the task will block starting until the data migration has completed.

  • size (int: 300) - Specifies the size of the ephemeral disk in MB.

  • sticky (bool: false) - Specifies that Nomad should make a best-effort attempt to place the updated allocation on the same machine. This will move the local/ and alloc/data directories to the new allocation.

ephemeral_disk Examples

The following examples only show the ephemeral_disk stanzas. Remember that the ephemeral_disk stanza is only valid in the placements listed above.

Sticky Volumes

This example shows enabling sticky volumes with Nomad using ephemeral disks:

ephemeral_disk {
  sticky = true
}