Skip to content

Scholar Beta Environment

Glen Horton edited this page Jun 14, 2017 · 11 revisions

Server: https://scholar-beta.uc.edu

GitHub (beta-stable branch): https://github.com/uclibs/scholar_uc/tree/beta-stable

Directories:

  • App: /opt/rails-apps/scholar_uc_beta
  • Solr: /opt/solr
  • Fedora: /opt/fedora-data

Starting the application

  • Start the rails app first

    • sudo su - webapp
    • cd /opt/rails-apps/scholar_uc_beta
    • bundle exec puma -b tcp://127.0.0.1:9292 -d
    • Ignore this step for now: sidekiq -q ingest -q default -q event &
  • Start the nginx server

    • sudo service nginx start or restart with sudo service nginx restart

Starting/stopping Solr (port 9501)

  • Start: sudo service solr start
  • Stop: sudo service solr stop

Starting/stopping Fedora (port 8080)

  • Start: sudo service tomcat start
  • Stop: sudo service tomcat stop

Deploying recent Git commits

  1. sudo su - webapp
  2. cd /opt/rails-apps/scholar_uc_beta
  3. git checkout develop
  4. git pull
  5. git checkout beta-stable
  6. git merge develop
  7. bundle install
  8. bundle exec rake db:migrate (if needed)
  9. Restart the app server (see above)

Fedora Install on Curly

  1. sudo yum install tomcat-webapps tomcat-admin-webapps
  2. sudo wget http://repo1.maven.org/maven2/org/fcrepo/fcrepo-webapp/4.7.1/fcrepo-webapp-4.7.1.war
  3. sudo mkdir /opt/fedora-data
  4. sudo chown tomcat /opt/fedora-data/
  5. cd /opt
  6. sudo wget http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.5.14/bin/apache-tomcat-8.5.14.tar.gz
  7. sudo tar xzf apache-tomcat-8.5.14.tar.gz
  8. sudo chown -R tomcat:tomcat /opt/apache-tomcat-8.5.14
  9. sudo su - tomcat
  10. export CATALINA_BASE="/opt/apache-tomcat-8.5.14"; export CATALINA_HOME="/opt/apache-tomcat-8.5.14"; export CATALINA_TMPDIR="/opt/apache-tomcat-8.5.14/temp"; export CLASSPATH="/opt/apache-tomcat-8.5.14/bin/bootstrap.jar:/opt/apache-tomcat-8.5.14/bin/tomcat-juli.jar"
  11. export JAVA_OPTS="-Dfcrepo.home=/opt/fedora-data -Dfcrepo.modeshape.configuration=classpath:/config/file-simple/repository.json -Djava.awt.headless=true -XX:+UseG1GC -XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:MaxPermSize=128M -Xms4096m -Xmx4096m -Djava.util.logging.config.file=/opt/apache-tomcat-8.5.14/conf/logging.properties -server"
  12. export JRE_HOME="/home/tomcat/jdk1.8.0_112"
  13. sudo cp fcrepo-webapp-4.7.1.war apache-tomcat-8.5.14/webapps/fedora.war
  14. /opt/apache-tomcat-8.5.14/bin/startup.sh

Solr install on Curly

  1. cd /opt
  2. sudo wget http://archive.apache.org/dist/lucene/solr/6.5.0/solr-6.5.0.tgz.md5
  3. sudo wget http://archive.apache.org/dist/lucene/solr/6.5.0/solr-6.5.0.tgz
  4. (verify the checksum)
  5. sudo tar -xzf solr-6.5.0.tgz
  6. sudo solr-6.5.0/bin/install_solr_service.sh /opt/solr-6.5.0.tgz
  7. sudo service solr stop
  8. sudo vim /etc/default/solr.in.sh (set the port number)
  9. sudo chown -R solr /opt/solr-6.5.0
  10. sudo service solr start
  11. sudo su - solr
  12. /opt/solr/bin/solr create -c collection1 -d basic_configs -p 9501
  13. ln -s /opt/rails-apps/scholar_uc_beta/solr/config/schema.xml /var/solr/data/collection1/conf/schema.xml
  14. rm /var/solr/data/collection1/conf/solrconfig.xml
  15. ln -s /opt/rails-apps/scholar_uc_beta/solr/config/solrconfig.xml /var/solr/data/collection1/conf/solrconfig.xml
  16. exit
  17. sudo service solr stop
  18. sudo service solr start
  19. Verify at http://curly.libraries.uc.edu:9501
Clone this wiki locally