-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker_ec2.json
61 lines (60 loc) · 1.34 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
61
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-b66ed3de",
"instance_type": "c3.2xlarge",
"ssh_username": "ec2-user",
"ssh_timeout": "10m",
"ami_name": "ThoughtWorks Go 14.3 Amazon Linux 2014.09.1 {{timestamp}}"
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"bootstrap.sh"
]
},
{
"type": "file",
"source": "files/ulimit_go.conf",
"destination": "ulimit_go.conf"
},
{
"type": "shell",
"inline": ["sudo install -o root -g root ulimit_go.conf /etc/security/limits.d/90-thoughtworks-go.conf"]
},
{
"type": "file",
"source": "files/go_reboot.cron",
"destination": "go_reboot"
},
{
"type": "shell",
"inline": ["sudo install -m 0644 -o root -g root go_reboot /etc/cron.d/"]
},
{
"type": "file",
"source": "chef_repo",
"destination": "lw1"
},
{
"type": "shell",
"inline": ["sudo mv lw1 /opt/"]
},
{
"type": "shell",
"scripts": [
"cleanup.sh"
]
}
]
}