-
Notifications
You must be signed in to change notification settings - Fork 6
/
consul.json
65 lines (65 loc) · 1.88 KB
/
consul.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
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"region": "us-west-1",
"source_ami": "ami-4b6f650e"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `region`}}",
"source_ami": "{{user `source_ami`}}",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "Consul {{timestamp}}",
"ami_groups": ["all"]
}],
"provisioners": [{
"type": "chef-solo",
"install_command": "curl -L https://www.opscode.com/chef/install.sh | {{if .Sudo}}sudo{{end}} bash /dev/stdin -v 11",
"cookbook_paths": ["cookbooks"],
"run_list": [
"recipe[consul::default]",
"recipe[collectd]",
"recipe[collectd::attribute_driven]"
],
"json": {
"consul": {
"service_mode": "cluster",
"servers": ["10.0.1.100", "10.0.1.101", "10.0.1.102"],
"retry_on_join": true,
"bootstrap_expect": 3
},
"collectd": {
"url": "https://s3.amazonaws.com/collectd-5.4.1/collectd-5.4.1.tar.gz",
"graphite_ipaddress": "influxdb.node.consul",
"plugins": {
"syslog": {
"config": { "LogLevel": "Info" }
},
"disk": { },
"swap": { },
"memory": { },
"cpu": { },
"interface": {
"config": { "Interface": "lo", "IgnoreSelected": true }
},
"df": {
"config": {
"ReportReserved": false,
"FSType": [ "proc", "sysfs", "fusectl", "debugfs", "devtmpfs", "devpts", "tmpfs" ],
"IgnoreSelected": true
}
},
"write_graphite": {
"config": {
"Prefix": "collectd.consul."
}
}
}
}
}
}]
}