Install Git on a separate server

In this setup, we install the Git integration services on a separate server. It is assumed that TeamForge is installed on a separate server.

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

In this setup, TeamForge and Git (gerrit and gerrit-database) run on two separate servers : server-01 and server-02 respectively. It is assumed that TeamForge has been installed already on server-01.

Do this on the Git server (server-02)

  1. Install Red Hat Enterprise Linux/CentOS 7.3 and log on as root.

    The host must be registered with the Red Hat Network if you are using Red Hat Enterprise Linux.

    See the Red Hat installation guide for help.

  2. Check your basic networking setup. See Set up Networking for more information.
  3. If the Git server has SELinux enabled, run it in 'Permissive' mode temporarily while installing or upgrading TeamForge.
    Important: If you have SELinux in "enforcing" mode, you must either disable SELinux or switch to "Permissive" mode (recommended) before running the /opt/collabnet/teamforge/bin/teamforge provision command. TeamForge create runtime fails otherwise.
    1. Verify if SELinux is running in enforcing mode.
      • getenforce
    2. If the output of the getenforce command is "Permissive", continue with the next step. If not, run the following command to bring it to 'Permissive' mode.
      • setenforce 0
    See Set up SELinux to have TeamForge run in SELinux enforcing mode after completing the installation or upgrade.
  4. Configure your TeamForge installation repository.
    • TeamForge installation repository configuration for sites with internet access
    1. Contact the CollabNet Support and download the TeamForge 17.4 installation repository package to /tmp.
    2. Install the repository package.
      • yum install -y /tmp/collabnet-teamforge-repo-17.4.27-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.4 disconnected installation and save it in /tmp.
      • Red Hat Enterprise Linux/CentOS 7.3 64 bit RPM package: CTF-Disconnected-media-17.4.824-110.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.4 disconnected media installation on CentOS 7.3 profile: compat-ctf-dc-media-1.0-1.el7.centos.noarch.rpm.
    2. Unpack the disconnected installation package.
      • rpm -ivh <package-name>
    3. Unpack the compat-ctf-dc-media-1.0-1.el7.centos.noarch.rpm package if you are installing TeamForge 17.4 on CentOS 7.3.
      • rpm -ivh compat-ctf-dc-media-1.0-1.el7.centos.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
  5. Install the Git packages.
    • yum install teamforge-git
  6. Copy the site-options.conf file from the TeamForge Application Server (server-01) to the /opt/collabnet/teamforge/etc/ directory of the Git integration server (server-02) and configure site-options.conf file.
    • vi /opt/collabnet/teamforge/etc/site-options.conf
    1. Configure the services and domain name tokens.
      server-01:SERVICES=ctfcore ctfcore-database etl ctfcore-datamart mail search codesearch 
      eventq redis mongodb rabbitmq subversion cvs binary binary-database reviewboard reviewboard-database
      server-02:SERVICES=gerrit gerrit-database
      server-01:PUBLIC_FQDN=my.app.domain.com
      server-02:PUBLIC_FQDN=my.git.domain.com
      Note: The above example lists all possible services that could run on the TeamForge Application Server. You may have to adjust the list of services for server-01:SERVICES token to suit your site's distributed server setup, if required.
    2. Save the site-options.conf file.
  7. Deploy services.
    • /opt/collabnet/teamforge/bin/teamforge provision
    Note:

    The "provision" command prompts for response before it bootstraps or migrates data during TeamForge installation and upgrade respectively. Enter "y" or "N" to proceed. For more information, see the TeamForge script.

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