Files
nomad/e2e/terraform
Tim Gross f7c9db5624 e2e: tag instances with origin (#6293)
When multiple developers are working on e2e testing, it helps to be
able to identify which infrastructure belongs to which Nomad SHA and
which developer. This adds tags to the EC2 instances.
2019-09-06 15:49:18 -04:00
..
2019-07-20 16:55:07 +02:00
2019-09-04 12:40:08 -07:00
2018-12-17 11:40:09 -06:00
2019-09-06 15:49:18 -04:00
2018-12-17 11:40:09 -06:00
2019-08-30 16:51:13 -04:00
2018-12-17 15:06:22 -06:00

Terraform provisioner for end to end tests

This folder contains terraform resources for provisioning a nomad cluster on AWS for end to end tests. It uses a Nomad binary identified by its commit SHA that's stored in a shared s3 bucket that Nomad team developers can access. The commit SHA can be from any branch that's pushed to remote.

Use envchain to store your AWS credentials.

$ cd e2e/terraform/
$ TF_VAR_nomad_sha=<nomad_sha> envchain nomadaws terraform apply

After this step, you should have a nomad client address to point the end to end tests in the e2e folder to.

SSH

Terraform will output node IPs that may be accessed via ssh:

ssh -i keys/nomad-e2e-*.pem ubuntu@${EC2_IP_ADDR}

Teardown

The terraform state file stores all the info, so the nomad_sha doesn't need to be valid during teardown.

$ cd e2e/terraform/
$ envchain nomadaws TF_VAR_nomad_sha=yyyzzz terraform destroy