Upgrading Avalon 6.2 to Avalon 6.3

See the Avalon 6.3 Release Notes for more information.


Requirements

Avalon 6.3 requires Ruby 2.3 or newer. If you're using RVM, simply run

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

Upgrade Steps

For Manual Installations

Download and deploy new code from avalon repo

Update gems and DB

bundle install
RAILS_ENV=production bundle exec rake db:migrate

Restart passenger (if using)

passenger-config restart-app

Restart Resque (background jobs processor)

pkill -f resque
RAILS_ENV=production BACKGROUND=yes bundle exec rake resque:scheduler
RAILS_ENV=production BACKGROUND=yes QUEUE=* bundle exec rake resque:work

Configuration change

As of 6.3, Avalon is using the flexible and increasingly popular Config gem. Default settings for Avalon now live at config/settings.yml, which should not be altered. Any custom config should be placed in config/settings/<environment>.local.yml which will selectively override the default values.

Properly formatted environment variables can also override Avalon settings. For example, SETTINGS__DOMAIN__HOST will override

domain:
  host:

A list of config values can be found at Configuration Files#config/settings.yml

For Docker Installations

Update new code from avalon-docker

git checkout master
git pull

Note that the names of some environment variables have changed (in docker-compose.yml):

-      - MEDIA_PATH=/masterfiles
+      - SETTINGS__MATTERHORN__MEDIA_PATH=/masterfiles

-      - STREAM_BASE=/streamfiles
+      - SETTINGS__STREAMING__CONTENT_PATH=/streamfiles

-      - STREAM_DEFAULT_QUALITY=medium
+      - SETTINGS__STREAMING__STREAM_DEFAULT_QUALITY=medium

-      - STREAM_HTTP_BASE=http://localhost:8880/avalon
+      - SETTINGS__STREAMING__HTTP_BASE=http://localhost:8880/avalon

-      - STREAM_RTMP_BASE=rtmp://localhost/avalon
+      - SETTINGS__STREAMING__RTMP_BASE=rtmp://localhost/avalon

-      - STREAM_SERVER=nginx
+      - SETTINGS__STREAMING__SERVER=nginx

-      - STREAM_TOKEN_TTL=20
+      - SETTINGS__STREAMING__STREAM_TOKEN_TTL=20

-      - DROPBOX_PATH=/masterfiles/dropbox
-      - DROPBOX_URI=./masterfiles/dropbox
+      - SETTINGS__DROPBOX__PATH=/masterfiles
+      - SETTINGS__DROPBOX__UPLOAD_URI=./masterfiles

Rebuild and replace Avalon container. 

docker-compose build --no-cache avalon
docker-compose stop avalon
docker-compose up avalon