Skip to content

Commit 49b66da

Browse files
update README
1 parent 20d6b49 commit 49b66da

File tree

1 file changed

+126
-53
lines changed

1 file changed

+126
-53
lines changed

README.md

+126-53
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,59 @@ The aim of this bosh release is to deploy a go-graphite cluster consisting of th
66
* [go-carbon](https://github.com/lomik/go-carbon) sever to storage metrics
77
* [carbonzipper](https://github.com/dgryski/carbonzipper) to transparently merge graphite carbon backends
88
* [carbonapi](https://github.com/dgryski/carbonapi) to provide the graphite API
9+
* [buckytools](https://github.com/jjneely/buckytools) to provide a management layer on top of go-carbon
910

11+
## Requirements
12+
We structured the release around the conceps of availability zones and clusters. One of the properties required by the `carbon-c-relay` job
13+
gives you a way of configuring the architecture of your `go-graphite` metrics deployment.
14+
`go-carbon` instances are assigned automatically to a specific cluster based on the `az` value of their vm instance. This is achieved by taking advantage of [bosh links](https://bosh.io/docs/links.html).
15+
16+
Let's discuss this idea more in details:
17+
```
18+
properties:
19+
carbon-c-relay:
20+
clusters:
21+
- name: "cluster1"
22+
lb: "jump_fnv1a_ch"
23+
replication: 1
24+
azs: ["z1"]
25+
- name: "cluster2"
26+
lb: "jump_fnv1a_ch"
27+
replication: 1
28+
azs: ["z2"]
29+
```
30+
`clusters` is a list of dictionaries, each representing a carbon-c-relay cluster. The cluster instances are grouped by availability zone.
31+
32+
One cluster can be deployed across several `az`s, like in the following example:
33+
```
34+
properties:
35+
carbon-c-relay:
36+
clusters:
37+
- name: "cluster1"
38+
lb: "jump_fnv1a_ch"
39+
replication: 1
40+
azs: ["z1", "z2"] #<- A cluster can use as many azs as we'd like
41+
```
42+
43+
however you cannot define different clusters using the same availability zone. For example this is not allowed, and a validation error is going to be raised at deployment time. Because of this limitation it is also impossible to define more `carbon-c-relay` clusters than the number of configured azs.
44+
So in a typical 3 azs architecture you can create maximum 3 different clusters each of them deployed to a different az.
45+
46+
###Example of erroneous configuration
47+
```
48+
properties:
49+
carbon-c-relay:
50+
clusters:
51+
- name: "cluster1"
52+
lb: "jump_fnv1a_ch"
53+
replication: 1
54+
azs: ["z1", "z2"]
55+
- name: "cluster2"
56+
lb: "jump_fnv1a_ch"
57+
replication: 1
58+
azs: ["z2", "z3"] #<- Error: "z2 is already used by cluster `cluster1`"
59+
```
60+
61+
You need to deploy at least **#azs * 2** `go-carbon` instances. This is due to a limitation in the current implementation of `buckytools` which does not support clusters formed by a single instance.
1062

1163
## Usage
1264

@@ -15,71 +67,110 @@ section, or using the `yml` file in the `releases` folder.
1567

1668
This release makes use of [Bosh links](https://bosh.io/docs/links.html) between
1769
instance groups in order to setup automatically the carbon relays and the carbonzippers
18-
(for carbon API). This an example of V2 manifest:
70+
(for carbon API). This an example of V2 manifest (for google cloud):
1971

2072
```
2173
---
74+
---
2275
name: go-graphite-boshrelease
23-
# replace with `bosh status --uuid`
24-
director_uuid: CHANGE_ME
76+
director_uuid: 01f1714f-0550-44c9-b024-20a738e79212
2577
2678
releases:
27-
- name: go-graphite
79+
- name: go-graphite-boshrelease
2880
version: latest
2981
3082
stemcells:
3183
- alias: trusty
32-
name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
33-
version: latest
84+
name: bosh-google-kvm-ubuntu-trusty-go_agent
85+
version: 3312.6
3486
3587
instance_groups:
36-
- name: test
37-
instances: 2
38-
vm_type: small
88+
- name: smoke_tests
89+
instances: 1
90+
vm_type: common
3991
stemcell: trusty
92+
lifecycle: errand
4093
vm_extensions: []
41-
azs:
42-
- Online_Prod
94+
azs: [z1, z2]
95+
networks:
96+
- name: tools
97+
jobs:
98+
- name: smoke-tests
99+
release: go-graphite-boshrelease
100+
properties:
101+
smoke_tests:
102+
api_host: "10.255.3.251"
103+
api_port: 10000
104+
host: "10.255.3.250"
105+
port: 2003
106+
tcp_enabled: true
107+
udp_enabled: false
108+
109+
- name: graphite-backend
110+
instances: 4
111+
persistent_disk_pool: graphite-disks
112+
vm_type: graphite-backend
113+
stemcell: trusty
114+
vm_extensions: [graphite-api-europe-west1-backend-service]
115+
azs: [z1, z2]
43116
networks:
44-
- name: online_tools
117+
- name: tools
45118
jobs:
46119
- name: go-carbon
47-
release: go-graphite
120+
release: go-graphite-boshrelease
48121
properties:
49122
go-carbon:
50123
tcp_listen: 2030
51124
schemas:
52125
- name: stats
53126
pattern: '^stats\..*'
54127
retentions: '10:8d'
55-
- name: netapp
56-
pattern: '^netapp\..*'
57-
retentions: '60s:14d'
58-
retentions: '60s:1d,600s:8d'
59128
- name: default
60129
pattern: '.*'
61130
retentions: '60s:14d'
62131
aggregations:
63-
- name: anura_counts_stats_sum
64-
pattern: '^stats_counts\.services\.anura\..*\.live\.event\..*\.sum$'
132+
- name: team1_stats_sum
133+
pattern: '^stats\.services\.team1\..*\.live\.event\..*\.sum$'
134+
aggregationMethod: sum
135+
xFilesFactor: 0.0
136+
- name: team1_counts_stats_sum
137+
pattern: '^stats_counts\.services\.team1\..*\.live\.event\..*\.sum$'
65138
aggregationMethod: sum
66139
xFilesFactor: 0.0
67-
udp:
68-
enabled: true
69-
port: 2030
70140
carbonserver:
71141
enabled: true
72142
port: 8080
73143
host: "0.0.0.0"
74-
read_timeout: "50s"
75-
write_timeout: "50s"
144+
76145
- name: carbonzipper
77146
release: go-graphite-boshrelease
78147
properties:
79148
carbonzipper:
80149
port: 9090
81-
backends:
82-
- "http://127.0.0.1:8080"
150+
151+
- name: carbonapi
152+
release: go-graphite-boshrelease
153+
properties:
154+
carbonapi:
155+
port: 10000
156+
157+
- name: statsd
158+
release: go-graphite-boshrelease
159+
properties:
160+
statsd:
161+
graphiteHost: "10.255.3.250"
162+
graphitePort: 2003
163+
percentThreshold: [90, 95, 99]
164+
165+
- name: carbon-c-relay
166+
instances: 2
167+
vm_type: graphite-relay
168+
vm_extensions: [graphite-europe-west1-backend-service]
169+
stemcell: trusty
170+
azs: [z1, z2]
171+
networks:
172+
- name: tools
173+
jobs:
83174
- name: carbon-c-relay
84175
release: go-graphite-boshrelease
85176
properties:
@@ -88,43 +179,25 @@ instance_groups:
88179
- name: "cluster1"
89180
lb: "jump_fnv1a_ch"
90181
replication: 1
91-
instances: [0, 2]
182+
azs: ["z1"]
92183
- name: "cluster2"
93184
lb: "jump_fnv1a_ch"
94185
replication: 1
95-
instances: [1, 3]
96-
backends:
97-
- host: localhost
98-
port: 2030
99-
100-
- name: smoke_tests
101-
instances: 1
102-
vm_type: small
103-
stemcell: trusty
104-
lifecycle: errand
105-
vm_extensions: []
106-
azs:
107-
- Online_Prod
108-
networks:
109-
- name: online_tools
110-
jobs:
111-
- name: smoke-tests
112-
release: go-graphite
186+
azs: ["z2"]
187+
- name: statsrelay
188+
release: go-graphite-boshrelease
113189
properties:
114-
smoke_tests:
115-
api_host: CHANGE_ME
116-
api_port: 80
117-
host: CHANGE_ME
118-
port: 2003
119-
tcp_enabled: true
120-
udp_enabled: false
190+
statsrelay:
191+
port: 8125
121192
193+
# recommend serial True if there are a lot of nodes (TODO)
122194
update:
123195
canaries: 1
124196
max_in_flight: 1
125-
serial: false
197+
serial: true
126198
canary_watch_time: 1000-60000
127199
update_watch_time: 1000-60000
200+
128201
```
129202

130203
For [bosh-lite](https://github.com/cloudfoundry/bosh-lite), you can quickly create a deployment manifest & deploy a cluster:

0 commit comments

Comments
 (0)