From 4031c79043b5cc36dff9b6ee26c02fa49e7842ed Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Mon, 31 Oct 2016 20:03:31 -0400 Subject: [PATCH] Add ephemeral_disk docs --- .../job-specification/ephemeral_disk.html.md | 67 +++++++++++++++++++ website/source/layouts/docs.erb | 3 + 2 files changed, 70 insertions(+) create mode 100644 website/source/docs/job-specification/ephemeral_disk.html.md diff --git a/website/source/docs/job-specification/ephemeral_disk.html.md b/website/source/docs/job-specification/ephemeral_disk.html.md new file mode 100644 index 000000000..06dfe4b97 --- /dev/null +++ b/website/source/docs/job-specification/ephemeral_disk.html.md @@ -0,0 +1,67 @@ +--- +layout: "docs" +page_title: "ephemeral_disk Stanza - Job Specification" +sidebar_current: "docs-job-specification-ephemeral_disk" +description: |- + The "ephemeral_disk" stanza instructs Nomad to utilize an ephemeral disk + instead of a hard disk requirement, and can also enable sticky volumes and + live data migrations. +--- + +# `ephemeral_disk` Stanza + + + + + + +
Placement + job -> group -> **ephemeral_disk** +
+ +The `ephemeral_disk` stanza instructs Nomad to utilize an ephemeral disk instead +of a hard disk requirement. Clients using this stanza should not specify disk +requirements in the [resources stanza][resources] of the task. All tasks in this +group will share the same ephemeral disk. + +```hcl +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 + should fail. 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: + +```hcl +ephemeral_disk { + sticky = true +} +``` + +[resources]: /docs/job-specification/resources.html "Nomad resources Job Specification" diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 4a90493b5..bdcc277c4 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -51,6 +51,9 @@ > env + > + ephemeral_disk + > group