-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
36 lines (36 loc) · 1.21 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
30
31
32
33
34
35
36
{
"_comment" : "Create a AWS AMI ith AMZ Linux 2018 with Java and Tomcat",
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-0e9089763828757e1",
"instance_type": "t2.nano",
"ssh_username": "ec2-user",
"associate_public_ip_address": "true",
"ami_name": "DevOpsClass-Build-{{isotime | clean_resource_name}}",
"vpc_id": "vpc-061000b18de3c3dbd",
"subnet_id": "subnet-03a3ad8d0b398aa3b"
}],
"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"
]
}]
}