-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (132 loc) · 3.11 KB
/
docker-compose.yml
File metadata and controls
143 lines (132 loc) · 3.11 KB
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
version: '3.8'
services:
# --- Layer 1: Cloud / Central Node ---
central_node:
build: ./central_node
container_name: central_node
environment:
- NODE_TYPE=central
- NODE_ID=main
ports:
- "5000:5000" # Access: http://localhost:5000
networks:
- edge_network
# --- Layer 2: Cluster Managers ---
cluster_1:
build: ./cluster_node
container_name: cluster_1
environment:
- NODE_TYPE=cluster_manager
- NODE_ID=1
- PARENT_NODE=central_node
ports:
- "5001:5000" # Access: http://localhost:5001
networks:
- edge_network
cluster_2:
build: ./cluster_node
container_name: cluster_2
environment:
- NODE_TYPE=cluster_manager
- NODE_ID=2
- PARENT_NODE=central_node
ports:
- "5002:5000" # Access: http://localhost:5002
networks:
- edge_network
cluster_3:
build: ./cluster_node
container_name: cluster_3
environment:
- NODE_TYPE=cluster_manager
- NODE_ID=3
- PARENT_NODE=central_node
ports:
- "5003:5000" # Access: http://localhost:5003
networks:
- edge_network
# --- Layer 3: Edge Nodes ---
# Cluster 1
edge_1_c1:
build: ./edge_node
container_name: edge_1_c1
environment:
- NODE_TYPE=edge_worker
- NODE_ID=1_c1
- PARENT_CLUSTER=cluster_1
- RESOURCES_CPU=4
- RESOURCES_RAM=8192
ports:
- "5004:5000" # Access: http://localhost:5004
networks:
- edge_network
edge_2_c1:
build: ./edge_node
container_name: edge_2_c1
environment:
- NODE_TYPE=edge_worker
- NODE_ID=2_c1
- PARENT_CLUSTER=cluster_1
- RESOURCES_CPU=2
- RESOURCES_RAM=4096
ports:
- "5005:5000" # Access: http://localhost:5005
networks:
- edge_network
# Cluster 2
edge_3_c2:
build: ./edge_node
container_name: edge_3_c2
environment:
- NODE_TYPE=edge_worker
- NODE_ID=3_c2
- PARENT_CLUSTER=cluster_2
- RESOURCES_CPU=4
- RESOURCES_RAM=8192
ports:
- "5006:5000" # Access: http://localhost:5006
networks:
- edge_network
edge_4_c2:
build: ./edge_node
container_name: edge_4_c2
environment:
- NODE_TYPE=edge_worker
- NODE_ID=4_c2
- PARENT_CLUSTER=cluster_2
- RESOURCES_CPU=2
- RESOURCES_RAM=4096
ports:
- "5007:5000" # Access: http://localhost:5007
networks:
- edge_network
# Cluster 3
edge_5_c3:
build: ./edge_node
container_name: edge_5_c3
environment:
- NODE_TYPE=edge_worker
- NODE_ID=5_c3
- PARENT_CLUSTER=cluster_3
- RESOURCES_CPU=4
- RESOURCES_RAM=8192
ports:
- "5008:5000" # Access: http://localhost:5008
networks:
- edge_network
edge_6_c3:
build: ./edge_node
container_name: edge_6_c3
environment:
- NODE_TYPE=edge_worker
- NODE_ID=6_c3
- PARENT_CLUSTER=cluster_3
- RESOURCES_CPU=2
- RESOURCES_RAM=4096
ports:
- "5009:5000" # Access: http://localhost:5009
networks:
- edge_network
networks:
edge_network:
driver: bridge