Skip to content

Commit

Permalink
Merge pull request #64 from tulibraries/update-to-solr-9.6.1
Browse files Browse the repository at this point in the history
Updates to use solrcloud 9.6.1
  • Loading branch information
dkinzer authored Jul 12, 2024
2 parents 045df26 + 6c328eb commit d9f6d6c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 45 deletions.
5 changes: 4 additions & 1 deletion .circleci/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
set -e
cd ~/project
zip -r ~/solrconfig.zip . -x .git
zip -r ~/solrconfig.zip . -x ".git*" \
Gemfile Gemfile.lock "spec/*" "vendor/*" \
Makefile ".circle*" "bin/*" LICENSE "README*" \
docker-compose.yml
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
command: make test
run_deploy:
docker:
- image: cimg/python:3.10.13
- image: cimg/python:3.12.3
environment:
PIPENV_VENV_IN_PROJECT: true
steps:
Expand Down
10 changes: 5 additions & 5 deletions .circleci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ validate_create() {
}
echo
echo "***"
echo "* Sending funcake-oai-$CIRCLE_TAG configs to SolrCloud."
echo "* Sending funcake-oai-$CIRCLE_TAG configs to solrcloud-rocky8."
echo "***"
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X POST --header "Content-Type:application/octet-stream" --data-binary @/home/circleci/solrconfig.zip "https://solrcloud.tul-infra.page/solr/admin/configs?action=UPLOAD&name=funcake-oai-$CIRCLE_TAG")
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X POST --header "Content-Type:application/octet-stream" --data-binary @/home/circleci/solrconfig.zip "https://solrcloud-rocky8.tul-infra.page/solr/admin/configs?action=UPLOAD&name=funcake-oai-$CIRCLE_TAG")
validate_status
echo
echo "***"
echo "* Creating new funcake-oai-$CIRCLE_TAG collection"
echo "***"
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X GET --header 'Accept: application/json' "https://solrcloud.tul-infra.page/solr/admin/collections?action=CREATE&name=funcake-oai-$CIRCLE_TAG-init&numShards=1&replicationFactor=2&maxShardsPerNode=1&collection.configName=funcake-oai-$CIRCLE_TAG")
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X GET --header 'Accept: application/json' "https://solrcloud-rocky8.tul-infra.page/solr/admin/collections?action=CREATE&name=funcake-oai-$CIRCLE_TAG-init&numShards=1&replicationFactor=2&maxShardsPerNode=1&collection.configName=funcake-oai-$CIRCLE_TAG")
validate_status
echo
echo "***"
echo "* Creating dev alias based on configset name."
echo "***"
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X POST --header "Content-Type:application/octet-stream" "https://solrcloud.tul-infra.page/solr/admin/collections?action=CREATEALIAS&name=funcake-oai-$CIRCLE_TAG-dev&collections=funcake-oai-$CIRCLE_TAG-init")
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X POST --header "Content-Type:application/octet-stream" "https://solrcloud-rocky8.tul-infra.page/solr/admin/collections?action=CREATEALIAS&name=funcake-oai-$CIRCLE_TAG-dev&collections=funcake-oai-$CIRCLE_TAG-init")
validate_status
echo "***"
echo "* Creating prod alias based on configset name."
echo "***"
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X POST --header "Content-Type:application/octet-stream" "https://solrcloud.tul-infra.page/solr/admin/collections?action=CREATEALIAS&name=funcake-oai-$CIRCLE_TAG-prod&collections=funcake-oai-$CIRCLE_TAG-init")
RESP=$(curl -u $SOLR_USER:$SOLR_PASSWORD -i -o - --silent -X POST --header "Content-Type:application/octet-stream" "https://solrcloud-rocky8.tul-infra.page/solr/admin/collections?action=CREATEALIAS&name=funcake-oai-$CIRCLE_TAG-prod&collections=funcake-oai-$CIRCLE_TAG-init")
validate_status
echo "***"
echo "* Pushing zip file asset to GitHub release."
Expand Down
17 changes: 0 additions & 17 deletions .circleci/setup_solr.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .circleci/test.sh

This file was deleted.

4 changes: 2 additions & 2 deletions bin/solr-configs-reset
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

cp /opt/solr/configs/oai/solrconfig.xml /var/solr/data/oai/
cp /opt/solr/configs/oai/schema.xml /var/solr/data/oai/
cp /opt/solr/conf/oai/solrconfig.xml /var/solr/data/oai/
cp /opt/solr/conf/oai/schema.xml /var/solr/data/oai/
curl 'http://localhost:8983/solr/admin/cores?action=RELOAD&core=oai'
22 changes: 12 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.3"

services:
app:
image: ruby:3.1.3
image: cimg/ruby:3.3.0
working_dir: /app
depends_on:
- solr
Expand All @@ -11,22 +11,24 @@ services:
- .:/app
- $PWD/bin/load-data:/bin/load-data
environment:
FUNCAKE_OAI_SOLR_URL: "http://solr:8983/solr/oai"
SOLR_URL: "http://solr:8983/solr/oai"
FUNCAKE_OAI_SOLR_URL: "http://solr:8983/solr/blacklight"
SOLR_URL: "http://solr:8983/solr/blacklight"
SOLR_DISABLE_UPDATE_DATE_CHECK: "true"
DO_INGEST: "${DO_INGEST}"
LC_ALL: "C.UTF-8"
BUNDLE_PATH: /app/vendor/bundle

solr:
image: solr:8.3.0
image: solr:9.6.1
volumes:
- $PWD/bin/solr-configs-reset:/opt/docker-solr/scripts/solr-configs-reset
- .:/opt/solr/configs/oai
- $PWD/bin/solr-configs-reset:/opt/docker/scripts/solr-configs-reset
- .:/opt/solr/conf/oai
ports:
- 8983:8983
entrypoint:
- bash
- "-c"
- "precreate-core oai /opt/solr/configs/oai; \
exec solr -f -a '-Xms256m -Xmx512m'"
- docker-entrypoint.sh
- solr-precreate
- blacklight
- /opt/solr/conf/oai
- "-Xms256m"
- "-Xmx512m"
3 changes: 1 addition & 2 deletions solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@

<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>

<luceneMatchVersion>7.0.1</luceneMatchVersion>
<luceneMatchVersion>8.11</luceneMatchVersion>

<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>

<!-- solr lib dirs -->
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />

<dataDir>${solr.data.dir:}</dataDir>

Expand Down

0 comments on commit d9f6d6c

Please sign in to comment.