- https://learn.hashicorp.com/consul/datacenter-deploy/deployment-guide
- https://www.consul.io/docs/agent/options.html
- https://www.nomadproject.io/docs/configuration/index.html
- https://www.nomadproject.io/docs/install/production/deployment-guide/
- https://www.nomadproject.io/docs/configuration/client/
- https://www.nomadproject.io/docs/schedulers/#system
- https://www.nomadproject.io/docs/job-specification/network/
- https://codefresh.io/docs/docs/yaml-examples/examples/nomad/
- https://docs.traefik.io/providers/consul-catalog
- https://docs.traefik.io/routing/providers/consul-catalog/
- https://learn.hashicorp.com/nomad/operating-nomad/prometheus-metrics
- hashicorp/nomad#209
- https://learn.hashicorp.com/consul/security-networking/forwarding
We strongly believe that infrastructure code should be obvious and majority of information should be hard-coded. Hence this example contains even domain names and firewall rules with hard-coded parameters. If you want to use this code for your own PoC, please replace following stuff with information specific for your environment:
terraform/consul/droplets.tf
: reference to packer imageterraform/nomad-server/droplets.tf
: reference to packer imageterraform/nomad-client/droplets.tf
: reference to packer imageterraform/consul/dns.tf
: DNS records for dropletsterraform/nomad-server/dns.tf
: DNS records for dropletsterraform/nomad-client/dns.tf
: DNS records for dropletsterraform/consul/data.tf
: DNS records for dropletsterraform/nomad-server/data.tf
: DNS records for dropletsterraform/nomad-client/data.tf
: DNS records for dropletsterraform/firewall/*
: adjust firewall according to your needsterraform/loadbalancer/dns.tf
: DNS records for Nomad servicesterraform/loadbalancer/certificate.tf
: Let's Encrypt certificate for Nomad services