-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker_ami.json
40 lines (40 loc) · 990 Bytes
/
packer_ami.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"region": "",
"source_ami": "",
"instance_type": "m3.medium",
"ami_name": "api.photos "
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `region`}}",
"source_ami": "{{user `source_ami`}}",
"instance_type": "{{user `instance_type`}}",
"ami_name": "{{user `ami_name`}} {{isotime | clean_ami_name}}",
"ssh_username": "ubuntu",
"tags": {
"Role": "api",
"Environment": "photos-delta",
"state": "initialized",
"build_time": "{{timestamp}}"
}
}
],
"provisioners": [
{
"type": "shell",
"pause_before": "5s",
"execute_command": "sudo -S sh '{{.Path}}'",
"scripts": [
"scripts/provision.sh",
"scripts/audit.sh",
"scripts/clean.sh"
]
}
]
}