charred / nomad-lxd-terraform

Example nomad cluster on LXD using Terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hashicorp Nomad cluster with Consul, Traefik, Terraform and LXD

Terraform plan to create a Nomad cluster with Consul, Traefik and Prometheus using LXD

Packer is used to build the LXD images used to create the containers.

The cluster contains 11 nodes:

  • 3 Consul nodes
  • 3 Nomad server nodes
  • 3 Nomad client nodes
  • 1 Traefik node
  • 1 Prometheus node

Consul is used to bootstrap the Nomad cluster, for service discovery and for the service mesh

Traefik is the entrypoint of the cluster. It will use Consul service catalog to expose the services.

The proxy configuration exposes the services at {{ service name }}.service.127.0.0.1.nip.io, so when you deploy the service hello.nomad, it will be exposed at hello-world.service.127.0.0.1.nip.io

There are 3 example jobs:

About

Example nomad cluster on LXD using Terraform


Languages

Language:HCL 98.2%Language:Smarty 1.8%