Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4158 update solr #4520

Merged
merged 45 commits into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2524928
supporting solr 6.4.2 #4158
matthew-a-dunlap Oct 23, 2017
79043f7
Updating libraries that solr uses #4158
matthew-a-dunlap Oct 25, 2017
8fef67b
Newer solr seems to need the collection as part of the url #4158
matthew-a-dunlap Oct 25, 2017
f8020cd
Merge branch 'develop' into 4158-update-solr
matthew-a-dunlap Mar 14, 2018
931497d
Use solr latest version 7.2.1 #4158
matthew-a-dunlap Mar 14, 2018
f8c56ed
First chunk of guide fixes for solr 7.2.1 #4158
matthew-a-dunlap Mar 15, 2018
e52b094
Added solr 7.2.1 configuration files #4158
matthew-a-dunlap Mar 15, 2018
0895e46
solr script fixes and adding an additional document #4158
matthew-a-dunlap Mar 15, 2018
cd78b57
More documentation, cleanup, etc #4158
matthew-a-dunlap Mar 15, 2018
265e2e9
Updated init, docker, vagrant scripts for solr 7.2.1 #4158
matthew-a-dunlap Mar 16, 2018
43a7a17
Many more solr script files updated to 7.2.1 #4158
matthew-a-dunlap Mar 16, 2018
97243cd
Missed one solr 4.6.0 replacement #4158
matthew-a-dunlap Mar 16, 2018
26ccf5e
Minor solr 7.2.1 clean-up #4158
matthew-a-dunlap Mar 16, 2018
13ec9c3
4158
Mar 16, 2018
df56ef9
Merge branch 'develop' into 4158-update-solr
matthew-a-dunlap Mar 16, 2018
a31a7ec
Removing a comment #4158
matthew-a-dunlap Mar 16, 2018
12250e3
docker copy config fix solr 7.2.1 #4158
matthew-a-dunlap Mar 16, 2018
693c50a
Merge branch 'develop' into 4158-update-solr #4158
pdurbin Mar 19, 2018
0ba1059
run Solr as dedicated user in Vagrant #4158
pdurbin Mar 19, 2018
24d7d4d
set up Solr init script within Vagrant #4158
pdurbin Mar 19, 2018
00005bf
remove AutoCompleteBean.java (not used) #108
pdurbin Mar 20, 2018
b367e8a
continue to throw OaiSetException on Solr errors #4158
pdurbin Mar 20, 2018
1245f12
delete BatchIndex.java (not used) #4158
pdurbin Mar 20, 2018
c8d9d15
continue to throw SolrServerException on Solr error #4158
pdurbin Mar 20, 2018
77b5141
continue to throw SearchException on Solr error #4158
pdurbin Mar 20, 2018
f414d75
minor style fixes #4158
pdurbin Mar 20, 2018
27dc0a8
get Solr running in Docker all in one #4158
pdurbin Mar 21, 2018
b94795f
put solrconfig.xml in dvinstall.zip #4158
pdurbin Mar 21, 2018
97740ce
try to get solr 7 working in minishift/openshift #4158
pdurbin Mar 21, 2018
307ed25
update URL in "clear out solr" scripts #4158
pdurbin Mar 21, 2018
c9c758a
tweaks to the install guide docs #4158
pdurbin Mar 21, 2018
94786ff
for now, run Solr out of /tmp in openshift #4158
pdurbin Mar 22, 2018
106db3b
Changing a logging level #4158
matthew-a-dunlap Mar 22, 2018
493badf
restart glassfish to pick up solr server change #4158 #4040
pdurbin Mar 22, 2018
9ae5a21
re-added solr boosting, removed commented pom import #4518
matthew-a-dunlap Mar 22, 2018
f90e00a
Added comment about solr boosting #4158
matthew-a-dunlap Mar 22, 2018
39be0a9
Merge branch 'develop' into 4158-update-solr
matthew-a-dunlap Mar 23, 2018
41a7ea9
improve Solr docs #4158
pdurbin Mar 26, 2018
1c46b33
simplify solr setup steps in dev #4158
pdurbin Mar 26, 2018
a7fd43a
replace hard-coded "Match", look up in bundle #4158
pdurbin Mar 27, 2018
dc8476d
add test to exercise identifier basic search bug #4158
pdurbin Mar 27, 2018
d3b721e
switch from "/spell" to "/select" Solr request handler #4158
pdurbin Mar 27, 2018
4ac6613
fix wording around dvinstall.zip #4158
pdurbin Mar 27, 2018
a088d5e
fix typo ("download" missing) #4158
pdurbin Mar 27, 2018
5f67e56
Merge branch 'develop' into 4158-update-solr #4158
pdurbin Apr 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ conf/docker-aio/dv/deps/
conf/docker-aio/dv/install/dvinstall.zip
# or copy of test data
conf/docker-aio/testdata/
scripts/installer/default.config
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Welcome! New contributors should at least glance at [CONTRIBUTING.md](/CONTRIBUT

[tests]: http://guides.dataverse.org/en/latest/developers/testing.html
[SQL updates]: https://github.com/IQSS/dataverse/tree/develop/scripts/database/upgrades
[Solr updates]: https://github.com/IQSS/dataverse/blob/develop/conf/solr/4.6.0/schema.xml
[Solr updates]: https://github.com/IQSS/dataverse/blob/develop/conf/solr/7.2.1/schema.xml
[docs]: http://guides.dataverse.org/en/latest/developers/documentation.html
[branch]: http://guides.dataverse.org/en/latest/developers/branching-strategy.html
4 changes: 2 additions & 2 deletions conf/docker-aio/0prep_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ if [ ! -e dv/deps/glassfish4dv.tgz ]; then
# assuming that folks usually have /tmp auto-clean as needed
fi

if [ ! -e dv/deps/solr-4.6.0dv.tgz ]; then
if [ ! -e dv/deps/solr-7.2.1dv.tgz ]; then
echo "solr dependency prep"
# schema changes *should* be the only ones...
cd dv/deps/
wget https://archive.apache.org/dist/lucene/solr/4.6.0/solr-4.6.0.tgz -O solr-4.6.0dv.tgz
wget https://archive.apache.org/dist/lucene/solr/7.2.1/solr-7.2.1.tgz -O solr-7.2.1dv.tgz
cd ../../
fi

5 changes: 3 additions & 2 deletions conf/docker-aio/1prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export LANG="en_US.UTF-8"
# this was based off the phoenix deployment; and is likely uglier and bulkier than necessary in a perfect world

mkdir -p testdata/doc/sphinx-guides/source/_static/util/
cp ../solr/4.6.0/schema.xml testdata/
cp ../solr/7.2.1/schema.xml testdata/
cp ../solr/7.2.1/solrconfig.xml testdata/
cp ../jhove/jhove.conf testdata/
cd ../../
cp -r scripts conf/docker-aio/testdata/
Expand All @@ -15,7 +16,7 @@ cp doc/sphinx-guides/source/_static/util/createsequence.sql conf/docker-aio/test

# not using dvinstall.zip for setupIT.bash; but still used in install.bash for normal ops
mvn clean
./scripts/database/homebrew/custom-build-number
./scripts/installer/custom-build-number
mvn package
cd scripts/installer
make clean
Expand Down
8 changes: 6 additions & 2 deletions conf/docker-aio/c7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ RUN yum install -y jq
# copy and unpack dependencies (solr, glassfish)
COPY dv /tmp/dv
COPY testdata/schema.xml /tmp/dv
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-4.6.0dv.tgz
COPY testdata/solrconfig.xml /tmp/dv
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-7.2.1dv.tgz
RUN cd /opt ; tar zxf /tmp/dv/deps/glassfish4dv.tgz

RUN sudo -u postgres /usr/bin/initdb -D /var/lib/pgsql/data
#RUN sudo -u postgres createuser dvnapp

# copy configuration related files
RUN cp /tmp/dv/pg_hba.conf /var/lib/pgsql/data/ ; cp /tmp/dv/schema.xml /opt/solr-4.6.0/example/solr/collection1/conf/schema.xml
RUN cp /tmp/dv/pg_hba.conf /var/lib/pgsql/data/
RUN cp -r /opt/solr-7.2.1/server/solr/configsets/_default /opt/solr-7.2.1/server/solr/collection1
RUN cp /tmp/dv/schema.xml /opt/solr-7.2.1/server/solr/collection1/conf/schema.xml
RUN cp /tmp/dv/solrconfig.xml /opt/solr-7.2.1/server/solr/collection1/conf/solrconfig.xml

# skipping glassfish user and solr user (run both as root)

Expand Down
7 changes: 5 additions & 2 deletions conf/docker-aio/entrypoint.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env bash

sudo -u postgres /usr/bin/postgres -D /var/lib/pgsql/data &
cd /opt/solr-4.6.0/example/
java -DSTOP.PORT=8079 -DSTOP.KEY=a09df7a0d -jar start.jar &
cd /opt/solr-7.2.1/
# TODO: Run Solr as non-root and remove "-force".
bin/solr start -force
bin/solr create_core -c collection1 -d server/solr/collection1/conf -force

# TODO: Run Glassfish as non-root.
cd /opt/glassfish4
bin/asadmin start-domain
sleep infinity
Expand Down
5 changes: 2 additions & 3 deletions conf/docker-aio/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ first pass docker all-in-one image, intended for running integration tests again

Could be potentially usable for normal development as well.


Initial setup (aka - do once):
- Do surgery on glassfish4 and solr4.6.0 following guides, place results in `conf/docker-aio/dv/deps` as `glassfish4dv.tgz` and `solr-4.6.0dv.tgz` respectively. If you `cd conf/docker-aio` and run `./0prep_deps.sh` these tarballs will be constructed for you.
- `cd conf/docker-aio` and run `./0prep_deps.sh` to created Glassfish and Solr tarballs in `conf/docker-aio/dv/deps`.

Per-build:
- `cd conf/docker-aio`, and run `1prep.sh` to copy files for integration test data into docker build context; `1prep.sh` will also build the war file and installation zip file
- `cd conf/docker-aio`, and run `./1prep.sh` to copy files for integration test data into docker build context; `1prep.sh` will also build the war file and installation zip file
- build the docker image: `docker build -t dv0 -f c7.dockerfile .`

- Run image: `docker run -d -p 8083:8080 --name dv dv0` (aka - forward port 8083 locally to 8080 in the container)
Expand Down
3 changes: 3 additions & 0 deletions conf/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ docker push iqss/dataverse-solr:$TAG
# FIXME: Automate the building of dataverse.war and dvinstall.zip. Think about https://github.com/IQSS/dataverse/issues/3974 and https://github.com/IQSS/dataverse/pull/3975
cp ../../target/dataverse*.war dataverse-glassfish/dataverse.war
cp ../../scripts/installer/dvinstall.zip dataverse-glassfish
# Note that default.config needs to have the following values:
# POSTGRES_SERVER dataverse-postgresql-service
# SOLR_LOCATION dataverse-solr-service:8983
cp ../../doc/sphinx-guides/source/_static/util/default.config dataverse-glassfish
cp ../../downloads/glassfish-4.1.zip dataverse-glassfish
cp ../../downloads/weld-osgi-bundle-2.2.10.Final-glassfish4.jar dataverse-glassfish
Expand Down
24 changes: 14 additions & 10 deletions conf/docker/solr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ MAINTAINER Dataverse (support@dataverse.org)

RUN yum install -y wget unzip perl git java-1.8.0-openjdk-devel postgresql.x86_64

# Install Solr 4.6.0
# Install Solr 7.2.1
# The context of the build is the "conf" directory.
COPY solr/4.6.0/schema.xml /tmp
COPY solr/7.2.1/schema.xml /tmp
COPY solr/7.2.1/solrconfig.xml /tmp

RUN cd /tmp && wget https://archive.apache.org/dist/lucene/solr/4.6.0/solr-4.6.0.tgz && \
tar xvzf solr-4.6.0.tgz && \
mv solr-4.6.0 /usr/local/ && \
cd /usr/local/solr-4.6.0/example/solr/collection1/conf/ && \
mv schema.xml schema.xml.backup && \

RUN cd /tmp && wget https://archive.apache.org/dist/lucene/solr/7.2.1/solr-7.2.1.tgz && \
tar xvzf solr-7.2.1.tgz && \
mv solr-7.2.1 /usr/local/ && \
cp -r /usr/local/solr-7.2.1/server/solr/configsets/_default /usr/local/solr-7.2.1/server/solr/collection1 && \
cd /usr/local/solr-7.2.1/server/solr/collection1/conf/ && \
mv solrconfig.xml solrconfig.xml.backup && \
cp /tmp/schema.xml . && \
rm /tmp/solr-4.6.0.tgz
cp /tmp/solrconfig.xml . && \
rm /tmp/solr-7.2.1.tgz

RUN ln -s /usr/local/solr-4.6.0/example/logs /var/log/solr
RUN ln -s /usr/local/solr-7.2.1/server/logs /var/log/solr

VOLUME /usr/local/solr-4.6.0/example/solr/collection1/data
VOLUME /usr/local/solr-7.2.1/server/solr/collection1/data

EXPOSE 8983

Expand Down
6 changes: 4 additions & 2 deletions conf/docker/solr/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

if [ "$1" = 'solr' ]; then
cd /usr/local/solr-4.6.0/example/
java -jar start.jar
cd /usr/local/solr-7.2.1/
bin/solr start
bin/solr create_core -c collection1 -d server/solr/collection1/conf
sleep infinity
elif [ "$1" = 'usage' ]; then
echo 'docker run -d iqss/dataverse-solr solr'
else
Expand Down
3 changes: 0 additions & 3 deletions conf/solr/4.6.0/readme.me

This file was deleted.

Loading