Jump to content

VRT System/Upgrading

From Wikitech

Upgrading

This section is general guidance for a patchlevel (e.g. 6.0.x -> 6.0.y) update only. Minor or Major version upgrades can be complicated by database schema changes and other issues. There's really no way around reading the upgrade documentation, and testing the updates on a real system based on our existing configuration and database.

  1. Fetch new VRTS, extract into /opt and read through any upgrade instruction:
  2. Stop Puppet, Apache, Exim, and vrts-daemon & cron:
    • :~# disable-puppet "VRTS Upgrade"
    • :~# service apache2 stop
    • :~# service exim4 stop
    • :~# service cron stop
    • :~# service vrts-daemon stop
  3. Copy old config into new code tree & fix permissions:
    • :/opt# sudo cp /opt/otrs/Kernel/Config.pm /opt/znuny-$VERSION/Kernel
    • :/opt# sudo cp /opt/otrs/var/log/TicketCounter.log /opt/znuny-$VERSION/var/log/
    • :/opt# ./otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --otrs-group=otrs --web-user=www-data --web-group=www-data /opt/otrs
  4. Fix symbolic link, permissions and rebuild and install packages:
    • :/opt# sudo ln -sfn /opt/znuny-$1 /opt/otrs
    • :/opt# sudo -u root /opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data
    • :/opt# sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild
    • :/opt# sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete
    • :/opt# sudo -u www-data /opt/otrs/bin/otrs.Console.pl Admin::Package::ReinstallAll
  5. Restart Apache, Exim, vrts-daemon, cron & Puppet:
    • :/opt# sudo service cron start
    • :/opt# sudo service exim4 start
    • :/opt# sudo service apache2 start
    • :/opt# sudo service vrts-daemon start
    • :/opt# enable-puppet "VRTS Upgrade"
  6. Run Puppet:
    • :/opt# puppet agent -tv
  7. After performing the upgrades, sync the replica to match the files on the primary:
    • aokoth@vrts2001:~$ sudo /usr/bin/rsync --rsh /usr/local/sbin/sync-vrts-ssl-wrapper -av --progress rsync://vtrs1001.eqiad.wmnet/vrts /opt/
  8. Test functionality:
    • Send a mail to e.g. info-en and check that it shows up in OTRS