Preparing for the Upgrade 

Before doing anything to prepare for the upgrade, backup your Avalon 3.3 installation.

config/avalon.yml

In avalon.yml, under streaming, change "url_handler:" to "server:". 

Add under streaming: "content_path:" and then the path to your rtmp stream folder.

It should look something like this:

  streaming:
    server: :generic
    content_path: /var/avalon/rtmp_streams
    stream_token_ttl: 20
    rtmp_base: rtmp://localhost/avalon
    http_base: http://localhost/streams

See What's New in Avalon 4.0 for more details.

Instructions

The following instructions will work for any Avalon 3.3 installation that used Puppet as its source. This includes the portable VM Image Installation, the Vagrant Virtual Machine Installation, and the Manual Installation of Avalon Using Puppet.

Upgrading is fairly simple, and must be run as the root user from a bash prompt on the Avalon system. The process for this depends on which kind of installation you have.

Portable VM image:

Once you have a root prompt, proceed with the upgrade as follows:

# 1. if starting from Portable VM image, download the installer package, unpack, and link it
$ wget http://www.avalonmediasystem.org/downloads/avalon-installer-flat.tar.gz -O flat.tar.gz 
$ tar xzf flat.tar.gz
$ export INSTALL_DIR=`pwd`
$ ln -s $INSTALL_DIR/avalon-installer-flat/files /etc/puppet/avalon_files

# 2. navigate to the installer
$ cd avalon-installer-flat

# 3. remove the Avalon deploy tag
$ rm -f /var/www/avalon/bare-deploy
$ rm -rf /opt/staging/avalon/avalon-bare-deploy.tar.gz /opt/staging/avalon/avalon-bare-deploy
 
# 4. pin mysql to version in new Gemfile.local
$ cp modules/avalon/files/shared/Gemfile.local /var/www/avalon/shared/Gemfile.local

# 5. apply the puppet manifest
$ puppet apply --fileserverconfig=fileserver.conf --modulepath=modules \
	--hiera_config=hiera/hiera.yaml --templatedir=templates manifests/init.pp

# 6. reindex
$ su - avalon -c "cd /var/www/avalon/current; RAILS_ENV='production' bundle exec rake avalon:reindex"

Update config/controlled_vocabulary.yml

Additional controlled vocabularies are required for Avalon 4. Merge the new version of config/controlled_vocabulary.yml.example with your customizations in config/controlled_vocabulary.yml. See Managing Controlled Vocabularies.

 

# 1. Switch to matterhorn user
$ su - matterhorn
$ cd /usr/local/matterhorn
 
# 2. Install updated encoding profiles
$ cd etc/encoding
$ wget --no-check-certificate https://raw.githubusercontent.com/avalonmediasystem/avalon-felix/1.4.x/etc/encoding/avalon.properties -O avalon.properties

# 3. Remove avalon workflow notifier bundle
$ rm /usr/local/matterhorn/lib/matterhorn/matterhorn-workflow-notifier-avalon-1.4-SNAPSHOT.jar

# 4. Restart Matterhorn
$ exit
$ service matterhorn stop
$ service matterhorn start
# 1. Stop Red5
$ service red5 stop
 
# 2. Switch to red5 directory
$ cd /usr/local/red5
 
# 3. Install updated avalon webapp
$ cd webapps/avalon
$ wget --no-check-certificate https://raw.githubusercontent.com/avalonmediasystem/avalon-red5/master/webapps/avalon/WEB-INF/lib/red5-avalon.jar -O WEB-INF/lib/red5-avalon.jar
$ wget --no-check-certificate https://raw.githubusercontent.com/avalonmediasystem/avalon-red5/master/webapps/avalon/WEB-INF/red5-web.properties -O WEB-INF/red5-web.properties
$ wget --no-check-certificate https://raw.githubusercontent.com/avalonmediasystem/avalon-red5/master/webapps/avalon/WEB-INF/red5-web.xml -O WEB-INF/red5-web.xml
$ wget --no-check-certificate https://raw.githubusercontent.com/avalonmediasystem/avalon-red5/master/webapps/avalon/META-INF/MANIFEST.MF -O META-INF/MANIFEST.MF
$ chmod -R a+x META-INF WEB-INF

# 4.Configure serverUrl to point to localhost
$ perl -pi -e 's/#avalon\.serverUrl=http:\/\/www\.example\.edu\/avalon\//avalon\.serverUrl=http:\/\/localhost/' WEB-INF/red5-web.properties

# 5. Restart Red5
$ service red5 start

Restart Delayed Job

See details here: Restart Delayed Job

Update AMS (if relevant)

If you are using Adobe Media Server for your streaming server, see Updating AMS for Avalon 4.0.

Sample Content

If you didn't load the sample content before, try it out to test your avalon 4.0 upgrade.