hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
14.96k stars 1.96k forks source link

HostVolumePlugin interface and two implementations #24497

Closed gulducat closed 1 day ago

gulducat commented 3 days ago

This is functional end-to-end from CLI to Client, provided you place the example-host-volume plugin script in /opt/nomad/hostvolumeplugins/ on the client node, or use the "mkdir" internal plugin.

I have not tried this on MacOS or Windows, only my Linux laptop. Perhaps @pkazmierczak can test it on Mac for us? :slightly_smiling_face:

There are many TODOs around, and no unit tests are present. Testing what's here is up next on my todo list, provided the overall shape of the interface here looks good to y'all.

Ref: #24479


The _test-plugin.sh script was convenient for me sprucing up the example plugin, and gave me two ideas for future:

tgross commented 2 days ago

@gulducat if you want to push testing into it's own PR that feels reasonable for a large PR on something so "side-effect-y" but we should probably add the package to the list in ci/test-core.json to make the linter happy?

gulducat commented 2 days ago

I've started writing tests, but I'm also happy to open another PR for it, so we can all collectively use this purportedly-functional thing in the meantime :stuck_out_tongue_winking_eye: