Upgrade Review Board

Use these instructions to upgrade Review Board to a latest build.

Attention: Installing or upgrading TeamForge needs root privileges. You must log on as root or use a root shell to install or upgrade TeamForge.

Do this step by step on the TeamForge Application Server

  1. Download the Review Board installer zip file from http://collab.net/downloads/integrations#tab-1 and save it in the /opt/collabnet folder
  2. Upgrade from TeamForge 17.1 or earlier to TeamForge 17.4 or later: The default Review Board data directory has been changed from /opt/collabnet/reaviewboard/data to /opt/collabnet/teamforge/var/reviewboard/data in TeamForge 17.4. If you are upgrading from TeamForge 17.1 or earlier to TeamForge 17.4 or later, regardless of whether you upgrade Review Board on the same or new hardware, you must back up your Review Board data directory from /opt/collabnet/reaviewboard/data and restore it to /opt/collabnet/teamforge/var/reviewboard/data.
    Tip: The Review Board database is backed up already when you have upgraded TeamForge. So, it is not necessary to take a back up of the Review Board database again.
    1. Back up the Review Board data directory.
      • cd /opt/collabnet
      • tar -zcvf /tmp/reviewboard_data.tgz reviewboard
    2. Copy the /tmp/reviewboard_data.tgz file to the /tmp directory of the new server if you are upgrading Review Board on a new hardware.
  3. If you are upgrading from TeamForge 17.4 to TeamForge 17.8 on a new hardware:
    • cd /opt/collabnet/teamforge/var
    • tar -zcvf /tmp/reviewboard_data.tgz reviewboard
    Tip: If you are upgrading from TeamForge 17.4 (or later), the /opt/collabnet/teamforge/var directory would have been backed up already as part of your TeamForge upgrade process, in which case you can skip backing up the /opt/collabnet/teamforge/var directory again.

    Copy the /tmp/reviewboard_data.tgz file to the /tmp directory of the new server.

  4. Make sure that "reviewboard" , "reviewboard-database" and "reviewboard-adapter" identifiers have been added to the host:SERVICES token of the TeamForge Application Server's site-options.conf file.
    server-01:SERVICES=ctfcore ctfcore-database mail search codesearch  etl ctfcore-datamart subversion cvs 
    gerrit gerrit-database binary binary-database reviewboard reviewboard-database reviewboard-adapter cliserver 
  5. Unzip the RBInstaller-17.8.14.zip file.
    • cd /opt/collabnet
    • unzip RBInstaller-17.8.14.zip
  6. Modify these values in the install.conf file to suit your installation environment.
    • vi /opt/collabnet/RBInstaller-17.8.14/installer/install.conf
    Option Description
    rb_dir=/opt/collabnet/teamforge/var/reviewboard The path of the directory where the Review Board files and libraries are installed.
    rb_data_dir=/opt/collabnet/teamforge/var/reviewboard/data The path of the directory where Review Board's database file, review request files and attachments are stored.
    Note: The default Review Board data directory is /opt/collabnet/teamforge/var/reviewboard/data.
    domain=<domain name or host name> The Review Board site information. For example, cu064.cloud.maa.collab.net.
    rb_database_type=postgresql The Review Board database type.
    rb_database_host=<reviewboard_db_hostname> The Review Board database host name.
    rb_database_port=<reviewboard_db_port> The Review Board database port.
    ctf_base_url=https://myapp.collab.net The absolute URL of the TeamForge site that you want to associate to.
    ctf_site_var_dir=/opt/collabnet/teamforge/var The location of the rbctfevents.jar file.
  7. 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.

  8. Restore the Review Board data.
    Note: The default Review Board data directory has been changed from /opt/collabnet/reaviewboard/data to /opt/collabnet/teamforge/var/reviewboard/data in TeamForge 17.4. If you are upgrading from TeamForge 17.1 or earlier to TeamForge 17.4 or later, regardless of whether you upgrade Review Board on the same or new hardware, you must back up your Review Board data directory from /opt/collabnet/reaviewboard/data and restore it to /opt/collabnet/teamforge/var/reviewboard/data.
    Tip: If you are upgrading from TeamForge 17.4 (or later), the /opt/collabnet/teamforge/var directory would have been restored already as part of your TeamForge upgrade process, in which case you can skip restoring the /opt/collabnet/teamforge/var directory again.
    Note: If you are upgrading on a new hardware, ensure that you have already copied the backup of the Review Board data directory to the /tmp directory of the new server.
    1. Restore the Review Board data directory.
      • cd /opt/collabnet/teamforge/var/
      • tar -zxvf /tmp/reviewboard_data.tgz
  9. Run the install.py script available in the Review Board installer directory.
    • cd /opt/collabnet/RBInstaller-17.8.14
    • python ./install.py -i -r --auth-scmuser
  10. Run the migrate.py script available in the Review Board installer directory.
    • cd /opt/collabnet/RBInstaller-17.8.14
    • python ./migrate.py
  11. Restart TeamForge.
    • teamforge restart
  12. If SCM is installed on a separate box, run the following script to authenticate a scmviewer user against a TeamForge Subversion repository for creating a new review request.
    • python ./svn-auth.py --repo-path=https://<scm_domain>/svn/repos/<repo_dir_name>