Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
rvm list # Get current ruby version, eg 2.2.1
rvm upgrade 2.2.1 2.5.7 # Installs Ruby 2.5.7 and migrate gemsets, wrappers, aliases and environment files

Config changes

Old settingNew settingNote

matterhorn:
  media_path:

encoding:
  working_file_path:


Upgrade Steps

For Manual Installations

...

Code Block
languagebash
gem install bundler -v 2.0.2
bundle install
RAILS_ENV=production bundle exec rake db:migrate

3.  Install yarn and update Update JS dependencies

Code Block
languagebash
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install nodejs # Tested with Node.js version 10
sudo yum install yarn yarn install # in Avalon root dir

...

Code Block
languagebash
passenger-config restart-app

5. Upgrade Redis and Restart Resque Replace Resque with Sidekiq (background jobs processor)

Code Block
languagebash
sudo yum upgrade redis  # Version 3.0+
sudo service redis restart
pkill -f resque
RAILS_ENV=production BACKGROUND=yes bundle exec rake resque:scheduler
RAILS_ENV=production BACKGROUND=yes QUEUE=* bundle exec rake resque:work

6. Upgrade ffmpeg (version 4+). You can either download a prebuilt binary

Code Block
languagebash
mkdir -p /tmp/ffmpeg && cd /tmp/ffmpeg
curl https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJ
sudo cp `find . -type f -executable` /usr/bin

...

sidekiq -d -C config/sidekiq.yml

7. Upgrade mediainfo

Code Block
languagebash
sudo yum remove libmediainfo0-0.7.61-1.x86_64 libzen0-0.4.28-1.x86_64
sudo yum remove mediainfo
sudo yum install mediainfo libmediainfo libzen # Choose 19+ version

...

Code Block
languagebash
RAILS_ENV=production bundle exec rails r script/waveform_backfill.rb

...

For Docker Installations

Stop Matterhorn

Code Block
titleconfig/settings.yml
timeliner:
  timeliner_url: https://<hostname>/timeliner

For Docker Installations

languagebash
docker-compose stop matterhorn

Update new code from avalon-docker

Code Block
languagebash
git checkout master
git pull

Pull or Rebuild and replace Avalon container. 

Code Block
languagebash
docker-compose pull avalon
# or docker-compose build --no-cache avalon
docker-compose stop avalon

Check config changes then replace the Avalon container

Code Block
languagebash
docker-compose up avalon