-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (52 loc) · 2.83 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
version: "3.2"
services:
zk1:
image: jplock/zookeeper:3.4.13
ports:
- "2181:2181"
solr1:
build: solr-kerberos
ports:
- "18983:8983"
- "4000:4000"
volumes:
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
- ./keytabs:/tmp/keytabs-tmp
- ./krb5.conf:/etc/krb5.conf
- ./jaas-client.conf:/tmp/tmp-jaas.conf
- ./security.json:/tmp/security.json
# - ./solr-core-8.1.2-SNAPSHOT.jar:/opt/solr-8.1.1/dist/solr-core-8.1.1.jar
# - ./solr-core-8.1.2-SNAPSHOT.jar:/opt/solr-8.1.1/server/solr-webapp/webapp/WEB-INF/lib/solr-core-8.1.1.jar
command: >
/bin/bash -c 'cp /tmp/tmp-jaas.conf /tmp/jaas-client.conf
&& cp /tmp/keytabs-tmp /tmp/keytabs
&& chmod 777 /tmp/keytabs
&& export SOLR_AUTH_TYPE="kerberos"
&& export SOLR_AUTHENTICATION_OPTS="-DauthenticationPlugin=org.apache.solr.security.KerberosPlugin -Djava.security.auth.login.config=/tmp/jaas-client.conf -Dsolr.kerberos.cookie.domain=solr1 -Dsolr.kerberos.cookie.portaware=true -Dsolr.kerberos.principal=HTTP/[email protected] -Dsolr.kerberos.keytab=/tmp/keytabs -Dsolr.kerberos.jaas.appname=SolrClient"
&& sed -i "s/HOSTNAME/solr1/g" /tmp/jaas-client.conf
&& /usr/bin/wait-for-it.sh -h zk1 -p 2181 -t 0
&& sh server/scripts/cloud-scripts/zkcli.sh -z zk1:2181 -cmd putfile /security.json /tmp/security.json
&& /opt/solr/bin/solr -c -f -a "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n" -Dhost=solr1 -z zk1:2181'
solr2:
build: solr-kerberos
ports:
- "5000:4000"
volumes:
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
- ./keytabs:/tmp/keytabs-tmp
- ./krb5.conf:/etc/krb5.conf
- ./jaas-client.conf:/tmp/tmp-jaas.conf
# - ./solr-core-8.1.2-SNAPSHOT.jar:/opt/solr-8.1.1/dist/solr-core-8.1.1.jar
# - ./solr-core-8.1.2-SNAPSHOT.jar:/opt/solr-8.1.1/server/solr-webapp/webapp/WEB-INF/lib/solr-core-8.1.1.jar
command: >
/bin/bash -c 'cp /tmp/tmp-jaas.conf /tmp/jaas-client.conf
&& cp /tmp/keytabs-tmp /tmp/keytabs
&& chmod 777 /tmp/keytabs
&& export SOLR_AUTH_TYPE="kerberos"
&& export SOLR_AUTHENTICATION_OPTS="-DauthenticationPlugin=org.apache.solr.security.KerberosPlugin -Djava.security.auth.login.config=/tmp/jaas-client.conf -Dsolr.kerberos.cookie.domain=solr2 -Dsolr.kerberos.cookie.portaware=true -Dsolr.kerberos.principal=HTTP/[email protected] -Dsolr.kerberos.keytab=/tmp/keytabs -Dsolr.kerberos.jaas.appname=SolrClient"
&& sed -i "s/HOSTNAME/solr2/g" /tmp/jaas-client.conf
&& /usr/bin/wait-for-it.sh -h zk1 -p 2181 -t 0
&& /opt/solr/bin/solr -c -f -a "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n" -Dhost=solr2 -z zk1:2181'
kdc:
image: kdc
command: /bin/bash -c "service krb5-kdc start; service krb5-admin-server start; service ssh start; tail -f /dev/null"