Skip to content

Scholar 4 Release Tasks

Glen Horton edited this page Jan 24, 2019 · 48 revisions

Pre Deploy

Deploy

  • Follow https://github.com/uclibs/scholar_uc/wiki/Scholar%40UC-App-Workflow

  • Block access to scholar.uc.edu

  • log out all users (change cookie name in config/initializers/session_store.rb)

  • Backup the rails database
    mysqldump curate -h ucdbeil6.private -u curate --port=3306 -p > production.mysqldump

  • Backup the curate_uc directories on each web server

  • Ruby upgrade to 2.5.3

    • sudo yum install readline-devel
    • wget https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz
    • tar -xzf ruby-2.5.3.tar.gz
    • sudo rm -rf /usr/bin/rake
    • cd ruby-2.5.3
    • sudo ./configure --prefix=/usr
    • sudo /usr/bin/make
    • sudo /usr/bin/make install
  • Fits upgrade

    • cd /opt/fits/
    • sudo mv fits fits-old
    • sudo wget https://projects.iq.harvard.edu/files/fits/files/fits-1.0.5.zip
    • sudo unzip fits-1.0.5.zip
    • sudo mv fits-1.0.5 fits
    • sudo chmod a+x fits/fits.sh
    • fits.sh -v
  • Bamboo deploy changes

    • add line: export RAILS_ENV=production
    • update line: export PATH=$PATH:/srv/apps/.gem/ruby/2.5.0/bin
    • update line: export PATH=$PATH:/opt/fits/fits
    • remove line: copy_config_bamboo.sh
    • add line: cp /srv/apps/scholar-dev.variables /srv/apps/curate/curate_uc-STAGE/.env.development.local
    • change the source repository to ucrate
  • Run the Bamboo deploy

  • Disable logins again

  • Turn on detailed errors in config/environments/production.rb

    • config.consider_all_requests_local = true
  • Create default collection types

    • RAILS_ENV=production bundle exec rails hyrax:default_collection_types:create
  • Migrate collections

    • RAILS_ENV=production bundle exec rails hyrax:migrate:add_collection_type_and_permissions_to_collections
  • On the solr server:

  • Solr reindex

    • bundle exec rails console production
    • ActiveFedora::Base.reindex_everything
  • Flip Private Files to Hidden.

  • Test that everything works

  • Turn off detailed errors in config/environments/production.rb

    • config.consider_all_requests_local = false
  • Re-enable user access to scholar.uc.edu

  • Update cronjobs to use ruby 2.5