Upgrade EventQ on a separate server

Instructions to upgrade EventQ on a separate server. You can choose to upgrade EventQ either on the same hardware or on a new hardware. Steps that are relevant only to same and new hardware upgrades are called out explicitly.

It is assumed that you have TeamForge 17.8 up and running. The TeamForge services are distributed as listed in the following table:
Services TeamForge Application Server (server-01) EventQ Server (server-02)
ctfcore
 
mail
 
search
 
codesearch
 
etl
 
gerrit
 
gerrit-database
 
reviewboard
 
reviewboard-database
 
reviewboard-adapter
 
subversion
 
cvs
 
binary
 
binary-database
 
cliserver
 
eventq  
mongodb  
redis  
rabbitmq  
ctfcore-database
 
ctfcore-datamart
 
  1. New hardware upgrade: Backup steps required only if you are upgrading EventQ on a new hardware. Do this on the existing EventQ server.
    1. Stop EventQ.
      If you are upgrading from TeamForge 16.3 to TeamForge 17.8 (or later):
      • /etc/init.d/orchestrate stop
      If you are upgrading from TeamForge 17.1 (or earlier) to TeamForge 17.8 (or later):
      • /etc/init.d/eventq stop
      • /etc/init.d/collabnet-rabbitmq-server stop
      • /etc/init.d/collabnet-mongod stop
      Use the following command otherwise:
      • /opt/collabnet/teamforge/bin/teamforge stop
    2. Back up the /opt/collabnet/eventq/config/ data directory, compress and copy the backup file to the new server.
      • mkdir /tmp/backup_dir
      • cp -Rpf /opt/collabnet/eventq/config/*.yml /tmp/backup_dir
      • cp -Rpf /opt/collabnet/mongodb /tmp/backup_dir
      • cp -Rpf /opt/collabnet/rabbitmq /tmp/backup_dir
      • tar czvf eventqbackup.tgz backup_dir
      • scp /tmp/eventqbackup.tgz username@newbox:/tmp
  2. Same hardware upgrade: Upgrade the operating system packages in case of same hardware upgrade.
    • sudo yum upgrade

EventQ upgrade steps

  1. Configure your TeamForge installation repository.
    • TeamForge installation repository configuration for sites with internet access
    1. Contact the CollabNet Support and download the TeamForge 17.8 installation repository package to /tmp.
    2. Install the repository package.
      • yum install -y /tmp/collabnet-teamforge-repo-17.8-1.noarch.rpm
    3. Refresh your repository cache.
      • yum clean all
    • TeamForge installation repository configuration for sites without internet access
    1. Contact the CollabNet Support to get the auxiliary installer package for TeamForge 17.8disconnected installation and save it in /tmp.
      • Red Hat Enterprise Linux/CentOS 7.3 64 bit RPM package: CTF-Disconnected-media-17.8.655-104.rhel7.x86_64.rpm
        Note: In addition to the above CentOS 7.3 64 bit RPM package, you must get the following CentOS 7.3 compatibility RPM, which is required for TeamForge 17.8 disconnected media installation on CentOS 7.3 profile: compat-ctf-dc-media-1.1-1.el7.noarch.rpm.
    2. Unpack the disconnected installation package.
      • rpm -Uvh <package-name>
    3. Unpack the compat-ctf-dc-media-1.1-1.el7.noarch.rpm package if you are installing TeamForge 17.8 on CentOS 7.3.
      • rpm -ivh compat-ctf-dc-media-1.1-1.el7.noarch.rpm
    4. Note: If the Red Hat Enterprise Linux/CentOS installation DVD is mounted already, skip the following instructions. If not, mount the DVD.
      Mount the Red Hat Enterprise Linux/CentOS installation DVD. The DVD contains the necessary software and utilities required for installing TeamForge without internet access.

      In the following commands, replace "cdrom" with the identifier for your server's CD/DVD drive, if necessary.

      • cd /media/
      • mkdir cdrom
      • mount /dev/cdrom ./cdrom/

      If there are any spaces in the automount, unmount it first and mount it as a filepath, with no spaces.

    5. Create a yum configuration file that points to the Red Hat Enterprise Linux/CentOS installation DVD.
      • vi /etc/yum.repos.d/cdrom.repo
      Here's a sample yum configuration file.
      [RHEL-CDROM] 
      name=RHEL CDRom 			
      baseurl=file:///media/cdrom/Server/
      gpgfile=file:///media/cdrom/RPM-GPG-KEY-redhat-release 
      enabled=1
      gpgcheck=0
    6. Verify your yum configuration files.
      • yum list httpd
      • yum list apr
  2. Install the following application packages.
    • yum install teamforge-eventq CN-eventq collabnet-nginx collabnet-passenger
    Important: The following warning message, which shows up during TeamForge install/upgrade (while installing CN-eventq rpm) can be safely ignored.
    Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
    installing your bundle as root will break this application for all non-root
    users on this machine.
    ...
    ...
    Errno::ENOENT: No such file or directory - git
    ...
    ...
  3. Copy the site-options.conf file from the TeamForge Application Server(server-01) to the EventQ Server's /opt/collabnet/teamforge/etc/ directory.
    • Adjust the SERVICES and PUBLIC_FQDN tokens, if required.
      server-01:SERVICES=ctfcore ctfcore-database ctfcore-datamart mail etl search codesearch 
      subversion cvs cliserver gerrit gerrit-database binary binary-database reviewboard reviewboard-database 
      reviewboard-adapter
      server-02:SERVICES=eventq mongodb redis rabbitmq
      server-01:PUBLIC_FQDN=my.app.domain.com
    • Make sure you set the MONGODB_APP_DATABASE_NAME site options token.
      MONGODB_APP_DATABASE_NAME=orchestrate
    • If your mongodb user name is different from the default user name which is "eventq", set the token MONGODB_APP_SERVICES_USER in the site-options.conf file. For example, set MONGODB_APP_SERVICES_USER=orchestrate.
  4. New hardware upgrade: Do this on the new EventQ server. Uncompress your backup data and copy the backed up data to the /opt/collabnet/eventq/config directory.
    • cd /tmp
    • tar xzvf eventqbackup.tgz -C /tmp/
    • cd /tmp/backup_dir
    • cp -Rpf *.yml /opt/collabnet/eventq/config/
    • cp -Rpf mongodb/ /opt/collabnet/mongodb
    • cp -Rpf rabbitmq/ /opt/collabnet/rabbitmq
  5. Provision services.
    • teamforge provision
    Note:

    TeamForge 17.4 (and later) installer expects the system locale to be LANG=en_US.UTF-8. TeamForge "provision" command fails otherwise.