diff --git a/e2e/README.md b/e2e/README.md index d9275c605..340287751 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -53,7 +53,7 @@ Then deploy Nomad to the cluster by passing `-provision.terraform` without a Nomad version flag: ```sh -go test -v . -nomad.version=0.10.2 -provision.terraform ./provisioning.json -skipTests +NOMAD_E2E=1 go test -v . -nomad.version=0.10.2 -provision.terraform ./provisioning.json -skipTests ``` Because it can take a little while for the cluster to settle, it's diff --git a/e2e/terraform/Makefile b/e2e/terraform/Makefile new file mode 100644 index 000000000..6555377fd --- /dev/null +++ b/e2e/terraform/Makefile @@ -0,0 +1,10 @@ +NOMAD_SHA := $(shell git rev-parse HEAD) + +dev-cluster: + terraform apply -auto-approve -var-file=terraform.tfvars.dev + terraform output provisioning | jq . > ../provisioning.json + cd .. && NOMAD_E2E=1 go test -v . -nomad.sha=$(NOMAD_SHA) -provision.terraform ./provisioning.json -skipTests + terraform output message + +clean: + terraform destroy -auto-approve diff --git a/e2e/terraform/main.tf b/e2e/terraform/main.tf index 971d6c5da..2530c784e 100644 --- a/e2e/terraform/main.tf +++ b/e2e/terraform/main.tf @@ -132,7 +132,13 @@ go test -v ./e2e ssh into nodes with: ``` -ssh -i keys/${local.random_name}.pem ubuntu@${aws_instance.client_linux[0].public_ip} +# server +ssh -i keys/${local.random_name}.pem ubuntu@${aws_instance.server[0].public_ip} + +# clients +%{ for ip in aws_instance.client_linux.*.public_ip ~} +ssh -i keys/${local.random_name}.pem ubuntu@${ip} +%{ endfor ~} ``` EOM