From fa70f85acbcf9f19ea298cb19b99e3724dd97302 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 11 Sep 2018 20:28:59 +0200 Subject: [PATCH] solr global --- .../.solr.in.sh => lxc/usr/bin/solr.in.sh} | 0 solr/lxcfile | 8 ++- solr/setup.sh | 3 +- solr/setup/srv/solr/data/solr.xml | 53 ------------------- 4 files changed, 7 insertions(+), 57 deletions(-) rename solr/{setup/srv/solr/data/.solr.in.sh => lxc/usr/bin/solr.in.sh} (100%) delete mode 100644 solr/setup/srv/solr/data/solr.xml diff --git a/solr/setup/srv/solr/data/.solr.in.sh b/solr/lxc/usr/bin/solr.in.sh similarity index 100% rename from solr/setup/srv/solr/data/.solr.in.sh rename to solr/lxc/usr/bin/solr.in.sh diff --git a/solr/lxcfile b/solr/lxcfile index 44a6d5b..8e2eab8 100644 --- a/solr/lxcfile +++ b/solr/lxcfile @@ -16,10 +16,14 @@ SCRIPT addgroup -S -g 8983 solr adduser -S -u 8983 -h /var/lib/solr -s /bin/false -g solr -G solr solr chown -R solr:solr /opt/solr + + # Make start/stop script visible globally (also defines directory for solr.in.sh) + ln -s /opt/solr/bin/solr /usr/bin/solr RUN +COPY lxc + MOUNT /srv/solr/data var/lib/solr USER 8983 8983 -ENV HOME /var/lib/solr -CMD /opt/solr/bin/solr start -f +CMD /usr/bin/solr start -f diff --git a/solr/setup.sh b/solr/setup.sh index f66820f..a22e972 100755 --- a/solr/setup.sh +++ b/solr/setup.sh @@ -5,8 +5,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup # Configure Solr mkdir -p /srv/solr/data -cp ${SOURCE_DIR}/srv/solr/data/solr.xml /srv/solr/data/solr.xml -cp ${SOURCE_DIR}/srv/solr/data/.solr.in.sh /srv/solr/data/.solr.in.sh +cp /var/lib/lxc/solr/solr/opt/solr/server/solr/solr.xml /srv/solr/data/solr.xml chown -R 8983:8983 /srv/solr/data # Install service diff --git a/solr/setup/srv/solr/data/solr.xml b/solr/setup/srv/solr/data/solr.xml deleted file mode 100644 index 68b15ba..0000000 --- a/solr/setup/srv/solr/data/solr.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - ${host:} - ${jetty.port:8983} - ${hostContext:solr} - - ${genericCoreNodeNames:true} - - ${zkClientTimeout:30000} - ${distribUpdateSoTimeout:600000} - ${distribUpdateConnTimeout:60000} - ${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider} - ${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider} - - - - - ${socketTimeout:600000} - ${connTimeout:60000} - - -