efbd680d4e
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.
25 lines
429 B
JSON
25 lines
429 B
JSON
{
|
|
"builders": [
|
|
{
|
|
"type": "amazon-ebs",
|
|
"region": "us-east-1",
|
|
"source_ami": "ami-80861296",
|
|
"instance_type": "t2.medium",
|
|
"ssh_username": "ubuntu",
|
|
"ami_name": "nomad-e2e-{{timestamp}}",
|
|
"ami_groups": [
|
|
"all"
|
|
],
|
|
"tags": {
|
|
"OS": "Ubuntu"
|
|
}
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"script": "./linux/setup.sh"
|
|
}
|
|
]
|
|
}
|