-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer_ec2.json
46 lines (45 loc) · 971 Bytes
/
packer_ec2.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
41
42
43
44
45
46
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"product_version": "{{env `PRODUCT_VERSION`}}"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-60b6c60a",
"instance_type": "c3.large",
"ssh_username": "ec2-user",
"ssh_timeout": "10m",
"ssh_pty" : true,
"ami_name": "Moodle {{user `product_version`}} {{timestamp}}"
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"bootstrap.sh"
]
},
{
"type": "chef-solo",
"cookbook_paths": [
"cookbooks",
"site-cookbooks"
],
"run_list" : [
"lw1_moodle::default"
]
},
{
"type": "shell",
"scripts": [
"cleanup.sh"
]
}
]
}