e2e: add a convenient creation script

Add a convenience Makefile for creating e2e environment for manual
debugging.
This commit is contained in:
Mahmood Ali 2020-04-09 10:54:30 -04:00
parent 030e40ac5c
commit 8a4937d9ce
3 changed files with 18 additions and 2 deletions

View file

@ -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

10
e2e/terraform/Makefile Normal file
View file

@ -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

View file

@ -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