open-nomad/e2e/terraform
Tim Gross efbd680d4e
e2e: split Packer build scripts from TF provisioning (#6542)
Make a clear split between Packer and Terraform provisioning steps:
the scripts in the `packer/linux` directory are run when we build the
AMI whereas the stuff in shared are run at Terraform provisioning time.

Merging all runtime provisioning scripts into a single script for each
of server/client solves the following:

* Userdata scripts can't take arguments, they can only be templated
  and that means we have to do TF escaping in bash/powershell scripts.
* TF provisioning scripts race with userdata scripts.
2019-10-25 08:08:24 -04:00
..
configs e2e: Add Host Volume Configuration 2019-09-17 20:06:50 +02:00
packer e2e: split Packer build scripts from TF provisioning (#6542) 2019-10-25 08:08:24 -04:00
shared e2e: split Packer build scripts from TF provisioning (#6542) 2019-10-25 08:08:24 -04:00
README.md e2e readme minor changes to command + env val templates and order 2019-05-22 12:34:57 -04:00
compute.tf e2e: split Packer build scripts from TF provisioning (#6542) 2019-10-25 08:08:24 -04:00
iam.tf e2e: upgrade terraform to 0.12.x (#6489) 2019-10-14 11:27:08 -04:00
main.tf e2e: upgrade terraform to 0.12.x (#6489) 2019-10-14 11:27:08 -04:00
network.tf e2e: upgrade terraform to 0.12.x (#6489) 2019-10-14 11:27:08 -04:00
terraform.tfvars suggestions from code review 2018-12-17 15:06:22 -06:00
versions.tf e2e: upgrade terraform to 0.12.x (#6489) 2019-10-14 11:27:08 -04:00

README.md

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