-
Notifications
You must be signed in to change notification settings - Fork 1
/
packer_ec2.json
60 lines (59 loc) · 1.29 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"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-c58c1dd3",
"instance_type": "c3.large",
"ssh_username": "ec2-user",
"ssh_timeout": "10m",
"ssh_pty" : true,
"ami_name": "Mautic Powered by AMIAGE {{user `product_version`}} {{timestamp}}"
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"bootstrap.sh"
]
},
{
"type": "file",
"source" : ".composer/auth.json",
"destination" : "/home/ec2-user/.composer/auth.json"
},
{
"type": "chef-solo",
"json" : {
"composer" : {
"owner" : "root",
"group" : "apache"
}
},
"cookbook_paths": [
"cookbooks",
"site-cookbooks"
],
"run_list" : [
"mautic::pre_packages",
"composer::default",
"mautic::mautic",
"mautic::setup_tasks"
]
},
{
"type": "shell",
"scripts": [
"cleanup.sh"
]
}
]
}