/
Standing up two Avalon ecosystems on one host

Standing up two Avalon ecosystems on one host

This is our experience in standing up another Avalon system on the same host to do blue-green deployment.

Clone Fedora

In Tomcat, copy webapps/fedora to webapps/fedora3.

Copy /usr/local/fedora to /usr/local/fedora3

Copy /usr/local/tomcat/conf/Catalina/localhost/fedora.xml to fedora3.xml and point "fedora.home" to /usr/local/fedora3

Clone avalon Solr core

In /usr/local/solr/solr.xml, clone core avalon and give it a new name, eg "avalon_r5"

Copy /usr/local/solr/avalon to /usr/local/solr/avalon_r5

Clone Matterhorn

Copy matterhorn and opencast folder to a new location.
Edit links and paths in /usr/local/matterhorn/etc/config.properties
Make sure cron jobs: stripChaptersCronJob.sh and chmod -R g+w /digitize/dropbox/ are running

Clone database

Give it a new name

Deploy Avalon to new folder

Make dir /var/www/avalon_r5

Copy shared folder from /var/www/avalon to avalon_r5

Edit shared yml files to reflect changes in DB, Fedora, Solr

Add new virtual host with new domain name to etc/httpd/conf.d/avalon.conf and ssl.conf 

Cap deploy from your local machine to server. For really large repo, you may want to migrate and reindex separately in a screen/tmux session.

Make sure your background jobs are running and pointing to new Avalon location.

Reindex Solr

Manually kick off rake avalon:reindex. This can take a very long time if you have a large collection, better run it in a tmux session.