-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Upgrade Solr version to 9.7.0 and other dependencies #59
base: master
Are you sure you want to change the base?
Conversation
Nowadays, those two Solr Docker images don’t just a differ by their base Docker image, they don’t provide the same Solr binary package. The full version includes first-party Solr modules such as `prometheus-exporter`. Reference: https://solr.apache.org/guide/solr/9_6/deployment-guide/solr-in-docker.html#available-images
Upgrade both Docker base image and Maven dependencies. A noticeable upgrade in library dependencies is Lucene 9.10.0. References: - https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-9.html#solr-9-6 - https://solr.apache.org/docs/9_6_0/changes/Changes.html - https://solr.apache.org/docs/9_6_1/changes/Changes.html
Upgrade both Docker base image and Maven dependencies. A noticeable upgrade in library dependencies is Lucene 9.11.1. References: - https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-9.html#solr-9-7 - https://solr.apache.org/docs/9_7_0/changes/Changes.html
It was probably useful to skip and continue during development, but it is safer to exit for any error when used in production. It additionally captures errors from subshells and pipes.
The configuration file `solr.xml` was installed under the directory `/var/solr/data` in the image, however this directory is actually bound to a volume using Docker Compose. This patch is threefold: 1. It copies the whole content of `mbsssss` to the image, under a directory never looked after by Solr, to help with uploading configsets later on. 2. It adds an init script that runs on container startup and installs the configuration file if missing under the directory `$SOLR_HOME` (`/var/solr/data`). 3. It fixes creating the directory `/var/solr/data` in the image as it is used for mounting volume. It would otherwise be created with the ownership `root:root` thus failing startup with the following error: /opt/solr/docker/scripts/solr-foreground: running /docker-entrypoint-initdb.d/10-install-musicbrainz-conf.sh Installing Solr configuration file... install: cannot create regular file '/var/solr/data/solr.xml': Permission denied
Some directories under `/var/solr` were created in the image, and only `/var/solr/data` was mounted to a Docker volume. However, the directories under `/var/solr` are supposed to be created by the script `init-var-solr`, they include logs too, and the only example of Docker volume given in Solr documentation is bound to `/var/solr`. This patch follows the documentation so as to simplify the Docker image, to avoid directory ownership issues, and to persistently keep Solr logs. Reference: https://solr.apache.org/guide/solr/9_7/deployment-guide/solr-in-docker.html#docker-compose
1. Install the command `zip` needed by the script 2. Install the script under a directory part of `$PATH` 3. Make the script use the copy of `mbsssss` from the image
To speed up the container startup, zip the Musicbrainz Solr configsets directly in the image so that it doesn’t need to be zipped at run time. The script is still able to zip configsets if needed for development.
These scripts are distributed within the Solr Docker image but they do not support the SolrCloud mode. The intend of copying these is to make a derived version to support initializing a Solr instance in SolrCloud mode using the MusicBrainz Simple Solr Search Server Schema (mbsssss). * start-local-solrcloud is copied from start-local-solr * start-musicbrainz-solrcloud is copied from start-create The license file is updated accordingly with the Apache License 2.0.
Previously, it started locally in standalone mode.
Previously, the script was creating a core in standalone mode.
It assumes that there is no data. To test, run the following commands: docker compose down --volumes docker compose build docker compose up
Thanks for the script @amCap1712. I fixed a few things, including the mounted data volume, and derived your script and Solr helper scripts to create collections on container startup. See the last commit message. |
The replica activation is otherwise asynchronous. Reference: https://solr.apache.org/guide/solr/9_7/deployment-guide/collection-management.html#create-parameters
I built an image tagged |
Upgrade Solr version from 9.6.1 to 9.7.0 released in September (noticeably upgrading Lucene version to 9.11.1).
For references, please see commit message.
It follows the pull request #58.
Besides, it has been checked that neither
mmd-schema
normbsssss
need any update to work with this new version.