-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathvirtual-machine.yml
429 lines (428 loc) · 12.9 KB
/
virtual-machine.yml
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: default
specification:
name: SET_BY_AUTOMATION
cluster_name: SET_BY_AUTOMATION
component_key: SET_BY_AUTOMATION
image_id: SET_BY_AUTOMATION
key_name: SET_BY_AUTOMATION
subnet_name: SET_BY_AUTOMATION
associate_public_ip: SET_BY_AUTOMATION
use_network_security_groups: SET_BY_AUTOMATION
availability_zone: SET_BY_AUTOMATION
security_groups: [] # SET_BY_AUTOMATION
authorized_to_efs: false
mount_efs: false
size: t2.micro
os_full_name: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20231004
os_type: linux
ebs_optimized: false
tags: []
disks:
root: # Updating this section on existing machine will cause resource replacement
volume_type: gp2
volume_size: 30
delete_on_termination: true
encrypted: true
additional_disks: []
# - device_name: "/dev/sdb"
# volume_type: gp2
# volume_size: 60
# delete_on_termination: true
# encrypted: true
security:
rules:
- name: ssh
description: Allow SSH
direction: Inbound
protocol: Tcp
destination_port_range: "22"
source_address_prefix: "0.0.0.0/0"
destination_address_prefix: "0.0.0.0/0"
- name: node_exporter
description: Allow node_exporter traffic
direction: Inbound
protocol: Tcp
destination_port_range: "9100"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: out
description: Allow out
direction: Egress
protocol: "all"
destination_port_range: "0"
source_address_prefix: "0.0.0.0/0"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: rabbitmq-machine
specification:
size: t3.micro
os_type: linux
security:
rules:
- _merge: true
- name: rabbitmq
description: Allow rabbitmq traffic
direction: Inbound
protocol: Tcp
destination_port_range: "5672"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: rabbitmq_clustering_1
description: Allow rabbitmq clustering traffic 1
direction: Inbound
protocol: Tcp
destination_port_range: "4369"
source_address_prefix: "10.1.8.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: rabbitmq_clustering_2
description: Allow rabbitmq clustering traffic 2
direction: Inbound
protocol: Tcp
destination_port_range: "25672"
source_address_prefix: "10.1.8.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: rabbitmq-exporter
description: Allow Prometheus for RabbitMQ data scrap
direction: Inbound
protocol: Tcp
destination_port_range: "15692"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: load-balancer-machine
specification:
size: t3.micro
os_type: linux
security:
rules:
- _merge: true
- name: haproxy_metrics
description: Allow haproxy_metrics traffic
direction: Inbound
protocol: Tcp
destination_port_range: "9101"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: kubernetes-master-machine
specification:
size: t3.medium
authorized_to_efs: true
mount_efs: true
security:
rules:
- _merge: true
- name: repository
description: Allow repository traffic
direction: Inbound
protocol: Tcp
destination_port_range: "80"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: subnet-traffic
description: Allow subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.1.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: monitoring-traffic
description: Allow monitoring subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.4.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: node-subnet-traffic
description: Allow node subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.2.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: node2-subnet-traffic
description: Allow node subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.4.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: load-balancer-subnet-traffic
description: Allow load-balancer subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.7.0/24"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: kubernetes-node-machine
specification:
size: t3.medium
authorized_to_efs: true
mount_efs: true
security:
rules:
- _merge: true
- name: subnet-traffic
description: Allow master subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.1.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: monitoring-traffic
description: Allow monitoring subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.4.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: node-subnet-traffic
description: Allow node subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.2.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: load-balancer-subnet-traffic
description: Allow load-balancer subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.7.0/24"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: kafka-machine
specification:
size: t3.medium
security:
rules:
- _merge: true
- name: kafka_exporter
description: Allow kafka exporter traffic
direction: Inbound
protocol: Tcp
destination_port_range: "9308"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: zookeeper1
description: Allow Zookeeper 1
direction: Inbound
protocol: "Tcp"
destination_port_range: "3888"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: zookeeper2
description: Allow Zookeeper 2
direction: Inbound
protocol: "Tcp"
destination_port_range: "2888"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: zookeeper_client
description: Allow Zookeeper Client
direction: Inbound
protocol: "Tcp"
destination_port_range: "2181"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: kafka_client_9092
description: Allow Kafka Client
direction: Inbound
protocol: "Tcp"
destination_port_range: "9092"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: kafka_ssl_client_9093
description: Allow Kafka SSL Client
direction: Inbound
protocol: "Tcp"
destination_port_range: "9093"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: monitoring-traffic
description: Allow monitoring subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.4.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: kubernetes-traffic
description: Allow Kubernetes subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.1.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: kubernetes-traffic2
description: Allow Kubernetes subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.2.0/24"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: monitoring-machine
specification:
size: t3.medium
security:
rules:
- _merge: true
- name: prometheus
description: Allow connection to Prometheus
direction: Inbound
protocol: Tcp
destination_port_range: "9090"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: grafana
description: Allow connection to Grafana
direction: Inbound
protocol: Tcp
destination_port_range: "3000"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: postgresql-machine
specification:
size: t3.medium
security:
rules:
- _merge: true
- name: postgres_exporter
description: Allow postgres exporter traffic
direction: Inbound
protocol: Tcp
destination_port_range: "9187"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: kubernetes-traffic
description: Allow Kubernetes subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.1.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: kubernetes-traffic2
description: Allow Kubernetes subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.2.0/24"
destination_address_prefix: "0.0.0.0/0"
- name: postgres_clustering
description: Allow Postgres clustering traffic
direction: Inbound
protocol: Tcp
destination_port_range: "5432"
source_address_prefix: "10.1.6.0/24"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: logging-machine
specification:
size: t3.large
security:
rules:
- _merge: true
- name: Elastic
description: Allow Elastic
direction: Inbound
protocol: "Tcp"
destination_port_range: "9200"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: Elastic2
description: Allow Elastic
direction: Inbound
protocol: "Tcp"
destination_port_range: "9300"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: OpenSearchDashboards
description: Allow OpenSearch Dashboards
direction: Inbound
protocol: "Tcp"
destination_port_range: "5601"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: single-machine
specification:
size: t3.xlarge
authorized_to_efs: true
mount_efs: true
security:
rules:
- _merge: true
- name: repository
description: Allow repository traffic
direction: Inbound
protocol: Tcp
destination_port_range: "80"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: subnet-traffic
description: Allow subnet traffic
direction: Inbound
protocol: ALL
destination_port_range: "0"
source_address_prefix: "10.1.1.0/24"
destination_address_prefix: "0.0.0.0/0"
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: aws
name: repository-machine
specification:
disks:
root:
volume_size: 64
size: t2.medium
security:
rules:
- _merge: true
- name: repository
description: Allow repository traffic
direction: Inbound
protocol: Tcp
destination_port_range: "80"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"
- name: image_registry
description: Allow image registry traffic
direction: Inbound
protocol: Tcp
destination_port_range: "5000"
source_address_prefix: "10.1.0.0/20"
destination_address_prefix: "0.0.0.0/0"