2020-04-28 20:15:58 +00:00
|
|
|
PKG_PATH = $(shell pwd)/../../pkg/linux_amd64/nomad
|
2022-03-18 13:27:28 +00:00
|
|
|
LICENSE_PATH ?=
|
2020-04-09 14:54:30 +00:00
|
|
|
|
2022-03-18 13:27:28 +00:00
|
|
|
# deploy for quick local development testing
|
|
|
|
|
|
|
|
plan:
|
|
|
|
terraform plan \
|
|
|
|
-var="nomad_local_binary=$(PKG_PATH)" \
|
|
|
|
-var="volumes=false" \
|
2022-11-16 16:37:18 +00:00
|
|
|
-var="client_count_ubuntu_jammy_amd64=3" \
|
2022-03-18 13:27:28 +00:00
|
|
|
-var="client_count_windows_2016_amd64=0"
|
2020-04-09 14:54:30 +00:00
|
|
|
|
2022-03-18 13:27:28 +00:00
|
|
|
apply:
|
2020-09-18 15:27:24 +00:00
|
|
|
terraform apply -auto-approve \
|
2022-03-18 13:27:28 +00:00
|
|
|
-var="nomad_local_binary=$(PKG_PATH)" \
|
|
|
|
-var="volumes=false" \
|
2022-11-16 16:37:18 +00:00
|
|
|
-var="client_count_ubuntu_jammy_amd64=3" \
|
2022-03-18 13:27:28 +00:00
|
|
|
-var="client_count_windows_2016_amd64=0"
|
2020-04-28 20:15:58 +00:00
|
|
|
|
2022-03-18 13:27:28 +00:00
|
|
|
clean: destroy tidy
|
2020-09-18 15:27:24 +00:00
|
|
|
|
2022-03-18 13:27:28 +00:00
|
|
|
destroy:
|
|
|
|
terraform destroy -auto-approve \
|
|
|
|
-var="nomad_local_binary=$(PKG_PATH)" \
|
2022-11-16 16:37:18 +00:00
|
|
|
-var="client_count_ubuntu_jammy_amd64=3" \
|
2022-03-18 13:27:28 +00:00
|
|
|
-var="client_count_windows_2016_amd64=0"
|
2020-09-18 15:27:24 +00:00
|
|
|
|
2022-03-18 13:27:28 +00:00
|
|
|
# deploy what's in E2E nightly
|
2020-09-18 15:27:24 +00:00
|
|
|
|
2022-03-18 13:27:28 +00:00
|
|
|
plan_full:
|
|
|
|
terraform plan
|
|
|
|
|
|
|
|
apply_full:
|
|
|
|
@terraform apply -auto-approve \
|
|
|
|
-var="nomad_license=$(shell cat $(LICENSE_PATH))"
|
|
|
|
|
|
|
|
clean_full: destroy_full tidy
|
|
|
|
|
|
|
|
destroy_full:
|
|
|
|
terraform destroy -auto-approve
|
|
|
|
|
|
|
|
# util
|
|
|
|
|
|
|
|
# don't run this by default in plan/apply because it prevents you from
|
|
|
|
# updating a running cluster
|
|
|
|
tidy:
|
|
|
|
rm -rf keys
|
|
|
|
mkdir keys
|
|
|
|
chmod 0700 keys
|
|
|
|
rm -rf uploads/*
|
|
|
|
git checkout uploads/README.md
|
|
|
|
rm -f terraform.tfstate.*.backup
|