An opinionated CLI for Nomad
Linux | OSX |
---|---|
64bit | 64bit |
See all releases
go get github.com/yieldbot/nomad-syncer
cd $GOPATH/src/github.com/yieldbot/nomad-syncer
go build
./nomad-syncer -h
Usage: nomad-syncer [OPTIONS] COMMAND [arg...]
An opinionated CLI for Nomad
Options:
--docker-pull : Pull Docker images before sync
--nomad : Nomad url (default "http://localhost:4646")
--proxy : Proxy url
-h, --help : Display usage
-pp : Pretty print for JSON output
-v, --version : Display version information
-vv : Display extended version information
Commands:
add : Add a job
del : Delete a job
get : Get a job information
jobs : Retrieve jobs
sync : Sync jobs via a file or directory
Default Nomad url is http://localhost:4646
. But also you can use --nomad
argument on each
command or set ENV variable with following command
export NOMAD_URL=http://localhost:4646
You can use --proxy
argument on each command or set ENV variable with following command
export NOMAD_SYNCER_PROXY_URL=http://localhost:8888
./nomad-syncer jobs
Syncing a file
./nomad-syncer sync examples/jobs/job-1.json
Syncing a directory
./nomad-syncer sync examples/jobs/
Syncing with --docker-pull
If you have private Docker repository and don't want to add credentials into
jobs (see https://www.nomadproject.io/docs/drivers/docker.html) then you can use --docker-pull
.
It allows you to pull Docker images before syncing job files.
HOME=/apps/nomad /apps/nomad/nomad-syncer --docker-pull sync examples/jobs/
HOME=/apps/nomad
points to .dockercfg
's directory. It can be a user or /etc
directory.
./nomad-syncer add "$(cat examples/jobs/job-1.json)"
./nomad-syncer get job-1
./nomad-syncer del job-1
- Auto binary release
- Add tests
Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.
[coverage-image]: https://coveralls.io/repos/yieldbot/nomad-syncer/badge.svg?branch=master&service=github)