open-nomad/e2e/terraform/shared/README.md
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

582 B

Terraform Provisioning

These scripts are copied up to instances via Terraform provisioning and executed after launch. This allows us to update the Nomad configurations for features that land on master without having to re-bake AMIs.

What goes here?

  • steps that are specific to a given Nomad build: ex. all Nomad configuration files.
  • steps that are specific to a given EC2 instance: configuring IP addresses.

These scripts should be idempotent: copy configurations from /ops/shared to their destinations where the services expect them to be, rather than moving them.