nomadgen
Craft your Hashicorp's Nomad job specs in python.
Still under development.
Motivation
Nomad is a great job/task scheduler but HCL is pretty limited. This tool will allow you to easily create job specs in python. Its heavily inspired by Facebook's configerator.
Install and run
pip install nomadgen
- See JSON output:
python jobspec.py
- Apply to Nomad:
python jobspec.py --run
Examples
- Redis - See how to use same basic task spec config with different drivers (Docker, rkt, qemu).
- Hashiapp - Blue/Green deployments made easy.
- periodic - Periodic task example.
- common/resources - How to simplfy your API even better.
Contribute:
- Clone the repo
- Install the thrift compiler
sudo apt-get install thrift-compiler
- Install requirements
sudo pip install -r requirements.txt
- Build and install locally
make
- Run the examples/hashiapp.py to validate output
VAULT_TOKEN="<a vault token>" python examples/hashiapp.py
- Run examples/hashiapp.py against nomad agent to run it
VAULT_TOKEN="<a vault token>" python examples/hashiapp.py --run
License: MIT