forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bench-aws.json
93 lines (93 loc) · 2.72 KB
/
bench-aws.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"source_ami": "ami-018c9568"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{ user `aws_access_key` }}",
"secret_key": "{{ user `aws_secret_key` }}",
"region": "us-east-1",
"instance_type": "m1.small",
"source_ami": "{{ user `source_ami` }}",
"ssh_username": "ubuntu",
"ami_name": "bench-bootstrap-{{ timestamp }}",
"name": "bootstrap"
},
{
"type": "amazon-ebs",
"access_key": "{{ user `aws_access_key` }}",
"secret_key": "{{ user `aws_secret_key` }}",
"region": "us-east-1",
"instance_type": "m1.small",
"source_ami": "{{ user `source_ami` }}",
"ami_name": "bench-server-{{ timestamp }}",
"ssh_username": "ubuntu",
"name": "server"
},
{
"type": "amazon-ebs",
"access_key": "{{ user `aws_access_key` }}",
"secret_key": "{{ user `aws_secret_key` }}",
"region": "us-east-1",
"instance_type": "m1.small",
"source_ami": "{{ user `source_ami` }}",
"ami_name": "bench-worker-{{ timestamp }}",
"ssh_username": "ubuntu",
"name": "worker"
}
],
"provisioners":[
{
"type": "file",
"source": "conf/upstart.conf",
"destination": "/tmp/upstart-consul.conf"
},
{
"type": "shell",
"inline": [
"sudo mv /tmp/upstart-consul.conf /etc/init/consul.conf",
"mkdir /tmp/consul.d",
"sudo mkdir /etc/consul.d",
"sudo apt-get update",
"sudo apt-get install unzip make",
"wget https://releases.hashicorp.com/consul/0.5.2/consul_0.5.2_linux_amd64.zip",
"unzip 0.5.2_linux_amd64.zip",
"sudo mv consul /usr/local/bin/consul",
"chmod +x /usr/local/bin/consul"
]
},
{
"type": "file",
"source": "conf/common.json",
"destination": "/tmp/consul.d/common-aws.json"
},
{
"type": "file",
"source": "conf/bootstrap.json",
"destination": "/tmp/consul.d/bootstrap.json",
"only": ["bootstrap"]
},
{
"type": "file",
"source": "conf/server.json",
"destination": "/tmp/consul.d/server.json",
"only": ["server"]
},
{
"type": "file",
"source": "Makefile",
"destination": "/tmp/Makefile"
},
{
"type": "shell",
"inline": [
"sudo curl https://s3.amazonaws.com/hc-ops/boom_linux_amd64 -o /usr/local/bin/boom",
"sudo chmod +x /usr/local/bin/boom",
"sudo mv /tmp/consul.d /etc/consul.d"
]
}
]
}