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

6633 update solr 772 #6631

Merged
merged 9 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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,12 +17,12 @@ if [ ! -e dv/deps/glassfish4dv.tgz ]; then
# assuming that folks usually have /tmp auto-clean as needed
fi

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

6 changes: 3 additions & 3 deletions conf/docker-aio/1prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# 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/7.3.1/schema*.xml testdata/
cp ../solr/7.3.1/solrconfig.xml testdata/
cp ../solr/7.3.1/updateSchemaMDB.sh testdata/
cp ../solr/7.7.2/schema*.xml testdata/
cp ../solr/7.7.2/solrconfig.xml testdata/
cp ../solr/7.7.2/updateSchemaMDB.sh testdata/
cp ../jhove/jhove.conf testdata/
cp ../jhove/jhoveConfig.xsd testdata/
cd ../../
Expand Down
8 changes: 4 additions & 4 deletions conf/docker-aio/c7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY testdata/sushi_sample_logs.json /tmp/
COPY disableipv6.conf /etc/sysctl.d/
RUN rm /etc/httpd/conf/*
COPY httpd.conf /etc/httpd/conf
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-7.3.1dv.tgz
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-7.7.2dv.tgz
RUN cd /opt ; tar zxf /tmp/dv/deps/glassfish4dv.tgz

# this copy of domain.xml is the result of running `asadmin set server.monitoring-service.module-monitoring-levels.jvm=LOW` on a default glassfish installation (aka - enable the glassfish REST monitir endpoint for the jvm`
Expand All @@ -28,9 +28,9 @@ RUN sudo -u postgres /usr/pgsql-9.6/bin/initdb -D /var/lib/pgsql/data

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

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

Expand Down
2 changes: 1 addition & 1 deletion conf/docker-aio/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export LANG=en_US.UTF-8
#sudo -u postgres /usr/bin/postgres -D /var/lib/pgsql/data &
sudo -u postgres /usr/pgsql-9.6/bin/postgres -D /var/lib/pgsql/data &
cd /opt/solr-7.3.1/
cd /opt/solr-7.7.2/
# 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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions doc/release-notes/6599-update-solr-772.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
With this release we upgrade to the latest available stable release in the
Solr 7.x branch.

We recommend a fresh installation of Solr 7.2.2 (the index will be empty)
followed by an "index all".

Before you start the "index all", Dataverse will appear to be empty because
the search results come from Solr. As indexing progresses, results will appear
until indexing is complete.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# chkconfig: 35 92 08
# description: Starts and stops Apache Solr

SOLR_DIR="/usr/local/solr/solr-7.3.1"
SOLR_DIR="/usr/local/solr/solr-7.7.2"
SOLR_COMMAND="bin/solr"
SOLR_ARGS="-m 1g -j jetty.host=127.0.0.1"
SOLR_USER=solr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ After = syslog.target network.target remote-fs.target nss-lookup.target
[Service]
User = solr
Type = forking
WorkingDirectory = /usr/local/solr/solr-7.3.1
ExecStart = /usr/local/solr/solr-7.3.1/bin/solr start -m 1g -j "jetty.host=127.0.0.1"
ExecStop = /usr/local/solr/solr-7.3.1/bin/solr stop
WorkingDirectory = /usr/local/solr/solr-7.7.2
ExecStart = /usr/local/solr/solr-7.7.2/bin/solr start -m 1g -j "jetty.host=127.0.0.1"
ExecStop = /usr/local/solr/solr-7.7.2/bin/solr stop
LimitNOFILE=65000
LimitNPROC=65000
Restart=on-failure
Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/admin/metadatacustomization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ configuration, including any enabled metadata schemas:

``curl http://localhost:8080/api/admin/index/solr/schema``

For convenience and automation you can download and consider running :download:`updateSchemaMDB.sh <../../../../conf/solr/7.3.1/updateSchemaMDB.sh>`. It uses the API endpoint above and writes schema files to the filesystem (so be sure to run it on the Solr server itself as the Unix user who owns the Solr files) and then triggers a Solr reload.
For convenience and automation you can download and consider running :download:`updateSchemaMDB.sh <../../../../conf/solr/7.7.2/updateSchemaMDB.sh>`. It uses the API endpoint above and writes schema files to the filesystem (so be sure to run it on the Solr server itself as the Unix user who owns the Solr files) and then triggers a Solr reload.

By default, it will download from Dataverse at `http://localhost:8080` and reload Solr at `http://localhost:8983`.
You may use the following environment variables with this script or mix'n'match with options:
Expand All @@ -633,13 +633,13 @@ Environment variable Option Description E
`UNBLOCK_KEY` `-u` If your installation has a blocked admin API *xyz* or */secrets/unblock.key*
endpoint, you can provide either the key itself
or a path to a keyfile
`TARGET` `-t` Provide the config directory of your Solr core */usr/local/solr/solr-7.3.1/server/solr/collection1/conf*
`TARGET` `-t` Provide the config directory of your Solr core */usr/local/solr/solr-7.7.2/server/solr/collection1/conf*
"collection1"
==================== ====== =============================================== =========================================================

See the :doc:`/installation/prerequisites/` section of the Installation Guide for a suggested location on disk for the Solr schema file.

Please note that if you are going to make a pull request updating ``conf/solr/7.3.1/schema.xml`` with fields you have added, you should first load all the custom metadata blocks in ``scripts/api/data/metadatablocks`` (including ones you don't care about) to create a complete list of fields.
Please note that if you are going to make a pull request updating ``conf/solr/7.7.2/schema.xml`` with fields you have added, you should first load all the custom metadata blocks in ``scripts/api/data/metadatablocks`` (including ones you don't care about) to create a complete list of fields.

Reloading a Metadata Block
--------------------------
Expand Down
18 changes: 9 additions & 9 deletions doc/sphinx-guides/source/developers/dev-environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ On Linux, you should just install PostgreSQL from your package manager without w
Install Solr
~~~~~~~~~~~~

`Solr <http://lucene.apache.org/solr/>`_ 7.3.1 is required.
`Solr <http://lucene.apache.org/solr/>`_ 7.7.2 is required.

To install Solr, execute the following commands:

Expand All @@ -141,27 +141,27 @@ To install Solr, execute the following commands:

``cd /usr/local/solr``

``curl -O http://archive.apache.org/dist/lucene/solr/7.3.1/solr-7.3.1.tgz``
``curl -O http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.tgz``

``tar xvfz solr-7.3.1.tgz``
``tar xvfz solr-7.7.2.tgz``

``cd solr-7.3.1/server/solr``
``cd solr-7.7.2/server/solr``

``cp -r configsets/_default collection1``

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.3.1/schema.xml``
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.7.2/schema.xml``

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.3.1/schema_dv_mdb_fields.xml``
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.7.2/schema_dv_mdb_fields.xml``

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.3.1/schema_dv_mdb_copies.xml``
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.7.2/schema_dv_mdb_copies.xml``

``mv schema*.xml collection1/conf``

``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.3.1/solrconfig.xml``
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/7.7.2/solrconfig.xml``

``mv solrconfig.xml collection1/conf/solrconfig.xml``

``cd /usr/local/solr/solr-7.3.1``
``cd /usr/local/solr/solr-7.7.2``

(Please note that the extra jetty argument below is a security measure to limit connections to Solr to only your computer. For extra security, run a firewall.)

Expand Down
14 changes: 7 additions & 7 deletions doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,19 @@ Become the ``solr`` user and then download and configure Solr::

su - solr
cd /usr/local/solr
wget https://archive.apache.org/dist/lucene/solr/7.3.1/solr-7.3.1.tgz
tar xvzf solr-7.3.1.tgz
cd solr-7.3.1
wget https://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.tgz
tar xvzf solr-7.7.2.tgz
cd solr-7.7.2
cp -r server/solr/configsets/_default server/solr/collection1

You should already have a "dvinstall.zip" file that you downloaded from https://github.com/IQSS/dataverse/releases . Unzip it into ``/tmp``. Then copy the files into place::

cp /tmp/dvinstall/schema*.xml /usr/local/solr/solr-7.3.1/server/solr/collection1/conf
cp /tmp/dvinstall/solrconfig.xml /usr/local/solr/solr-7.3.1/server/solr/collection1/conf
cp /tmp/dvinstall/schema*.xml /usr/local/solr/solr-7.7.2/server/solr/collection1/conf
cp /tmp/dvinstall/solrconfig.xml /usr/local/solr/solr-7.7.2/server/solr/collection1/conf

Note: Dataverse has customized Solr to boost results that come from certain indexed elements inside Dataverse, for example prioritizing results from Dataverses over Datasets. If you would like to remove this, edit your ``solrconfig.xml`` and remove the ``<str name="qf">`` element and its contents. If you have ideas about how this boosting could be improved, feel free to contact us through our Google Group https://groups.google.com/forum/#!forum/dataverse-dev .

Dataverse requires a change to the ``jetty.xml`` file that ships with Solr. Edit ``/usr/local/solr/solr-7.3.1/server/etc/jetty.xml`` , increasing ``requestHeaderSize`` from ``8192`` to ``102400``
Dataverse requires a change to the ``jetty.xml`` file that ships with Solr. Edit ``/usr/local/solr/solr-7.7.2/server/etc/jetty.xml`` , increasing ``requestHeaderSize`` from ``8192`` to ``102400``

Solr will warn about needing to increase the number of file descriptors and max processes in a production environment but will still run with defaults. We have increased these values to the recommended levels by adding ulimit -n 65000 to the init script, and the following to ``/etc/security/limits.conf``::

Expand All @@ -232,7 +232,7 @@ Solr launches asynchronously and attempts to use the ``lsof`` binary to watch fo

Finally, you need to tell Solr to create the core "collection1" on startup:

echo "name=collection1" > /usr/local/solr/solr-7.3.1/server/solr/collection1/core.properties
echo "name=collection1" > /usr/local/solr/solr-7.7.2/server/solr/collection1/core.properties

Solr Init Script
================
Expand Down
2 changes: 1 addition & 1 deletion downloads/download.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
curl -L -O http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
curl -L -O https://archive.apache.org/dist/lucene/solr/7.3.1/solr-7.3.1.tgz
curl -L -O https://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.tgz
curl -L -O https://search.maven.org/remotecontent?filepath=org/jboss/weld/weld-osgi-bundle/2.2.10.Final/weld-osgi-bundle-2.2.10.Final-glassfish4.jar
curl -s -L http://sourceforge.net/projects/schemaspy/files/schemaspy/SchemaSpy%205.0.0/schemaSpy_5.0.0.jar/download > schemaSpy_5.0.0.jar
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>7.3.1</version>
<version>7.7.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
8 changes: 4 additions & 4 deletions scripts/installer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ ${JHOVE_SCHEMA}: ../../conf/jhove/jhoveConfig.xsd
@mkdir -p ${INSTALLER_ZIP_DIR}
/bin/cp ../../conf/jhove/jhoveConfig.xsd ${INSTALLER_ZIP_DIR}

${SOLR_SCHEMA}: ../../conf/solr/7.3.1/schema.xml ../../conf/solr/7.3.1/schema_dv_mdb_fields.xml ../../conf/solr/7.3.1/schema_dv_mdb_copies.xml ../../conf/solr/7.3.1/updateSchemaMDB.sh
${SOLR_SCHEMA}: ../../conf/solr/7.7.2/schema.xml ../../conf/solr/7.7.2/schema_dv_mdb_fields.xml ../../conf/solr/7.7.2/schema_dv_mdb_copies.xml ../../conf/solr/7.7.2/updateSchemaMDB.sh
@echo copying Solr schema file
@mkdir -p ${INSTALLER_ZIP_DIR}
/bin/cp ../../conf/solr/7.3.1/schema*.xml ../../conf/solr/7.3.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}
/bin/cp ../../conf/solr/7.7.2/schema*.xml ../../conf/solr/7.7.2/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}

${SOLR_CONFIG}: ../../conf/solr/7.3.1/solrconfig.xml
${SOLR_CONFIG}: ../../conf/solr/7.7.2/solrconfig.xml
@echo copying Solr config file
@mkdir -p ${INSTALLER_ZIP_DIR}
/bin/cp ../../conf/solr/7.3.1/solrconfig.xml ${INSTALLER_ZIP_DIR}
/bin/cp ../../conf/solr/7.7.2/solrconfig.xml ${INSTALLER_ZIP_DIR}

${PYTHON_FILES}: README_python.txt install.py installConfig.py installGlassfish.py installUtils.py requirements.txt default.config interactive.config
@echo copying Python installer files
Expand Down
2 changes: 1 addition & 1 deletion scripts/installer/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ from conf/jhove:

jhove.conf

SOLR schema and config files, from conf/solr/7.3.1:
SOLR schema and config files, from conf/solr/7.7.2:

schema.xml
schema_dv_cmb_copies.xml
Expand Down
12 changes: 6 additions & 6 deletions scripts/vagrant/setup-solr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ SOLR_USER=solr
SOLR_HOME=/usr/local/solr
mkdir $SOLR_HOME
chown $SOLR_USER:$SOLR_USER $SOLR_HOME
su $SOLR_USER -s /bin/sh -c "cp /downloads/solr-7.3.1.tgz $SOLR_HOME"
su $SOLR_USER -s /bin/sh -c "cd $SOLR_HOME && tar xfz solr-7.3.1.tgz"
su $SOLR_USER -s /bin/sh -c "cd $SOLR_HOME/solr-7.3.1/server/solr && cp -r configsets/_default . && mv _default collection1"
su $SOLR_USER -s /bin/sh -c "cp /conf/solr/7.3.1/schema*.xml $SOLR_HOME/solr-7.3.1/server/solr/collection1/conf/"
su $SOLR_USER -s /bin/sh -c "cp /conf/solr/7.3.1/solrconfig.xml $SOLR_HOME/solr-7.3.1/server/solr/collection1/conf/solrconfig.xml"
su $SOLR_USER -s /bin/sh -c "cd $SOLR_HOME/solr-7.3.1 && bin/solr start && bin/solr create_core -c collection1 -d server/solr/collection1/conf/"
su $SOLR_USER -s /bin/sh -c "cp /downloads/solr-7.7.2.tgz $SOLR_HOME"
su $SOLR_USER -s /bin/sh -c "cd $SOLR_HOME && tar xfz solr-7.7.2.tgz"
su $SOLR_USER -s /bin/sh -c "cd $SOLR_HOME/solr-7.7.2/server/solr && cp -r configsets/_default . && mv _default collection1"
su $SOLR_USER -s /bin/sh -c "cp /conf/solr/7.7.2/schema*.xml $SOLR_HOME/solr-7.7.2/server/solr/collection1/conf/"
su $SOLR_USER -s /bin/sh -c "cp /conf/solr/7.7.2/solrconfig.xml $SOLR_HOME/solr-7.7.2/server/solr/collection1/conf/solrconfig.xml"
su $SOLR_USER -s /bin/sh -c "cd $SOLR_HOME/solr-7.7.2 && bin/solr start && bin/solr create_core -c collection1 -d server/solr/collection1/conf/"
cp /dataverse/doc/sphinx-guides/source/_static/installation/files/etc/init.d/solr /etc/init.d/solr
chmod 755 /etc/init.d/solr
/etc/init.d/solr stop
Expand Down
2 changes: 1 addition & 1 deletion scripts/vagrant/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo "Ensuring Unix user '$SOLR_USER' exists"
useradd $SOLR_USER || :
DOWNLOAD_DIR='/dataverse/downloads'
GLASSFISH_ZIP="$DOWNLOAD_DIR/glassfish-4.1.zip"
SOLR_TGZ="$DOWNLOAD_DIR/solr-7.3.1.tgz"
SOLR_TGZ="$DOWNLOAD_DIR/solr-7.7.2.tgz"
WELD_PATCH="$DOWNLOAD_DIR/weld-osgi-bundle-2.2.10.Final-glassfish4.jar"
# The CA certificate bundle files from CentOS are ok. Glassfish's are expired.
GOOD_CACERTS='/etc/pki/ca-trust/extracted/java/cacerts'
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/groupvars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ dataverse:
group: solr
root: /usr/local/solr
user: solr
version: 7.3.1
version: 7.7.2
srcdir: /tmp/dataverse
thumbnails: true
unittests:
Expand Down