cd1c6173f4
This changeset provides two basic e2e tests for CSI plugins targeting common AWS use cases. The EBS test launches the EBS plugin (controller + nodes) and registers an EBS volume as a Nomad CSI volume. We deploy a job that writes to the volume, stop that job, and reuse the volume for another job which should be able to read the data written by the first job. The EFS test launches the EFS plugin (nodes-only) and registers an EFS volume as a Nomad CSI volume. We deploy a job that writes to the volume, stop that job, and reuse the volume for another job which should be able to read the data written by the first job. The writer jobs mount the CSI volume at a location within the alloc dir.
34 lines
619 B
HCL
34 lines
619 B
HCL
# a job that mounts the EFS volume and sleeps, so that we can
|
|
# read its mounted file system remotely
|
|
job "use-efs-volume" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "group" {
|
|
volume "test" {
|
|
type = "csi"
|
|
source = "efs-vol0"
|
|
}
|
|
|
|
task "task" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "busybox:1"
|
|
command = "/bin/sh"
|
|
args = ["-c", "sleep 3600"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "test"
|
|
destination = "${NOMAD_TASK_DIR}/test"
|
|
read_only = true
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 128
|
|
}
|
|
}
|
|
}
|
|
}
|