This script installs and configures Consul, Vault and Nomad. After those are up, we're running dnsmasq to forward Consul's DNS, Prometheus to collect Nomad stats, and Grafana to display them in a nice dashboard. It also runs a local Docker registry to cache images. It's designed to be easy to use on a fresh Linux machine, therefore it's somewhat opinionated.
Install and have Docker
up and running. Follow the instructions at
get.docker.com
.
Clone this repository, then:
cd /opt/cluster
cp examples/cluster.ini .
./bin/docker.sh
docker exec cluster ./cluster.py supervisorctl -- tail -f start
Wait a minute and visit:
- http://10.66.60.1:8500 - Consul
- http://10.66.60.1:4646 - Nomad
- http://10.66.60.1:8200 - Vault
If fabio
has been enabled in cluster.ini
, visit:
In case of panic or just to stop it, docker stop cluster
will make it all go away.
To run a tagged version (e.g. v0.9.0
) of cluster:
git checkout v0.9.0
./bin/docker.sh --image liquidinvestigations/cluster:0.9.0
Use cluster.py nomad-exec JOB:TASK COMMAND...
to execute a command inside a
container. stdin
and stdout
can be used to exchange data.
The command uses
nomad alloc exec
.
- Installation as a Docker container: docs/Docker-Installation.md
- Installation manually on the system: docs/Manual-Installation.md
- Vault configuration: docs/Vault.md
- Running a multi-host cluster: docs/Multi-Host.md
- Batteries included - bundled Nomad jobs: docs/Nomad-Jobs.md