Deploy a Consul and Nomad cluster on Digital Ocean in minutes with terraform and packer. This image also includes the digital ocean monitoring agent and traefik as reverse proxy.
Configure your environment:
export DIGITALOCEAN_API_TOKEN=""
export DOMAIN="example.com"
export SSH_KEYS="[\"key\"]"
export DATACENTER="nyc1"
export SIZE="s-1vcpu-1gb"
export COUNT="3"
Build your image:
cd packer
sh build.sh
Build your infrastructure:
export IMAGE="image id returned by packer"
cd terraform
sh apply.sh
Just run:
cd terraform
sh destroy.sh
NOTE: Don't forget to destroy the image.