Page tree

Versions Compared

Key

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

...

Code Block
mysql
mariadb> create database fcrepo;
mariadb> create user 'fcrepo'@'localhost' identified by '<fcrepo_password>';
mariadb> grant all privileges on fcrepo.* to 'fcrepo'@'localhost';

mariadb> create database rails;
mariadb> create user 'rails'@'localhost' identified by '<rails_pasword>';
mariadb> grant all privileges on rails.* to 'rails'@'localhost';

mariadb> flush privileges;

...

Code Block
source /home/avalon/.rvm/scripts/rvm
rvm use 2.5.7
exit

Install Passenger apache module requirements (as root)

Code Block
su - root
yum install -y pygpgme curl
curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo

yum install -y mod_passenger || yum-config-manager --enable cr && yum install -y mod_passenger

Create a virtual host for avalon

...

Code Block
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:!RC4:+HIGH:+MEDIUM:-LOW

Restart apache.  With apache running, check passenger-status

...

Modify /etc/httpd/conf.d/passenger.conf

Code Block
PassengerRuby /home/avalon/.rvm/rubies/ruby-2.5.7/bin/ruby

Validate passenger install and restart apache

Code Block
passenger-config validate-install
systemctl start httpd

Avalon

Grab Avalon code from github

Code Block
su - root
git clone https://github.com/avalonmediasystem/avalon.git /var/www/avalon
chown -R avalon:avalon /var/www/avalon/public/

Configure database settings
Anchor
mysql2
mysql2

...

Code Block
# as root
yum install nodejs # Javascript runtime 

# as avalon
su - avalon
cd /var/www/avalon
gem install bundler
bundle install --with mysql production --without development test
exit

Install yarn and node modules

Code Block
# as root
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum install yarn

# as avalon
su - avalon
cd /var/www/avalon
yarn install

Finish configuring Avalon

...

Code Block
  production:
    user: fedoraAdmin
    password: fedoraPasswordfedoraAdmin
    url: http://127.0.0.1:8984/fedora4/rest
    base_path: ""

...

Let Avalon know where your HLS streams are

...

titleconfig/settings/development.local.yml

...

Code Block
titleconfig/settings/production.local.yml
streaming:
  server: :nginx
  http_base: 'http://localhost:8980/avalon'
  content_path: '/var/avalon/derivatives'

Anchor
secrets
secrets
Change the secrets.yml file:

Code Block
cd /var/www/avalon
export RAILS_ENV=production
rake secret

...

Create controlled_vocabulary.yml

Code Block
cp config/controlled_vocabulary.yml.example config/controlled_vocabulary.yml

Create the database using rake

Code Block
# as avalon user
rake db:create

If you get an error message saying that you can't connect to the database, take a look at this post and follow some of the troubleshooting steps.

...

Avalon uses Sidekiq for background processing, which relies on Redis as its key-value store.

Install Redis

Code Block
# as root
yum install redis
systemctl start redis

Install Sidekiq

Code Block
# as root
wget https://raw.githubusercontent.com/mperham/sidekiq/master/examples/systemd/sidekiq.service -O /lib/systemd/system/sidekiq.service

...