2024

Allgemein

Zum Update des Goobi viewer Indexers auf die neuste Version immer die folgenden Kommandos benutzen:

mkdir -p /root/BACKUP/$(date -I)
systemctl stop solrindexer
mv /opt/digiverso/indexer/solrIndexer.jar /root/BACKUP/$(date -I)
wget -O /opt/digiverso/indexer/solrIndexer.jar https://github.com/intranda/goobi-viewer-indexer/releases/latest/download/solrIndexer.jar
systemctl start solrindexer

24.03

Die hier erwähnten Anpassungen für EAD sind eine Vorbereitung für weitere Anpassungen im Goobi viewer Core. Sie werden dort erst in einem kommenden Release verwendet werden.

Solr

Für die EAD Unterstützung ist ein Update des Solr-Schemas erforderlich. Eine Neuindexierung ist allerdings nicht notwendig.

Neben der schema.xml muss auch die solrconfig.xml einmal gepatched werden:

mkdir /root/BACKUP/$(date -I)

cp /opt/digiverso/solr/solr/server/solr/configsets/goobiviewer/conf/schema.xml /root/BACKUP/$(date -I)
wget -O /opt/digiverso/solr/solr/server/solr/configsets/goobiviewer/conf/schema.xml https://raw.githubusercontent.com/intranda/goobi-viewer-indexer/master/goobi-viewer-indexer/src/main/resources/other/schema.xml
chown solr. /opt/digiverso/solr/solr/server/solr/configsets/goobiviewer/conf/schema.xml

cp /opt/digiverso/solr/solr/server/solr/configsets/goobiviewer/conf/solrconfig.xml /root/BACKUP/$(date -I)
patch /opt/digiverso/solr/solr/server/solr/configsets/goobiviewer/conf/solrconfig.xml << "EOF"
@@ -36,6 +36,7 @@
        affect both how text is indexed and queried.
   -->
   <luceneMatchVersion>9.9</luceneMatchVersion>
+  <schemaFactory class="ClassicIndexSchemaFactory"/>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in
EOF

cd /opt/digiverso/solr/solr/
sudo -u solr bin/solr zk upconfig -n goobiviewer -d server/solr/configsets/goobiviewer/
curl "http://localhost:8983/solr/admin/collections?action=RELOAD&name=collection1&wt=xml"

Goobi viewer Indexer

Um die Indexierung von EAD-Dateien zu ermöglichen muss ein Verzeichnisse angelegt und eine zusätzliche Zeile in die config_indexer.xml eingetragen werden.

Verzeichnis anlegen:

mkdir /opt/digiverso/viewer/indexed_ead/
chown tomcat. /opt/digiverso/viewer/indexed_ead/

Zeile hinzufügen:

config_indexer.xml
<init>
    <indexedEad>indexed_ead</indexedEad>
</init>

24.02

Solr

Mit dem 24.02 Release wird auf eine aktuelle Solr Version aktualisiert werden. Die hier festgehaltenen Schritte sind als Anleitung zu verstehen bei denen die Schritte im Einzelnen durchgespielt und bei Bedarf an lokale Pfade und Gegebenheiten angepasst werden müssen.

# Stop Solr Service and create Backup
systemctl stop solr
mkdir /root/BACKUP/$(date -I)
cd /opt/digiverso/
tar -czf /root/BACKUP/$(date -I)/solr.tar.gz solr/
mv /opt/digiverso/solr/log4j2.xml /root/BACKUP/$(date -I)/
mv /etc/default/solr.in.sh /root/BACKUP/$(date -I)/


# Download and Install
cd /tmp
wget https://dlcdn.apache.org/solr/solr/9.5.0/solr-9.5.0.tgz
tar -xzf solr-9.5.0.tgz solr-9.5.0/bin/install_solr_service.sh --strip-components=2
./install_solr_service.sh solr-9.5.0.tgz -d /opt/digiverso/solr -i /opt/digiverso/solr -p 8983 -s solr  -u solr -f -n


patch /etc/default/solr.in.sh  << "EOF"
@@ -32,7 +32,7 @@
 #SOLR_START_WAIT="$SOLR_STOP_WAIT"
 
 # Increase Java Heap as needed to support your indexing / query needs
-#SOLR_HEAP="512m"
+SOLR_HEAP="2048m"
 
 # Expert: If you want finer control over memory options, specify them directly
 # Comment out SOLR_HEAP if you are using this though, that takes precedence
@@ -50,25 +50,19 @@
 #  -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"
 
 # These GC settings have shown to work well for a number of common Solr workloads
-#GC_TUNE=" \
-#-XX:+ExplicitGCInvokesConcurrent \
-#-XX:SurvivorRatio=4 \
-#-XX:TargetSurvivorRatio=90 \
-#-XX:MaxTenuringThreshold=8 \
-#-XX:+UseConcMarkSweepGC \
-#-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
-#-XX:+CMSScavengeBeforeRemark \
-#-XX:PretenureSizeThreshold=64m \
-#-XX:+UseCMSInitiatingOccupancyOnly \
-#-XX:CMSInitiatingOccupancyFraction=50 \
-#-XX:CMSMaxAbortablePrecleanTime=6000 \
-#-XX:+CMSParallelRemarkEnabled \
-#-XX:+ParallelRefProcEnabled        etc.
+GC_TUNE=" \
+-XX:+ExplicitGCInvokesConcurrent \
+-XX:SurvivorRatio=4 \
+-XX:TargetSurvivorRatio=90 \
+-XX:MaxTenuringThreshold=8 \
+-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
+-XX:PretenureSizeThreshold=64m \
+-XX:+ParallelRefProcEnabled"
 
 # Set the ZooKeeper connection string if using an external ZooKeeper ensemble
 # e.g. host1:2181,host2:2181/chroot
 # Leave empty if not using SolrCloud
-#ZK_HOST=""
+ZK_HOST="127.0.0.1:2181"
 
 # Set to true if your ZK host has a chroot path, and you want to create it automatically.
 #ZK_CREATE_CHROOT=true
@@ -129,7 +123,7 @@
 
 # Changes the logging level. Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Default is INFO
 # This is an alternative to changing the rootLogger in log4j2.xml
-#SOLR_LOG_LEVEL=INFO
+SOLR_LOG_LEVEL=ERROR
 
 # Location where Solr should write logs to. Absolute or relative to solr start dir
 #SOLR_LOGS_DIR=logs
EOF


patch /etc/init.d/solr << EOF
@@ -16,7 +16,7 @@
 
 ### BEGIN INIT INFO
 # Provides: solr
-# Required-Start:    \$remote_fs \$syslog
+# Required-Start:    \$remote_fs \$syslog zookeeper
 # Required-Stop:     \$remote_fs \$syslog
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
EOF
systemctl daemon-reload


# Migrate old data to new Solr
cp -a /opt/digiverso/solr/solr-8.5.2/server/solr/configsets/goobiviewer /opt/digiverso/solr/solr-9.5.0/server/solr/configsets/
cp /opt/digiverso/solr/solr-9.5.0/server/solr/configsets/_default/conf/solrconfig.xml /opt/digiverso/solr/solr-9.5.0/server/solr/configsets/goobiviewer/conf/

patch /opt/digiverso/solr/solr-9.5.0/server/solr/configsets/goobiviewer/conf/solrconfig.xml << "EOF"
@@ -72,7 +72,7 @@
        The example below can be used to load a Solr Module along
        with their external dependencies.
     -->
-    <!-- <lib dir="${solr.install.dir:../../../..}/modules/ltr/lib" regex=".*\.jar" /> -->
+    <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" regex=".*\.jar" />
 
   <!-- an exact 'path' can be used instead of a 'dir' to specify a
        specific jar file.  This will cause a serious error to be logged
@@ -666,7 +666,7 @@
   <!-- Shared parameters for multiple Request Handlers -->
   <initParams path="/update/**,/query,/select,/spell">
     <lst name="defaults">
-      <str name="df">_text_</str>
+      <str name="df">DEFAULT</str>
     </lst>
   </initParams>
 
@@ -939,7 +939,7 @@
   </updateProcessor>
 
   <!-- The update.autoCreateFields property can be turned to false to disable schemaless mode -->
-  <updateRequestProcessorChain name="add-unknown-fields-to-the-schema" default="${update.autoCreateFields:true}"
+  <updateRequestProcessorChain name="add-unknown-fields-to-the-schema" default="${update.autoCreateFields:false}"
            processor="uuid,remove-blank,field-name-mutating,parse-boolean,parse-long,parse-double,parse-date,add-schema-fields">
     <processor class="solr.LogUpdateProcessorFactory"/>
     <processor class="solr.DistributedUpdateProcessorFactory"/>
EOF


cd /opt/digiverso/solr/solr/server/solr-webapp/webapp/WEB-INF/lib/
wget https://github.com/locationtech/jts/releases/download/1.17.0/jts-core-1.17.0.jar
chown solr. jts-core-1.17.0.jar


cd /opt/digiverso/solr/solr
chmod 755 bin/solr
sudo -u solr bin/solr zk upconfig -n goobiviewer -d server/solr/configsets/goobiviewer/

Apache

Damit die Anbindung des Solr nach außen hin funktioniert muss das http2 Modul im Apache aktiviert und den Dienst neu gestartet werden:

a2enmod http2
systemctl restart apache2

Goobi viewer Core

Für die Bereitstellung eines Entwicklerpaketes über das Goobi viewer Backend sowie die Möglichkeit das Theme auf dem Server zu pullen müssen die folgenden beiden Skripte abgelegt werden:

wget -O /opt/digiverso/viewer/config/script_theme-pull.sh https://raw.githubusercontent.com/intranda/goobi-viewer-core-config/master/goobi-viewer-core-config/src/main/resources/install/script_theme-pull.sh
wget -O /opt/digiverso/viewer/config/script_create_package.sh https://raw.githubusercontent.com/intranda/goobi-viewer-core-config/master/goobi-viewer-core-config/src/main/resources/install/script_create_package.sh
chown tomcat:tomcat /opt/digiverso/viewer/config/script_*.sh
chmod 750 /opt/digiverso/viewer/config/script_*.sh

Für das Erstellen des SQL-Dumps ist es erforderlich das Passwort für die Goobi viewer Datenbank im Skript zu hinterlegen.

Sofern vorher andere Lösungen installiert waren (Cronjob, Shell-Skript, Apache) können diese nach entsprechenden Tests zurückgebaut und ins Backup verschoben werden.

24.01

Allgemein

Mit dem 24.01 Release wird Java 17 verwendet. Auf einem Ubuntu Linux 22.04 System sind dafür muss das Paket installiert, als Standard JRE hinterlegt und im Tomcat 9 als JAVA_HOME hinterlegt werden

apt install openjdk-17-jre-headless
update-alternatives --config java
patch /etc/default/tomcat9 << "EOF"
@@ -1,7 +1,7 @@
 # The home directory of the Java development kit (JDK). You need at least
 # JDK version 8. If JAVA_HOME is not set, some common directories for
 # OpenJDK and the Oracle JDK are tried.
-#JAVA_HOME=/usr/lib/jvm/java-8-openjdk
+JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
 
 # You may pass JVM startup parameters to Java here. If you run Tomcat with
 # Java 8 instead of 9 or newer, add "-XX:+UseG1GC" to select a suitable GC.
@@ -15,7 +15,6 @@
 JAVA_OPTS="${JAVA_OPTS} -XX:+UseG1GC"
 JAVA_OPTS="${JAVA_OPTS} -XX:+ParallelRefProcEnabled"
 JAVA_OPTS="${JAVA_OPTS} -XX:+DisableExplicitGC"
-JAVA_OPTS="${JAVA_OPTS} -XX:+CMSClassUnloadingEnabled"
 JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom"
 JAVA_OPTS="${JAVA_OPTS} -Dfile.encoding='utf-8'"
+JAVA_OPTS="${JAVA_OPTS} --add-exports=java.desktop/sun.awt.image=ALL-UNNAMED"
 
EOF

Damit Solr weiterhin startet müssen die folgenden Optionen aus den GC_TUNE="" Einstellungen innerhalb der /etc/default/solr.in.sh entfernt werden:

-XX:+UseCMSInitiatingOccupancyOnly \
-XX:+UseConcMarkSweepGC \
-XX:+CMSScavengeBeforeRemark \
-XX:CMSInitiatingOccupancyFraction=50 \
-XX:CMSMaxAbortablePrecleanTime=6000 \
-XX:+CMSParallelRemarkEnabled \

Zusätzlich sind die folgenden Stichpunkte zu bedenken:

  • Jenkinsfile: Anpassen des Docker images auf maven:3-eclipse-temurin-17

  • pom.xml:

    • Die Einstellung maven.compiler.release auf 17 setzen

    • Im maven-enforcer-plugin die requiredMavenVersion auf 3.8.8 setzen

    • Plugins aktualisieren - mvn versions:display-plugin-updates

    • Rechtschreibfehler - includeArtifacIds vs includeArtifactIds

    • source- und testDirectory entfernen

    • warName entfernen und durch finalName ersetzen

Contentserver

Damit die Bildauslieferung weiterhin funktioniert, muss geprüft werden ob eine lokale config_contentServer.xml existiert. Wenn ja ist dort in den <imageTypeSettings /> für das <type format="default" ... > in den <settings...> das folgende Attribut zu ergänzen:

preferredImageReader="com.github.jaiimageio"

Last updated