/
stalker.json
47 lines (47 loc) · 1.23 KB
/
stalker.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
{
"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-west-1",
"source_ami": "ami-4b6f650e",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "Bus Stalker {{timestamp}}",
"ssh_pty": true
}],
"provisioners": [{
"type": "file",
"source": "sources/savepoint.sh",
"destination": "/home/ec2-user/savepoint.sh"
}, {
"type": "chef-solo",
"cookbook_paths": ["cookbooks"],
"run_list": [
"recipe[awscli]"
],
"json": {
"awscli": {
"config_profiles": {
"default" : {
"region" : "us-west-1",
"aws_access_key_id" : "{{user `aws_access_key`}}",
"aws_secret_access_key" : "{{user `aws_secret_key`}}",
"user" : "ec2-user"
}
}
}
}
}, {
"type": "shell",
"inline": [
"chmod a+x /home/ec2-user/savepoint.sh",
"sudo sh -c 'echo \"* * * * * ec2-user /home/ec2-user/savepoint.sh\" > /etc/crontab'"
]
}
]
}