-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasic-WebPHP-EC2AMI.json
43 lines (42 loc) · 1.14 KB
/
Basic-WebPHP-EC2AMI.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
{
"_comment": "Create simple image PHP web using AmazonLinux 1",
"variables": {
"aws_region": "{{env `AWS_REGION`}}"
},
"builders": [{
"type": "amazon-ebs",
"region": "{{user `aws_region`}}",
"instance_type": "t3.micro",
"ssh_username": "ec2-user",
"ami_name": "AMZNLinux1-{{user `aws_region`}}-{{timestamp}}",
"source_ami" : "ami-01e24be29428c15b2",
"ami_description": "PHP/Node Web server : AmazonLinux : php71, nodejs, npm, drush, composer",
"tags": {
"Name": "{{user `aws_region`}}-AMZNLinux1",
"OS_Version": "amazonlinux1",
"Applications": "nodejs,npm,php,gulp,composer,drush",
"NodeJSVersion": "10.x",
"Purpose": "web",
"Environment": "dev",
"BuildDate": "{{timestamp}}"
}
}],
"provisioners": [
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo '{{ .Path }}'",
"script": "deploy-bootstrap.sh"
}
],
"post-processors": [
{
"type": "manifest",
"output": "manifest.json",
"strip_path": true
},
{
"type": "shell-local",
"script": "{{user `postscript`}}"
}
]
}