-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
172 lines (166 loc) · 7.67 KB
/
docker-compose.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
version: '3'
services:
elasticsearch-node1:
build: ./elasticsearch-node1/elasticsearch-node1-docker
image: elasticsearch/node1
restart: unless-stopped
container_name: elasticsearch-node1
environment:
- cluster.name=elasticsearch-cluster
- node.name=elasticsearch-node1
- discovery.seed_hosts=elasticsearch-node1,elasticsearch-node2,elasticsearch-node3,elasticsearch-node4,elasticsearch-node5
- cluster.initial_master_nodes=elasticsearch-node1,elasticsearch-node2
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "ES_JAVA_OPTS=-Xms3g -Xmx3g" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- network.host=0.0.0.0
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the Elasticsearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- ./elasticsearch-node1/data1:/usr/share/elasticsearch/data
- ./supplements/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar:/usr/share/elasticsearch/plugins/opendistro_security/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar
- ./elasticsearch-node1/securityconfig:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/
#- ./supplements/performance-analyzer.properties:/usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/performance-analyzer.proper ties
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- elasticsearch-net
elasticsearch-node2:
build: ./elasticsearch-node2/elasticsearch-node2-docker
image: elasticsearch/node2
container_name: elasticsearch-node2
restart: unless-stopped
environment:
- cluster.name=elasticsearch-cluster
- node.name=elasticsearch-node2
- discovery.seed_hosts=elasticsearch-node1,elasticsearch-node2,elasticsearch-node3,elasticsearch-node4,elasticsearch-node5
- cluster.initial_master_nodes=elasticsearch-node1,elasticsearch-node2
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms3g -Xmx3g"
- network.host=0.0.0.0
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./elasticsearch-node2/data2:/usr/share/elasticsearch/data
- ./supplements/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar:/usr/share/elasticsearch/plugins/opendistro_security/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar
- ./elasticsearch-node2/securityconfig:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/
#- ./supplements/performance-analyzer.properties:/usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/performance-analyzer.properties
networks:
- elasticsearch-net
elasticsearch-node3:
build: ./elasticsearch-node3/elasticsearch-node3-docker
image: elasticsearch/node3
container_name: elasticsearch-node3
restart: unless-stopped
environment:
- cluster.name=elasticsearch-cluster
- node.name=elasticsearch-node3
- discovery.seed_hosts=elasticsearch-node1,elasticsearch-node2,elasticsearch-node3,elasticsearch-node4,elasticsearch-node5
- cluster.initial_master_nodes=elasticsearch-node1,elasticsearch-node2
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms3g -Xmx3g"
- network.host=0.0.0.0
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./elasticsearch-node3/data3:/usr/share/elasticsearch/data
- ./supplements/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar:/usr/share/elasticsearch/plugins/opendistro_security/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar
- ./elasticsearch-node3/securityconfig:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/
#- ./supplements/performance-analyzer.properties:/usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/performance-analyzer.properties
networks:
- elasticsearch-net
elasticsearch-node4:
build: ./elasticsearch-node4/elasticsearch-node4-docker
image: elasticsearch/node4
container_name: elasticsearch-node4
restart: unless-stopped
environment:
- cluster.name=elasticsearch-cluster
- node.name=elasticsearch-node4
- discovery.seed_hosts=elasticsearch-node1,elasticsearch-node2,elasticsearch-node3,elasticsearch-node4,elasticsearch-node5
- cluster.initial_master_nodes=elasticsearch-node1,elasticsearch-node2
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms3g -Xmx3g"
- network.host=0.0.0.0
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./elasticsearch-node4/data4:/usr/share/elasticsearch/data
- ./supplements/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar:/usr/share/elasticsearch/plugins/opendistro_security/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar
- ./elasticsearch-node4/securityconfig:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/
#- ./supplements/performance-analyzer.properties:/usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/performance-analyzer.properties
networks:
- elasticsearch-net
elasticsearch-node5:
build: ./elasticsearch-node5/elasticsearch-node5-docker
image: elasticsearch/node5
container_name: elasticsearch-node5
restart: unless-stopped
environment:
- cluster.name=elasticsearch-cluster
- node.name=elasticsearch-node5
- discovery.seed_hosts=elasticsearch-node1,elasticsearch-node2,elasticsearch-node3,elasticsearch-node4,elasticsearch-node5
- cluster.initial_master_nodes=elasticsearch-node1,elasticsearch-node2
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms3g -Xmx3g"
- network.host=0.0.0.0
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./elasticsearch-node5/data5:/usr/share/elasticsearch/data
- ./supplements/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar:/usr/share/elasticsearch/plugins/opendistro_security/netty-tcnative-openssl-1.1.0j-static-2.0.20.Final-fedora-linux-x86_64.jar
- ./elasticsearch-node5/securityconfig:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/
#- ./supplements/performance-analyzer.properties:/usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/performance-analyzer.properties
networks:
- elasticsearch-net
kibana:
image: amazon/opendistro-for-elasticsearch-kibana:1.9.0
container_name: kibana
restart: unless-stopped
ports:
- 5601:5601
expose:
- "5601"
environment:
ELASTICSEARCH_URL: https://elasticsearch-node1:9200
ELASTICSEARCH_HOSTS: https://elasticsearch-node1:9200
SERVER_SSL_ENABLED: "true"
SERVER_SSL_KEY: /usr/share/kibana/config/kibana-key.pem
SERVER_SSL_CERTIFICATE: /usr/share/kibana/config/kibana.pem
volumes:
#- ./configs/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
- ./ssl/root-ca.pem:/usr/share/kibana/config/root-ca.pem
- ./ssl/kibana.pem:/usr/share/kibana/config/kibana.pem
- ./ssl/kibana-key.pem:/usr/share/kibana/config/kibana-key.pem
networks:
- elasticsearch-net
volumes:
elasticsearch-data1:
elasticsearch-data2:
networks:
elasticsearch-net: