This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
swarm-solr-cloud.yml
205 lines (195 loc) · 4.64 KB
/
swarm-solr-cloud.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
version: '3.7'
networks:
basnet:
external: true
services:
zookeeper1:
image: zookeeper:3.4.14
restart: always
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zookeeper2:2888:3888
volumes:
- data_zookeeper1:/data
- data_zookeeperlog1:/datalog
networks:
- basnet
ports:
- target: 2181
published: 2181
protocol: tcp
mode: host
- target: 2888
published: 2888
protocol: tcp
mode: host
- target: 3888
published: 3888
protocol: tcp
mode: host
deploy:
placement:
constraints: [node.hostname == live-solr-1]
zookeeper2:
image: zookeeper:3.4.14
restart: always
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zookeeper1:2888:3888 server.2=0.0.0.0:2888:3888
volumes:
- data_zookeeper2:/data
- data_zookeeperlog2:/datalog
networks:
- basnet
ports:
- target: 2181
published: 2181
protocol: tcp
mode: host
- target: 2888
published: 2888
protocol: tcp
mode: host
- target: 3888
published: 3888
protocol: tcp
mode: host
deploy:
placement:
constraints: [node.hostname == live-solr-2]
solr1:
image: bioatlas/ala-solrcloud:v0.1
restart: always
environment:
SOLR_HEAP: 12g
ZK_HOST: zookeeper1:2181
SOLR_HOST: solr1
SOLR_OPTS: -Dlog4j2.formatMsgNoLookups=true
volumes:
- data_solr1:/opt/solr
networks:
- basnet
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.hostname == live-solr-1]
solr2:
image: bioatlas/ala-solrcloud:v0.1
restart: always
environment:
SOLR_HEAP: 12g
ZK_HOST: zookeeper2:2181
SOLR_HOST: solr2
SOLR_OPTS: -Dlog4j2.formatMsgNoLookups=true
volumes:
- data_solr2:/opt/solr
networks:
- basnet
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.hostname == live-solr-2]
solr3:
image: bioatlas/ala-solrcloud:v0.1
restart: always
environment:
SOLR_HEAP: 12g
ZK_HOST: zookeeper1:2181
SOLR_HOST: solr3
SOLR_OPTS: -Dlog4j2.formatMsgNoLookups=true
volumes:
- data_solr3:/opt/solr
networks:
- basnet
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.hostname == live-solr-3]
solr4:
image: bioatlas/ala-solrcloud:v0.1
restart: always
environment:
SOLR_HEAP: 12g
ZK_HOST: zookeeper2:2181
SOLR_HOST: solr4
SOLR_OPTS: -Dlog4j2.formatMsgNoLookups=true
volumes:
- data_solr4:/opt/solr
networks:
- basnet
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.hostname == live-solr-4]
# create-collection:
# image: solr:7.7.2-slim
# environment:
# - SOLR_HOST=solr1
# volumes:
# - ./solrcloud/mycores/biocache:/opt/solr/server/solr/configsets/biocache
# entrypoint:
# - "bash"
# - "-exc"
# - "wait-for-solr.sh --max-attempts 10 --wait-seconds 5 --solr-url http://$$SOLR_HOST:8983/;
# solr zk upconfig -z zookeeper1:2181 -n biocache -d /opt/solr/server/solr/configsets/biocache/conf;
# solr create -c biocache -p 8983 -d biocache -shards 4 -replicationFactor 2;"
# networks:
# - basnet
# deploy:
# mode: replicated
# replicas: 1
# placement:
# constraints: [node.hostname == live-manager-1]
volumes:
data_zookeeper1:
driver: local
driver_opts:
type: nfs
o: nfsvers=4,addr=live-manager-1,rw
device: ":/docker_nfs/var/volumes/zookeeper1"
data_zookeeperlog1:
driver: local
driver_opts:
type: nfs
o: nfsvers=4,addr=live-manager-1,rw
device: ":/docker_nfs/var/volumes/zookeeperlog1"
data_zookeeper2:
driver: local
driver_opts:
type: nfs
o: nfsvers=4,addr=live-manager-1,rw
device: ":/docker_nfs/var/volumes/zookeeper2"
data_zookeeperlog2:
driver: local
driver_opts:
type: nfs
o: nfsvers=4,addr=live-manager-1,rw
device: ":/docker_nfs/var/volumes/zookeeperlog2"
data_solr1:
driver: local
driver_opts:
type: none
o: bind
device: "/data/solr1"
data_solr2:
driver: local
driver_opts:
type: none
o: bind
device: "/data/solr2"
data_solr3:
driver: local
driver_opts:
type: none
o: bind
device: "/data/solr3"
data_solr4:
driver: local
driver_opts:
type: none
o: bind
device: "/data/solr4"