-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathopentsdb_kubernetes_hbase.d2
executable file
·337 lines (321 loc) · 7.63 KB
/
opentsdb_kubernetes_hbase.d2
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
#!/usr/bin/env d2 --theme 200
#
# Author: Hari Sekhon
# Date: 2023-05-03 03:15:06 +0100 (Wed, 03 May 2023)
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# https://github.com/HariSekhon/Diagrams-as-Code
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
direction: down
title: {
label: OpenTSDB on Kubernetes and HBase
near: top-center
shape: text
style.font-size: 40
style.underline: true
}
classes: {
users: {
icon: https://icons.terrastruct.com/essentials%2F359-users.svg
# icon: https://diagrams.mingrammer.com/img/resources/onprem/client/users.png
shape: image
}
nginx: {
# icon: https://icons.terrastruct.com/dev%2Fnginx.svg
icon: https://diagrams.mingrammer.com/img/resources/onprem/network/nginx.png
shape: image
}
k8s_svc: {
icon: https://diagrams.mingrammer.com/img/resources/k8s/network/svc.png
shape: image
}
apache: {
# icon: https://diagrams.mingrammer.com/img/resources/onprem/network/apache.png
# icon: https://icons.terrastruct.com/dev%2Fapache.svg
icon: https://www.svgrepo.com/show/353400/apache.svg
# shape: image
}
grafana: {
icon: https://diagrams.mingrammer.com/img/resources/onprem/monitoring/grafana.png
shape: image
}
opentsdb: {
icon: ./images/opentsdb.png
shape: image
}
hbase: {
# icon: https://hbase.apache.org/images/hbase_logo_with_orca.png
# icon: https://hbase.apache.org/images/hbase_logo_with_orca_large.png
# icon: https://hbase.apache.org/images/jumping-orca_rotated.png
icon: https://diagrams.mingrammer.com/img/resources/onprem/database/hbase.png
shape: image
}
hadoop: {
icon: https://diagrams.mingrammer.com/img/resources/onprem/analytics/hadoop.png
shape: image
}
}
# Quants.class: users
# Devs.class: users
# DevOps.class: users
# Other users.class: users
# Quants -> k8s.Nginx Ingress Grafana
# Devs -> k8s.Nginx Ingress Grafana
# DevOps -> k8s.Nginx Ingress Grafana
# Other users -> k8s.Nginx Ingress Grafana
users: Quants, Devs, DevOps, Users
users.class: users
# users.near: top-center
k8s: Kubernetes cluster on-prem {
_.users -> Nginx Ingress Grafana: 3 million queries per day
Nginx Ingress Grafana.class: nginx
Nginx Ingress OpenTSDB.class: nginx
Grafana service.class: k8s_svc
OpenTSDB service.class: k8s_svc
Nginx Ingress Grafana -> Grafana service
Grafana service -> Grafana pod 1.Apache Httpd 1
Grafana service -> Grafana pod 2.Apache Httpd 2
TCollector metrics agents.class: opentsdb
TCollector metrics agents -> Nginx Ingress OpenTSDB -> OpenTSDB service: 9 Billion metrics ingested per day {
style.animated: true
}
Grafana pod 1: {
Apache Httpd 1.class: apache
Grafana 1.class: grafana
Apache Httpd 1 -> grafana 1: kerberos proxy
}
Grafana pod 1.Grafana 1 -> OpenTSDB service
Grafana pod 2: Grafana pod 2 {
Apache Httpd 2.class: apache
Grafana 2.class: grafana
Apache Httpd 2 -> grafana 2: kerberos proxy
}
Grafana pod 2.Grafana 2 -> OpenTSDB service
OpenTSDB service -> tsdb1
OpenTSDB service -> tsdb2
OpenTSDB service -> tsdb3
OpenTSDB service -> tsdb4
OpenTSDB service -> tsdb5
OpenTSDB service -> tsdb6
OpenTSDB service -> tsdb7
OpenTSDB service -> tsdb8
OpenTSDB service -> tsdb9
OpenTSDB service -> tsdb10
OpenTSDB service -> tsdb11
OpenTSDB service -> tsdb12
OpenTSDB service -> tsdb13
OpenTSDB service -> tsdb14
OpenTSDB service -> tsdb15
tsdb1: OpenTSDB pod1 {
class: opentsdb
}
tsdb2: OpenTSDB pod2 {
class: opentsdb
}
tsdb3: OpenTSDB pod3 {
class: opentsdb
}
tsdb4: OpenTSDB pod4 {
class: opentsdb
}
tsdb5: OpenTSDB pod5 {
class: opentsdb
}
tsdb6: OpenTSDB pod6 {
class: opentsdb
}
tsdb7: OpenTSDB pod7 {
class: opentsdb
}
tsdb8: OpenTSDB pod8 {
class: opentsdb
}
tsdb9: OpenTSDB pod9 {
class: opentsdb
}
tsdb10: OpenTSDB pod10 {
class: opentsdb
}
tsdb11: OpenTSDB pod11 {
class: opentsdb
}
tsdb12: OpenTSDB pod12 {
class: opentsdb
}
tsdb13: OpenTSDB pod13 {
class: opentsdb
}
tsdb14: OpenTSDB pod14 {
class: opentsdb
}
tsdb15: OpenTSDB pod15 {
class: opentsdb
}
# Can't connect to hadoop cluster when combined with 'near' placement control due to this ticket:
#
# https://github.com/terrastruct/d2/issues/1285
#
# tsdb1 -> _.hadoop
# tsdb2 -> _.hadoop
# tsdb3 -> _.hadoop
# tsdb4 -> _.hadoop
# tsdb5 -> _.hadoop
# tsdb6 -> _.hadoop
# tsdb7 -> _.hadoop
# tsdb8 -> _.hadoop
# tsdb9 -> _.hadoop
# tsdb10 -> _.hadoop
# tsdb11 -> _.hadoop
# tsdb12 -> _.hadoop
# tsdb13 -> _.hadoop
# tsdb14 -> _.hadoop
# tsdb15 -> _.hadoop
# tsdb1 -> _.hadoop.node 1.hbase1
# tsdb1 -> _.hadoop.node 2.hbase2
# tsdb1 -> _.hadoop.node 3.hbase3
# tsdb1 -> _.hadoop.node 4.hbase4
# tsdb1 -> _.hadoop.node 5.hbase5
# tsdb1 -> _.hadoop.node 6.hbase6
# tsdb1 -> _.hadoop.node 7.hbase7
# tsdb1 -> _.hadoop.node 8.hbase8
# tsdb1 -> _.hadoop.node 9.hbase9
# tsdb1 -> _.hadoop.node 10.hbase10
# tsdb1 -> _.hadoop.node 11.hbase11
# tsdb1 -> _.hadoop.node 12.hbase12
#
# tsdb1 -> _.hadoop.node 1.hbase1
# tsdb2 -> _.hadoop.node 2.hbase2
# tsdb2 -> _.hadoop.node 3.hbase3
# tsdb2 -> _.hadoop.node 4.hbase4
# tsdb2 -> _.hadoop.node 5.hbase5
# tsdb2 -> _.hadoop.node 6.hbase6
# tsdb2 -> _.hadoop.node 7.hbase7
# tsdb2 -> _.hadoop.node 8.hbase8
# tsdb2 -> _.hadoop.node 9.hbase9
# tsdb2 -> _.hadoop.node 10.hbase10
# tsdb2 -> _.hadoop.node 11.hbase11
# tsdb2 -> _.hadoop.node 12.hbase12
}
hadoop: Hadoop cluster on-prem {
near: bottom-center
node 1: {
hbase1: HBase 1 {
class: hbase
}
hdfs1: Hadoop HDFS 1 {
class: hadoop
}
hbase1 -> hdfs1
}
node 2: {
hbase2: HBase 2 {
class: hbase
}
hdfs2: Hadoop HDFS 2 {
class: hadoop
}
hbase2 -> hdfs2
}
node 3: {
hbase3: HBase 3 {
class: hbase
}
hdfs3: Hadoop HDFS 3 {
class: hadoop
}
hbase3 -> hdfs3
}
node 4: {
hbase4: HBase 4 {
class: hbase
}
hdfs4: Hadoop HDFS 4 {
class: hadoop
}
hbase4 -> hdfs4
}
node 5: {
hbase5: HBase 5 {
class: hbase
}
hdfs5: Hadoop HDFS 5 {
class: hadoop
}
hbase5 -> hdfs5
}
node 6: {
hbase6: HBase 6 {
class: hbase
}
hdfs6: Hadoop HDFS 6 {
class: hadoop
}
hbase6 -> hdfs6
}
node 7: {
hbase7: HBase 7 {
class: hbase
}
hdfs7: Hadoop HDFS 7 {
class: hadoop
}
hbase7 -> hdfs7
}
node 8: {
hbase8: HBase 8 {
class: hbase
}
hdfs8: Hadoop HDFS 8 {
class: hadoop
}
hbase8 -> hdfs8
}
node 9: {
hbase9: HBase 9 {
class: hbase
}
hdfs9: Hadoop HDFS 9 {
class: hadoop
}
hbase9 -> hdfs9
}
node 10: {
hbase10: HBase 10 {
class: hbase
}
hdfs10: Hadoop HDFS 10 {
class: hadoop
}
hbase10 -> hdfs10
}
node 11: {
hbase11: HBase 11 {
class: hbase
}
hdfs11: Hadoop HDFS 11 {
class: hadoop
}
hbase11 -> hdfs11
}
node 12: {
hbase12: HBase 12 {
class: hbase
}
hdfs12: Hadoop HDFS 12 {
class: hadoop
}
hbase12 -> hdfs12
}
}
# any connection under the dagre layout engine, whether from tsdb objects or the k8s container, sends the hadoop cluster off to the side, this only works in elk engine, but unfortunately the arrows don't connect in the middle of the diagram in elk engine, as per:
#
# https://github.com/terrastruct/d2/issues/1285
#
# k8s -> hadoop