forked from mcascallares/es-demo-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
235 lines (233 loc) · 6.64 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
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
version: "2"
volumes:
esbackup:
esdata01:
esdata02:
esdata03:
esdata04:
esdata05:
esmonitor:
services:
elasticsearch:
container_name: elasticsearch
extends:
file: common.yml
service: elastic
command:
- elasticsearch
- -Des.node.name=elasticsearch
- -Des.node.master=false
- -Des.node.data=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
ports:
- "9200:9200"
data01:
container_name: data01
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=data01
- -Des.node.master=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
- --node.box_type=ssd
- --node.container=docker
ports:
- "9201:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
- esdata01:/usr/share/elasticsearch/data
data02:
container_name: data02
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=data02
- -Des.node.master=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
- --node.box_type=ssd
- --node.container=docker
ports:
- "9202:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
- esdata02:/usr/share/elasticsearch/data
data03:
container_name: data03
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=data03
- -Des.node.master=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
- --node.box_type=spinning
- --node.container=docker
ports:
- "9203:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
- esdata03:/usr/share/elasticsearch/data
data04:
container_name: data04
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=data04
- -Des.node.master=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
- --node.box_type=spinning
- --node.container=docker
ports:
- "9204:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
- esdata04:/usr/share/elasticsearch/data
data05:
container_name: data05
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=data05
- -Des.node.master=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
- --node.box_type=spinning
- --node.container=docker
ports:
- "19205:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
- esdata05:/usr/share/elasticsearch/data
master01:
container_name: master01
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=master01
- -Des.node.data=false
- -Des.node.client=false
- -Des.discovery.zen.ping.unicast.hosts=master02,master03
- -Des.discovery.zen.minimum_master_nodes=2
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
ports:
- "9210:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
master02:
container_name: master02
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=master02
- -Des.node.data=false
- -Des.node.client=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master03
- -Des.discovery.zen.minimum_master_nodes=2
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
ports:
- "9211:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
master03:
container_name: master03
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.node.name=master03
- -Des.node.data=false
- -Des.node.client=false
- -Des.discovery.zen.ping.unicast.hosts=master01,master02
- -Des.discovery.zen.minimum_master_nodes=2
- -Des.network.host=_eth0_
- -Des.path.repo=/usr/share/elasticsearch/esbackup
ports:
- "19212:9200"
volumes:
- esbackup:/usr/share/elasticsearch/esbackup
monitor:
container_name: monitor
extends:
file: common.yml
service: elastic
command:
- /bin/chown elasticsearch:elasticsearch /usr/share/elasticsearch/esbackup
command:
- elasticsearch
- -Des.cluster.name=monitor
- -Des.node.name=monitor
- -Des.node.master=true
- -Des.discovery.zen.ping.unicast.hosts=master01,master02,master03
- -Des.network.host=_eth0_
ports:
- "29200:9200"
volumes:
- esmonitor:/usr/share/elasticsearch/data
mkibana:
container_name: mkibana
build: images/kibana
command: kibana --elasticsearch 'http://monitor:9200'
depends_on:
- elasticsearch
ports:
- "15601:5601"
kibana:
container_name: kibana
build: images/kibana
command: kibana --elasticsearch 'http://elasticsearch:9200'
depends_on:
- elasticsearch
ports:
- "5601:5601"
dockerbeat:
container_name: dockerbeat
build: images/dockerbeat
environment:
ELASTICSEARCH_HOST: elasticsearch
ELASTICSEARCH_PORT: 9200
depends_on:
- elasticsearch
volumes:
- /var/run/docker.sock:/var/run/docker.sock