Skip to main content
Version: TeamForge 23.0

Install TeamForge with Oracle Database

Success In this distributed setup, TeamForge and Oracle database services are distributed across two servers, server-01 and server-02 as illustrated in the following table.
Success You can install TeamForge on both RHEL 8.6 and RHEL/CentOS 7.9. In this distributed setup, all the following services are installed on RHEL 8.6 servers.

server-01
TeamForge Application Server
server-02
Database Server
ctfcorectfcore-database
mailctfcore-datamart
etl
search
codesearch
gerrit
gerrit-database
subversion
reviewboard1
reviewboard-database
reviewboard-adapter2
binary
binary-database
cliserver
service-monitor
important

Baseline services are not supported in TeamForge setup with Oracle database.

Here's a list of dos, don'ts and points to remember when you install or upgrade TeamForge.

Prepare the Servers for TeamForge Installation (server-01 through server-02)

  1. Install RHEL 8.6 and log on as root.

    Success The host must be registered with the Red Hat Network if you are using Red Hat Enterprise Linux.
    Success See the RHEL 8.6 Installation Guide for help.

  2. Check your networking setup. See Set up Networking for more information.

Success You need not configure the TeamForge installation repository on the Oracle Database Server.

Install the TeamForge Services

  1. Install the TeamForge application services on the TeamForge Application Server (server-01).

    yum install teamforge

    Install Monit.

    important

    If you haven't already installed the latest version of the Monit application, download it here.

    1. Download Monit for

      • RHEL 8.x from the EPEL repository.

        wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
        rpm -ivh epel-release-latest-8.noarch.rpm
      • RHEL/CentOS 7.x from the EPEL repository.

        wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
        rpm -ivh epel-release-latest-7.noarch.rpm
    2. Install Monit.

      yum install monit
  2. Install the Review Board services on the TeamForge Application Server (server-01).

    yum install teamforge
  3. Download the corresponding version of Oracle client and run the following command on the TeamForge Application Server (server-01).

    yum localinstall <path to oracle client rpm>

Set up the Oracle Database Server (server-02)

  1. Install Oracle 19c.

    note

    Make sure your database uses UTF8 or AL32UTF8 encoding. This is needed to support users in Asian languages. See this Oracle knowledge base article.

  2. Log on to the Oracle Database Server as a system administrator with SYSDG privilege and run the following query.

    alter system set parallel_threads_per_cpu=4;
  3. Log in as an Oracle user and create the site database user and permissions.

    To use an Oracle database for your TeamForge data, set up the Oracle database and tell the TeamForge installer how to handle it.

    TeamForge Database Setup

    note

    Make sure your database uses UTF8 or AL32UTF8 encoding. This is needed to support users in Asian languages. See this Oracle knowledge base article.

    1. Connect to your Oracle database.
      SQL> connect <adminusername>@<db_name>/<adminpassword> as sysdba
    2. Create the database user and password you will use to connect from TeamForge to Oracle.
      SQL> create user <sf user> identified by <sf passwd> default tablespace <your tablespace> temporary tablespace <temporary tablespace>;
    3. Grant permissions to the user that you just created.
      SQL> grant unlimited tablespace to <sf user>;
      SQL> grant create snapshot to <sf user>;
      SQL> grant create cluster to <sf user>;
      SQL> grant create database link to <sf user>;
      SQL> grant create procedure to <sf user>;
      SQL> grant create sequence to <sf user>;
      SQL> grant create trigger to <sf user>;
      SQL> grant create type to <sf user>;
      SQL> grant create view to <sf user>;
      SQL> grant query rewrite to <sf user>;
      SQL> grant alter session to <sf user>;
      SQL> grant create table to <sf user>;
      SQL> grant create session to <sf user>;
      SQL> grant create any synonym to <sf user>;
      SQL> exit
    4. Create the database read-only user that you will use to connect from TeamForge.
      SQL> create user <database_readonly_user> identified by <database_readonly_password> default tablespace <your tablespace> temporary tablespace <temporary tablespace>;
    5. Grant the required permissions to the read-only user that you just created.
      SQL> grant create session to <database_readonly_user>;
      SQL> exit
    6. Connect to your Oracle database as.
    SQL> connect <sf user>@<db_name>/<sf passwd>
    1. Grant the 'create synonym' permission on TeamForge database to the read-only user that you just created.
      SQL> begin
      for i in (select table_name from user_tables) loop
      execute immediate 'grant select on '|| i.table_name||' to <database_readonly_user>';
      execute immediate 'create synonym <database_readonly_user>.'||i.table_name||' for '||i.table_name||'';
      end loop;
      end;

      SQL> exit

    TeamForge Datamart Setup

    note

    Make sure your database uses UTF8 or AL32UTF8 encoding. This is needed to support users in Asian languages. See this Oracle knowledge base article.

    1. Connect to your Oracle database.
      SQL> connect <adminusername>@<db_name>/<adminpassword> as sysdba
    2. Create the datamart user you will use to connect from TeamForge.
    SQL> create user <reports_database_user> identified by <reports_database_password> default tablespace <your tablespace> temporary tablespace <temporary tablespace>;
    1. Grant permissions to the user that you just created.
    SQL> grant unlimited tablespace to <reports_database_user>;
    SQL> grant create snapshot to <reports_database_user>;
    SQL> grant create cluster to <reports_database_user>;
    SQL> grant create database link to <sreports_database_user>;
    SQL> grant create procedure to <reports_database_user>;
    SQL> grant create sequence to <reports_database_user>;
    SQL> grant create trigger to <reports_database_user>;
    SQL> grant create type to <reports_database_user>;
    SQL> grant create view to <reports_database_user>;
    SQL> grant query rewrite to <reports_database_user>;
    SQL> grant alter session to <reports_database_user>;
    SQL> grant create table to <reports_database_user>;
    SQL> grant create session to <reports_database_user>;
    SQL> grant create any synonym to <reports_database_user>;
    SQL> exit
    note

    Replace with the datamart username specified in the site-options.conf and with the database password specified in site-options.conf.

    1. Create the datamart read-only user that you will use to connect from TeamForge.
    SQL> create user <reports_readonly_user> identified by <reports_readonly_password> default tablespace <your tablespace> temporary tablespace <temporary tablespace>;
    1. Grant the required permissions to the read-only user that you just created.
    SQL> grant create session to <reports_readonly_user>;
    SQL> exit
    note

    The TeamForge installer creates the tables and default values for you.

    1. Connect to your Oracle database as.
    SQL> connect <reports_database_user>@<db_name>/<reports_database_password>
    1. Grant the 'create synonym' permission on TeamForge datamart to the read-only user that you just created. SQL> begin
    for i in (select table_name from user_tables) loop 
    execute immediate 'grant select on '|| i.table_name||' to <reports_readonly_user>';
    execute immediate 'create synonym <reports_readonly_user>.'||i.table_name||' for '||i.table_name||'';
    end loop;
    end;

    SQL> exit
  4. Log on to the TeamForge Application Server and copy the Oracle Datamart setup script from /opt/collabnet/teamforge/runtime/scripts/ to the /tmp directory of the Oracle Database Server (server-02).

    scp /opt/collabnet/teamforge/runtime/scripts/datamart-oracle-setup.sh <username>@<server-02>:/tmp
  5. Copy the Oracle Datamart setup script to /u1 directory.

    mkdir /u1
    cp /tmp/datamart-oracle-setup.sh /u1
  6. Create the reporting user and schema.

    tip

    Skip this step if you have already set up the datamart as discussed earlier. Your responses to the datamart-oracle-setup.sh script's prompts must match the values of the equivalent variables of the TeamForge Application Server's site-options.conf file.

    cd /u1
    sh datamart-oracle-setup.sh

Set up the TeamForge Application Server (server-01)

Log on to the TeamForge Application Server (server-01), set up the site-options.conf file, and provision the services.

  1. Rename the sample Oracle site configuration file in the /opt/collabnet/teamforge/etc/ directory.

    cd /opt/collabnet/teamforge/etc/
    cp site-options-oracle.conf site-options.conf
  2. Set up your site's master configuration file.

       vi /opt/collabnet/teamforge/etc/site-options.conf

    host:SERVICES Token

    server-01:SERVICES=ctfcore service-monitor mail etl search subversion codesearch cliserver gerrit gerrit-database  binary binary-database reviewboard reviewboard-database reviewboard-adapter
    server-02:SERVICES=ctfcore-database ctfcore-datamart

    host:PUBLIC_FQDN Token

    server-01:PUBLIC_FQDN=my.app.domain.com

    Configure the Oracle Database Tokens

    Configure the Oracle database name, usernames and passwords as configured on the Oracle Database Server.

    • Database type is oracle (DATABASE_TYPE=oracle)
    • Database service name is the host name of the Oracle Database Server (for example, DATABASE_SERVICE_NAME=cu349.maa.collab.net)
    • Reports database service name is the host name of the server where the datamart is (for example, REPORTS_DATABASE_SERVICE_NAME=cu349.maa.collab.net)
       DATABASE_TYPE=oracle

    # Adjust usernames/passwords to match what has been configured on the database server.
    DATABASE_USERNAME=ctfuser
    DATABASE_PASSWORD=ctfpwd
    DATABASE_READ_ONLY_USER=ctfrouser
    DATABASE_READ_ONLY_PASSWORD=ctfropwd
    DATABASE_NAME=orcl
    DATABASE_SERVICE_NAME=

    # Adjust usernames/passwords to match what has been configured on the database server.
    REPORTS_DATABASE_USERNAME=ctfrptuser
    REPORTS_DATABASE_PASSWORD=ctfrptpwd
    REPORTS_DATABASE_NAME=orcl
    REPORTS_DATABASE_READ_ONLY_USER=ctfrptrouser
    REPORTS_DATABASE_READ_ONLY_PASSWORD=ctfrptropwd
    REPORTS_DATABASE_SERVICE_NAME=

    Save the site-options.conf file.

For further customization of your site configuration (SSL settings, password policy settings, PostgreSQL settings, LDAP settings and so on):

  1. Provision services.

    teamforge provision

    TeamForge 23.0 installer expects the system locale to be LANG=en_US.UTF-8. TeamForge create runtime (teamforge provision) fails otherwise.

Verify TeamForge Installation

  1. Verify TeamForge installation.

    1. Reboot the server and make sure all services come up automatically at startup.
    2. Log on to the TeamForge web application using the default Admin credentials.
      • Username: admin
      • Password: admin
    3. Create a sample project. See Create a TeamForge Project.
    4. Write a welcome message to your site's users. See Create a Site-wide Broadcast.

Post Install Tasks

Also See...

FAQs on Install / Upgrade / Administration

Footnotes

  1. TeamForge 23.0 supports Review Board 4.0.6 on RHEL 8.6 and Review Board 4.0.6 on RHEL/CentOS 7.9.

  2. reviewboard-adapter must always be installed on the TeamForge Application Server.