mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Some time ago the Windows host we were using as a Nomad client agent test target started failing to allow ssh connections. The underlying problem appears to be with sysprep but I wasn't able to debug the exact cause as it's not an area I have a lot of expertise in. Swap out the deprecated Windows 2016 host for a Windows 2022 host. This will use a base image provided by Amazon and then we'll use a userdata script to bootstrap ssh and some target directories for Terraform to upload files to. The more modern Windows will let us drop some of extra powershell scripts we were using as well. Fixes: https://hashicorp.atlassian.net/browse/NMD-151 Fixes: https://github.com/hashicorp/nomad-e2e/issues/125
55 lines
1.4 KiB
Makefile
55 lines
1.4 KiB
Makefile
PKG_PATH ?= $(shell pwd)/../../pkg/linux_amd64/nomad
|
|
NOMAD_LICENSE_PATH ?=
|
|
CONSUL_LICENSE_PATH ?=
|
|
|
|
# deploy for quick local development testing
|
|
|
|
custom.tfvars:
|
|
echo 'nomad_local_binary = "$(PKG_PATH)"' > custom.tfvars
|
|
echo 'volumes = false' >> custom.tfvars
|
|
echo 'client_count_linux = 3' >> custom.tfvars
|
|
echo 'client_count_windows_2022 = 0' >> custom.tfvars
|
|
echo 'consul_license = "$(shell cat $(CONSUL_LICENSE_PATH))"' >> custom.tfvars
|
|
echo 'nomad_license = "$(shell cat $(NOMAD_LICENSE_PATH))"' >> custom.tfvars
|
|
|
|
.PHONY: plan apply clean destroy plan_full apply_full clean_full destroy_full tidy
|
|
|
|
plan: custom.tfvars
|
|
terraform plan -var-file=custom.tfvars
|
|
|
|
apply: custom.tfvars
|
|
terraform apply -var-file=custom.tfvars -auto-approve
|
|
|
|
destroy: custom.tfvars
|
|
terraform destroy -var-file=custom.tfvars -auto-approve
|
|
|
|
clean: destroy tidy
|
|
|
|
# deploy what's in E2E nightly
|
|
|
|
plan_full:
|
|
terraform plan
|
|
|
|
apply_full:
|
|
@terraform apply -auto-approve \
|
|
-var="consul_license=$(shell cat $(CONSUL_LICENSE_PATH))" \
|
|
-var="nomad_license=$(shell cat $(NOMAD_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 provision-infra/keys
|
|
mkdir -p provision-infra/keys
|
|
chmod 0700 provision-infra/keys
|
|
rm -rf provision-infra/uploads/*
|
|
git checkout uploads/README.md
|
|
rm -f terraform.tfstate.*.backup
|
|
rm custom.tfvars
|