Closed gothub closed 1 year ago
Here are the steps taken to upgrade from 7.3 to 8.11.1, and installing a new core in the Bitnami k8s instance
Note that this procedure was useful for upgrading from a standalone Solr instance to a k8s standalone Solr instance and probably won't need to be run again by MetaDIG, but it may be useful for other applications.
This method uses the IndexUpgrader tool. The steps to use this:
install Solr 8.11.1 release - this can be just untarring the distribution to local disk
copy the Solr index (from local disk in our case, on k8s-ctrl-1.dataone.org)
run the upgrade tool:
java -cp server/solr-webapp/webapp/WEB-INF/lib/lucene-core-8.11.1.jar:server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-8.11.1.jar org.apache.lucene.index.IndexUpgrader \
-delete-prior-commits \
-verbose \
./server/solr/quality/data/index
login to the bitnami solr instance (metadig-solr) and move the current quality core
from the host bash shell, copy the updated core into the metadig-solr container
kubectl cp quality metadig/metadig-solr-0:bitnami/solr/server/solr
restart the metadig-solr pod/service:
test the newly installed index with these commands:
addr=`kubectl get svc metadig-solr --namespace=metadig -o wide | grep metadig-solr | awk '{print $3}'`
/usr/bin/curl "http://${addr}:8983/solr/quality/select?q=*:*&rows=1"
{
"responseHeader":{
"status":0,
"QTime":8,
"params":{
"q":"*:*",
"rows":"1"}},
"response":{"numFound":2833538,"start":0,"numFoundExact":true,"docs":[
{
"metadataId":"{27319A8B-3D0C-4AE4-8090-46F9D9CB03C3}",
"formatId":"https://nceas.ucsb.edu/mdqe/v1",
"runId":"6b62b7bb-f28c-491d-90bc-71c308bee8bb",
"suiteId":"FAIR.suite.1",
"timestamp":"2019-12-04T02:50:52.055Z",
"datasource":"urn:node:NCEI",
"metadataFormatId":"http://www.isotc211.org/2005/gmd-noaa",
"dateUploaded":"2016-03-24T22:11:13.588Z",
"sequenceId":"urn:uuid:176ccf49-79fa-49ab-ab65-1f6b593f8944",
"rightsHolder":"NCEI",
"checksPassed":22,
"checksWarned":11,
"checksFailed":21,
"checksInfo":0,
"checkCount":54,
"scoreOverall":0.5116279,
"scoreByType_Interoperable_f":0.33,
"scoreByType_Reusable_f":0.27,
"scoreByType_Accessible_f":0.67,
"scoreByType_Findable_f":0.71,
"_version_":1651955835742453760}]
}}
this version of solr is already running
Metadig will be upgraded to use Bitnami Solr 8.11.1. Currently metadig is using Solr 7.3.
Installation will be handled with the Bitnami Helm chart. A few details of the config:
These steps have been tested on dev k8s with a Bitnami Solr instance running there. There didn't appear to be problems running on Solr 8.11.1 with a copy of a metadig Solr 7.3 'quality' core, but to be safe, then IndexUpgraderTool will be run against a copy of the production core before installation of Metadig 2.4.0 on production.