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

Upgrade Solr to at least 8.11.1 #958

Open
hortongn opened this issue Jan 5, 2022 · 9 comments
Open

Upgrade Solr to at least 8.11.1 #958

hortongn opened this issue Jan 5, 2022 · 9 comments

Comments

@hortongn
Copy link
Member

hortongn commented Jan 5, 2022

Descriptive summary

Info Sec is requiring us to upgrade our Log4j instances to a current, safe version. This means upgrading Solr to at least 8.11.1 in our dev, qa, and production server environments

@scherztc
Copy link
Contributor

scherztc commented Jan 6, 2022

We were able to update solr_wrapper to point to 8.11.1 in our local environment and in circleci without breaking the application.

#960

The next step is to use the Puppet Vagrant approach to manually update on ScholarDEV.

https://github.com/uclibs/scholar-puppet-vagrant/blob/scholar-3-update/modules/solr/manifests/init.pp

We still haven't tested the need for a Reindex.

ActiveFedora::Base.reindex_everything

@scherztc scherztc self-assigned this Jan 18, 2022
@scherztc
Copy link
Contributor

scherztc commented Jan 20, 2022

Procedure

  • Login into Solr Server

  • As the root user, stop solr with service solr stop

  • Back up /var/solr to ... tar -cvf solr.tar solr

  • Download solr-7.7.3.tgz from https://solr.apache.org/downloads.html

  • Uncompress solr-7.7.3.tgz to /opt/solr-7.7.3

  • Delete the existing /opt/solr symlink... rm solr

  • Create a new symlink ln -s solr-7.7.3 solr

  • As the root user, start solr with service solr start

  • Test Application... Browse. View work.

  • As the root user, stop solr with service solr stop

  • Download solr-8.11.1.tgz from https://solr.apache.org/downloads.html

  • Uncompress solr-8.11.1.tgz to /opt/solr-8.11.1

  • Delete the existing /opt/solr symlink... rm solr

  • Create a new symlink for /opt/solr-8.11.1 to /opt/solr.... ln -s solr-8.11.1 solr

  • Delete everything from the /var/solr/data/collection1 folder

  • Replace schema.xml and solrconfig.xml with Sets solr version to 8.11.1 and fedora version to 4.7.5 #960 in the conf folder (make one)

  • You might need to remove the StandardFilterFactory lines from /var/solr/data/collection1/conf/schema.xml

  • As the root user, start solr with systemctl start solr

  • Double Tunnel

  • your-computer:~$ ssh sshap1prd01l.ad.uc.edu -L 8983:localhost:1234
    [SSHAP1PRD01L ~]$ ssh libschdwl1.private -L 1234:libschdal1.private:8983
    In your browser visit http://localhost:8983/

  • Create a new collection1 in the SOLR Admin Web interface

  • Use collection1, collection1, schema.xml, and solrconfig.xml

  • As the root user, start solr with systemctl start solr

  • bundle exec rails console production on web server

  • Try a Hyrax solr reindex (ActiveFedora::Base.reindex_everything)

@scherztc
Copy link
Contributor

I was able to successfully upgrade SOLR7 to SOLR8 (using the schema.xml and solrconfig.xml from the Avalon update) with items in Fedora that I created manually in SOLR7 (instead of seed data). I was able to then upgrade to SOLR8 and run the re-index while keeping the work types, instead of converting them to Generic Works.

I have documented the procedure above in the issue. I think that makes us ready to do the SOLR update on production.

@scherztc
Copy link
Contributor

How to roll back to solr version 6.6.1
Login into Solr Server
As the root user, stop solr with service solr stop
Delete the existing /opt/solr symlink
Create a new symlink ln -s /opt/solr-6.6.1 to /opt/solr
Delete everything from the /var/solr/data/collection1 folder
Replace schema.xml and solrconfig.xml with #960 in the conf folder (make one)
You might need to remove the StandardFilterFactory lines from /var/solr/data/collection1/conf/schema.xml
As the root user, start solr with service solr start
Create a new collection1 in the SOLR Admin Web interface
Use collection1, collection1, schema.xml, and solrconfig.xml
Login into Web Server
As the Scholar user, cd /srv/apps/curate_uc
Open rails console
bundle exec rails console production on web server
Try a Hyrax solr reindex (ActiveFedora::Base.reindex_everything)

@scherztc
Copy link
Contributor

scherztc commented Jan 3, 2023

UNC-Libraries/hy-c#764

@scherztc
Copy link
Contributor

scherztc commented Jan 3, 2023

@scherztc
Copy link
Contributor

scherztc commented Jan 3, 2023

@scherztc
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants