-
Notifications
You must be signed in to change notification settings - Fork 1
allow running docker bind volumes thru Hashicorp's NOMAD using the raw_exec driver
License
csawyerYumaed/nomad-docker
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
UPDATE: nomad has this built in now, don't be a fool, use the built-in stuff. This was all written and in production before Nomad had built-in support, we not longer use it. Nomad's (https://github.com/hashicorp/nomad) docker driver doesn't support volumes. There is someone that made a "wrapper" around nomad's raw_exec driver to give you volumes, but I didn't care for it. I wanted a more generic solution Their solution is here: https://gist.github.com/ketzacoatl/3ccf5bb822df51aed2b896641e931c8a#file-run-postgres My solution is here. It's generic, you define network just like always, you define volumes as META labels in your nomad job config. It's working for me ... in production. an example job for the docker registry is included in file: registry.nomad. to INSTALL (must do this on each docker host): pip install docker-py cp runNomadDocker.py /usr/local/bin Then configure your job to run raw_exec and runNomadDocker.py as your command. Config your mounts, network, image, etc via meta { } config block (details below). nomad docker doesn't allow us to do volumes, which hurts. This is a work-around. I hope they add this soon. all META keys are capitalized by NOMAD, so be sure to define your _LABELS as uppercase. the docker container will be removed and stopped, if it's already running. at exit (nomad stop <job>) time, the docker container will be stopped(but not removed) for details on configuration see the top of the runNomadDocker.py file, or the example file registry.nomad.
About
allow running docker bind volumes thru Hashicorp's NOMAD using the raw_exec driver
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published