forked from flavienbwk/opensearch-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.hot-warm.yml
337 lines (326 loc) · 14 KB
/
docker-compose.hot-warm.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
services:
# Coordinating node (dedicated)
# Kind of load-balancer for your cluster. Formerly "client nodes".
# Delegates client requests to the shards on the data nodes,
# collects and aggregates the results into one final result,
# and sends this result back to the client.
# Needs : heavy CPU, medium memory
os00:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os00
node.roles: ''
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os00/os00.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os00/os00.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os00/os00.key
plugins.security.ssl.http.pemcert_filepath: certificates/os00/os00.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data0:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
# Master node (dedicated)
# Manages the overall operation of a cluster and keeps track of
# the cluster state.
# Three dedicated master nodes in three different zones is the
# right approach for almost all production use cases.
# 3 dedicated master nodes in 3 different zones is the right approach,
# Here, we don't do that because we're on 1 machine only.
# Master node should not be exposed. Coordinating or ingest nodes can be.
# Needs : low CPU, low memory
os01:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os01
node.roles: 'master'
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os01/os01.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os01/os01.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os01/os01.key
plugins.security.ssl.http.pemcert_filepath: certificates/os01/os01.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data1:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
# Ingest & Data (hot) node
# Ingest : Preprocesses data before storing it in the cluster.
# Data : Stores and searches data. Performs all data-related
# operations (indexing, searching, aggregating) on local shards.
# It is fine to mix both because we're using only 1 server for this cluster.
# If you ingest a lot of data, expose a dedicated ingest node.
# Needs : medium CPU, heavy memory, high-speed storage
os02:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os02
node.roles: 'ingest, data'
node.attr.temp: hot
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os02/os02.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os02/os02.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os02/os02.key
plugins.security.ssl.http.pemcert_filepath: certificates/os02/os02.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data2:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
# Ingest & Data (hot) node
# Ingest : Preprocesses data before storing it in the cluster.
# Data : Stores and searches data. Performs all data-related
# operations (indexing, searching, aggregating) on local shards.
# It is fine to mix both because we're using only 1 server for this cluster.
# If you ingest a lot of data, expose a dedicated ingest node.
# Needs : medium CPU, heavy memory, high-speed storage
os03:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os03
node.roles: 'ingest, data'
node.attr.temp: hot
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os03/os03.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os03/os03.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os03/os03.key
plugins.security.ssl.http.pemcert_filepath: certificates/os03/os03.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data3:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
# Ingest & Data (hot) node
# Ingest : Preprocesses data before storing it in the cluster.
# Data : Stores and searches data. Performs all data-related
# operations (indexing, searching, aggregating) on local shards.
# It is fine to mix both because we're using only 1 server for this cluster.
# If you ingest a lot of data, expose a dedicated ingest node.
# Needs : medium CPU, heavy memory, high-speed storage
os04:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os04
node.roles: 'ingest, data'
node.attr.temp: hot
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os04/os04.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os04/os04.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os04/os04.key
plugins.security.ssl.http.pemcert_filepath: certificates/os04/os04.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data4:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
# Data (warm) node
# Ingest : Preprocesses data before storing it in the cluster.
# Data : Stores and searches data. Performs all data-related
# operations (indexing, searching, aggregating) on local shards.
# Needs : lower-speed CPU, heavy memory, lower-speed storage
os05:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os05
node.roles: 'data'
node.attr.temp: warm
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os05/os05.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os05/os05.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os05/os05.key
plugins.security.ssl.http.pemcert_filepath: certificates/os05/os05.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data5:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
# Data (warm) node
# Ingest : Preprocesses data before storing it in the cluster.
# Data : Stores and searches data. Performs all data-related
# operations (indexing, searching, aggregating) on local shards.
# Needs : lower-speed CPU, heavy memory, lower-speed storage
os06:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os06
node.roles: 'data'
node.attr.temp: warm
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os06/os06.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os06/os06.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os06/os06.key
plugins.security.ssl.http.pemcert_filepath: certificates/os06/os06.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data6:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
# Data (warm) node
# Ingest : Preprocesses data before storing it in the cluster.
# Data : Stores and searches data. Performs all data-related
# operations (indexing, searching, aggregating) on local shards.
# Needs : lower-speed CPU, heavy memory, lower-speed storage
os07:
restart: always
image: opensearchproject/opensearch:2.16.0
environment:
OPENSEARCH_JAVA_OPTS: "-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
node.name: os07
node.roles: 'data'
node.attr.temp: warm
discovery.seed_hosts: os00,os01,os02,os03,os04,os05,os06,os07
cluster.initial_master_nodes: os01
plugins.security.ssl.transport.pemkey_filepath: certificates/os07/os07.key # relative path
plugins.security.ssl.transport.pemcert_filepath: certificates/os07/os07.pem
plugins.security.ssl.http.pemkey_filepath: certificates/os07/os07.key
plugins.security.ssl.http.pemcert_filepath: certificates/os07/os07.pem
DISABLE_INSTALL_DEMO_CONFIG: "true"
JAVA_HOME: /usr/share/opensearch/jdk
bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping
network.host: "0.0.0.0"
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
volumes:
- "./opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
- "os-data7:/usr/share/opensearch/data"
- "./certs:/usr/share/opensearch/config/certificates:ro"
kibana:
restart: always
image: opensearchproject/opensearch-dashboards:2.16.0
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
environment:
OPENSEARCH_HOSTS: '["https://os00:9200","https://os01:9200","https://os02:9200","https://os03:9200","https://os04:9200","https://os05:9200","https://os06:9200","https://os07:9200"]' # must be a string with no spaces when specified as an environment variable
DISABLE_INSTALL_DEMO_CONFIG: "true"
volumes:
- "./certs:/usr/share/opensearch-dashboards/config/certificates:ro"
- "./opensearch-dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml"
ports:
- 5601:5601
volumes:
os-data0:
os-data1:
os-data2:
os-data3:
os-data4:
os-data5:
os-data6:
os-data7: