...
Code Block |
---|
|
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 setting | New setting | Note |
---|
matterhorn: media_path: | encoding: working_file_path: |
|
Upgrade Steps
For Manual Installations
...
Code Block |
---|
|
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 |
---|
|
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 |
---|
|
passenger-config restart-app |
5. Upgrade Redis and Restart Resque Replace Resque with Sidekiq (background jobs processor)
Code Block |
---|
|
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 |
---|
|
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 |
---|
|
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 |
---|
|
RAILS_ENV=production bundle exec rails r script/waveform_backfill.rb |
...
For Docker Installations
Stop Matterhorn
Code Block |
---|
|
timeliner:
timeliner_url: https://<hostname>/timeliner |
For Docker Installations
|
docker-compose stop matterhorn |
Update new code from avalon-docker
Code Block |
---|
|
git checkout master
git pull |
Pull or Rebuild and replace Avalon container.
Code Block |
---|
|
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 |
---|
|
docker-compose up avalon |