Closed hajali-amine closed 11 months ago
Hi @hajali-amine! The allocation directory is intended for this use, and can be referenced inside each task at the path in the $NOMAD_ALLOC_DIR
env var. See https://developer.hashicorp.com/nomad/docs/concepts/filesystem for more details on this.
We've also got an open feature request for Dynamic Host Volumes https://github.com/hashicorp/nomad/issues/15489 which will likely be a slightly more powerful version of the same concept.
Proposal
I feel like there should be type of volume that is ephemeral, the moment the tasks are stopped, it gets removed and wiped. Something similar to K8S'
emptyDir
. For example;This allows two tasks to share a volume and fast without having to create a host volume or having something persistent.
Use-cases
Inter-task communication, especially when it's between prestart, poststart and a main task. It facilitates the choice on where to mount the ephemeral volume instead of having
alloc
and managing the movement of directories.Attempted Solutions
None