We've included Nomad jobs for the following:
System jobs run on all nodes. We have the following:
dnsmasq-- DNS server on port 53. Forwards requests likeprometheus.service.consulto the local Consul server, and uses the container's resolv.conf to reply to all other requests. This allows all jobs to set thedns_serversDocker config to the node IP.fabio-- HTTP load balancer. Used to forward apps to:9990/$APP_NAME. Set a Consul service tag likefabio-/somethingand it will forward traffic from:9990/somethingto that service.telegraf-- collects stats from the system, Consul and Nomad. Requiresinfluxdb
We also run some jobs as services:
influxdb-- service that stores data from telegrafprometheus-- collects metrics from Nomadgrafana-- displays dashboards with data from Prometheus and Influxdbregistry-- local registry to cache docker images
Finally, we have one periodic job:
docker-system-prune-- runsdocker system prune --all --force --volumeson a single node every hour, since periodic system jobs are not supported by Nomad.
The ./cluster.py run-jobs command will trigger the deployment of the files in
./etc/*.nomad. This command is automatically run by the start command.
To start some of these jobs, set:
[cluster]
run_jobs = fabio,grafana,prometheus,dnsmasq