open-nomad/e2e
Tim Gross e012c2b5bf
Infrastructure for Windows e2e testing (#6584)
Includes:
* baseline Windows AMI
* initial pass at Terraform configurations
* OpenSSH for Windows

Using OpenSSH is a lot nicer for Nomad developers than winrm would be,
plus it lets us avoid passing around the Windows password in the
clear.

Note that now we're copying up all the provisioning scripts and
configs as a zipped bundle because TF's file provisioner dies in the
middle of pushing up multiple files (whereas `scp -r` works fine).

We're also running all the provisioning scripts inside the userdata by
polling for the zip file to show up (gross!). This is because
`remote-exec` provisioners are failing on Windows with the same symptoms as:

https://github.com/hashicorp/terraform/issues/17728

If we can't fix this, it'll prevent us from having multiple Windows
clients running until TF supports count interpolation in the
`template_file`, which is planned for a later 0.12 release.
2019-11-19 11:06:10 -05:00
..
affinities chore: initial hclfmt 2019-10-11 14:00:05 +02:00
allocstats chore: initial hclfmt 2019-10-11 14:00:05 +02:00
bin e2e update shell scripts argument quoting 2019-06-04 15:52:32 -04:00
cli
clientstate chore: initial hclfmt 2019-10-11 14:00:05 +02:00
connect driver/networking: don't recreate existing network namespaces 2019-09-25 14:58:17 -04:00
consul hclfmt nomad jobspecs (#6724) 2019-11-19 10:36:41 -05:00
consultemplate
deployment chore: initial hclfmt 2019-10-11 14:00:05 +02:00
e2eutil e2e: test infra for client node restarts (#6313) 2019-09-18 10:10:14 -04:00
example
execagent
fabio chore: initial hclfmt 2019-10-11 14:00:05 +02:00
framework
hostvolumes e2e: init host volumes test 2019-09-18 00:34:48 +02:00
metrics hclfmt nomad jobspecs (#6724) 2019-11-19 10:36:41 -05:00
migrations chore: Format hcl configurations 2019-07-20 16:55:07 +02:00
nomad09upgrade chore: initial hclfmt 2019-10-11 14:00:05 +02:00
nomadexec chore: initial hclfmt 2019-10-11 14:00:05 +02:00
prometheus hclfmt nomad jobspecs (#6724) 2019-11-19 10:36:41 -05:00
rescheduling chore: Format hcl configurations 2019-07-20 16:55:07 +02:00
spread chore: initial hclfmt 2019-10-11 14:00:05 +02:00
taskevents chore: initial hclfmt 2019-10-11 14:00:05 +02:00
terraform Infrastructure for Windows e2e testing (#6584) 2019-11-19 11:06:10 -05:00
upgrades script e2e/upgrades: cluster upgrade scripts 2019-09-24 14:35:45 -04:00
vault vault e2e: pass vault version into setup instead of having to infer it from test name 2019-04-10 10:34:10 -05:00
README.md e2e bin/update and bin/run, README 2019-06-04 13:42:07 -04:00
e2e.go
e2e_test.go e2e: init host volumes test 2019-09-18 00:34:48 +02:00

README.md

End to End Tests

This package contains integration tests.

The terraform folder has provisioning code to spin up a Nomad cluster on AWS. The tests work with the NOMAD_ADDR environment variable which can be set either to a local dev Nomad agent or a Nomad client on AWS.

Local Development

The workflow when developing end to end tests locally is to run the provisioning step described below once, and then run the tests as described below. When making local changes, use ./bin/update $(which nomad) /usr/local/bin/nomad and ./bin/run sudo systemctl restart nomad to destructively modify the provisioned cluster.

Provisioning

You'll need AWS credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) to create the Nomad cluster. See the README for details. The number of servers and clients is configurable, as is the configuration file for each client and server.

Running

After completing the provisioning step above, you should see CLI output showing the IP addresses of Nomad client machines. To run the tests, set the NOMAD_ADDR variable to http://[client IP]:4646/

$ NOMAD_ADDR=<> NOMAD_E2E=1 go test -v