blob: 48b02c623a8ff2d97dbe3ab6072c86e2eaab6bae [file] [log] [blame]
Andrew Grimberg78bc6d52017-10-13 12:55:05 -07001{
2 "variables": {
3 "aws_access_key": null,
4 "aws_security_key": null,
5 "security_group_id": null,
6 "source_ami_filter_name": null,
7 "source_ami_filter_owner": null,
8 "subnet_id": null,
Andrew Grimberg78bc6d52017-10-13 12:55:05 -07009 "distro": null,
Andrew Grimberg80957a82018-06-29 12:52:14 -070010 "cloud_user_data": null,
11 "ssh_user": null,
12 "ssh_proxy_host": ""
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070013 },
14 "builders": [
15 {
16 "access_key": "{{user `aws_access_key`}}",
17 "ami_name": "{{user `distro`}} - basebuild - {{isotime \"20060102-1504\"}}",
18 "instance_type": "t2.micro",
19 "region": "us-west-2",
20 "secret_key": "{{user `aws_security_key`}}",
21 "security_group_id": "{{user `security_group_id`}}",
22 "source_ami_filter": {
23 "filters": {
24 "name": "{{user `source_ami_filter_name`}}",
25 "root-device-type": "ebs",
26 "virtualization-type": "hvm"
27 },
28 "most_recent": true,
29 "owners": ["{{user `source_ami_filter_owner`}}"]
30 },
Andrew Grimberg80957a82018-06-29 12:52:14 -070031 "ssh_username": "{{user `ssh_user`}}",
Andrew Grimberg78bc6d52017-10-13 12:55:05 -070032 "subnet_id": "{{user `subnet_id`}}",
33 "type": "amazon-ebs",
34 "user_data_file": "{{user `cloud_user_data`}}"
35 }
36 ],
37 "provisioners": [
38 {
39 "type": "shell",
40 "scripts": [
41 "provision/baseline.sh",
42 "provision/basebuild.sh",
43 "provision/system_reseal_local_env.sh",
44 "provision/system_reseal.sh"
45 ],
46 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
47 }
48 ]
49}