open-nomad/e2e/terraform/Makefile
Tim Gross 9d37233eaf
e2e: provision cluster entirely through Terraform (#8748)
Have Terraform run the target-specific `provision.sh`/`provision.ps1` script
rather than the test runner code which needs to be customized for each
distro. Use Terraform's detection of variable value changes so that we can
re-run the provisioning without having to re-install Nomad on those specific
hosts that need it changed.

Allow the configuration "profile" (well-known directory) to be set by a
Terraform variable. The default configurations are installed during Packer
build time, and symlinked into the live configuration directory by the
provision script. Detect changes in the file contents so that we only upload
custom configuration files that have changed between Terraform runs
2020-09-18 11:27:24 -04:00

33 lines
757 B
Makefile

NOMAD_SHA ?= $(shell git rev-parse HEAD)
PKG_PATH = $(shell pwd)/../../pkg/linux_amd64/nomad
dev-cluster:
terraform apply -auto-approve \
-var="nomad_sha=$(NOMAD_SHA)" \
-var-file=terraform.tfvars.dev
terraform output environment
dev-cluster-from-local:
terraform apply -auto-approve \
-var="nomad_local_binary=$(PKG_PATH)" \
-var-file=terraform.tfvars.dev
terraform output environment
clean:
terraform destroy -auto-approve
full-cluster:
terraform apply -auto-approve \
-var="nomad_sha=$(NOMAD_SHA)" \
-var-file=terraform.tfvars
plan-dev-cluster:
terraform plan \
-var="nomad_sha=$(NOMAD_SHA)" \
-var-file=terraform.tfvars.dev
plan-full-cluster:
terraform plan \
-var="nomad_sha=$(NOMAD_SHA)" \
-var-file=terraform.tfvars