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.
41 lines
947 B
HCL
41 lines
947 B
HCL
# jobspec for running CSI plugin for AWS EBS, derived from
|
|
# the kubernetes manifests found at
|
|
# https://github.com/kubernetes-sigs/aws-ebs-csi-driver/tree/master/deploy/kubernetes
|
|
|
|
job "plugin-aws-ebs-controller" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "controller" {
|
|
task "plugin" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "amazon/aws-ebs-csi-driver:latest"
|
|
|
|
args = [
|
|
"controller",
|
|
"--endpoint=unix://csi/csi.sock",
|
|
"--logtostderr",
|
|
"--v=5",
|
|
]
|
|
|
|
# note: plugins running as controllers don't
|
|
# need to run as privileged tasks
|
|
}
|
|
|
|
csi_plugin {
|
|
id = "aws-ebs0"
|
|
type = "controller"
|
|
mount_dir = "/csi"
|
|
}
|
|
|
|
# note: there's no upstream guidance on resource usage so
|
|
# this is a best guess until we profile it in heavy use
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
}
|
|
}
|
|
}
|
|
}
|