VRT System/Installation

From Wikitech

Installation

Setting up VRTS is a partly automated and manual process. The first step is to apply the Puppet role to the server that you'd like to turn into a VRTS server in site.pp in the Puppet repo i.e.

node 'otrs1001.eqiad.wmnet' {
  role(vrts)
}

This is also after ensuring that the values in hieradata exist i.e. the VRTS database user, password, host and the exim database values as well. This file is located in hieradata/role/common/vrts.yaml. If running the database on the same host as the VRTS installation (like we are currently with the VRTS instance on WMCS), you can use the following scripts to provision the database user and schema. If running a local MySQL database, edit the /etc/my.cnf file and alter the following values and restart the mariadb service:

max_allowed_packet      = 64M
innodb_log_file_size    = 512M
-- VRTS
-- Create Database
CREATE DATABASE IF NOT EXISTS vrts;

-- Create Database User
CREATE USER '<vrts_user_in_hieradata>'@'localhost'
  IDENTIFIED BY '<password_in_hieradata>';

-- Grant Database User Permissions
GRANT ALL ON vrts.* TO 'vrts'@'localhost';

-- Set Database Character Set Encoding (this configuration is pretty important or the migrations will not work)
ALTER DATABASE vrts CHARACTER SET utf8 COLLATE utf8_unicode_ci;

-- Mail Database
CREATE DATABASE IF NOT EXISTS exim;

-- 
GRANT ALL ON exim.* TO 'vrts'@'localhost';

ALTER DATABASE exim CHARACTER SET utf8 COLLATE utf8_unicode_ci;

After provisioning this, navigate to the host's public URL https://vrts-prod.wmcloud.org/otrs/installer.pl. This will open the graphical VRTS installation wizard. Initially, this will display an error about SecureMode being active on the server. To fix this, you will temporarily have to disable Puppet on the host and edit the /opt/otrs/Kernel/Config.pm file to disable SecureMode. This parameter is currently on line 97 of this file; set it to 0 like so:

$Self->{SecureMode} = 0;

After performing these steps, restart the web server and vrts deamon on the host with the following:

sudo service restart apache2
sudo service restart vrts-daemon

The error about SecureMode being active should be gone and the installation will allow you to proceed. It will prompt you to provide information about the database (username, password and host) and email server settings. Enter the values as configured in the first steps earlier when creating the database stuff.