-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.json
30 lines (29 loc) · 1.01 KB
/
packer.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
{
"_comment" : "Create a AWS AMI ith AMZ Linux 2018 with Java and Tomcat",
"builders": [{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami": "ami-0e2ff28bfb72a4e45",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "DevOpsClass-Build-{{isotime | clean_resource_name}}",
"vpc_id": "vpc-0b846551000a2f79e",
"subnet_id": "subnet-0af32b57eec56b376"
}],
"provisioners": [{
"type": "shell",
"inline": [
"sleep 30",
"sudo yum update -y",
"sudo yum install nginx -y",
"sudo yum install git -y",
"sudo git clone https://github.com/mavrick202/webhooktesting.git",
"sudo rm -rf /usr/share/nginx/html/index.html",
"sudo cp webhooktesting/index.html /usr/share/nginx/html/index.html",
"sudo cp webhooktesting/style.css /usr/share/nginx/html/style.css",
"sudo cp webhooktesting/scorekeeper.js /usr/share/nginx/html/scorekeeper.js",
"sudo service nginx start",
"sudo chkconfig nginx on"
]
}]
}