github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/e2e/csi/input/use-efs-volume-write.nomad (about) 1 # a job that mounts an EFS volume and writes its job ID as a file 2 job "use-efs-volume" { 3 datacenters = ["dc1"] 4 5 constraint { 6 attribute = "${attr.kernel.name}" 7 value = "linux" 8 } 9 10 group "group" { 11 volume "test" { 12 type = "csi" 13 source = "efs-vol0" 14 } 15 16 task "task" { 17 driver = "docker" 18 19 config { 20 image = "busybox:1" 21 command = "/bin/sh" 22 args = ["-c", "touch /local/test/${NOMAD_ALLOC_ID}; sleep 3600"] 23 } 24 25 volume_mount { 26 volume = "test" 27 destination = "${NOMAD_TASK_DIR}/test" 28 read_only = false 29 } 30 31 resources { 32 cpu = 500 33 memory = 128 34 } 35 } 36 } 37 }