Set up a Git replica server

On sites distributed across multiple geographic locations, Git replica servers are local and remote mirror servers that can provide up to date copies of the central repositories, which if set up, can address load balancing and fetch performance issues. You can set up one or more Git replica servers (also referred to as slave or mirror servers) with TeamForge 8.1 and later.

Points to note before you begin

  1. Install Red Hat Enterprise Linux/CentOS 6.8 or later and log on to the server as root.
    • Don't customize your installation. Select only the default packages list.
    • 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. Important:
  2. Check your basic networking setup. See Set up networking for more information.
  3. If the Git replica server has SELinux enabled, run it in 'Permissive' mode temporarily while installing or upgrading TeamForge. 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.
    3. If not, run the following command to bring it to 'Permissive' mode.
      • setenforce 0
  4. Upgrade the operating system packages.
    • yum upgrade
  5. Reboot the server.
    • reboot
  6. Configure your TeamForge installation repository. See TeamForge installation repository configuration for Red Hat/CentOS.
  7. Install the Git packages.
    • yum install teamforge-git
  8. Set up the site-options.conf token for Git.
    • vi /opt/collabnet/teamforge/etc/site-options.conf
    Note: In this topic:
    • is an example of the Fully Qualified Domain Name (FQDN) of your TeamForge application server.
    • is an example of the Fully Qualified Domain Name (FQDN) of your Git integration server.
    • is an example of the Fully Qualified Domain Name (FQDN) of your Git replica server.
    1. Modify the HOST tokens. database datamart etl indexer subversion cvs binary
    2. Turn on the SSL for your site by editing the relevant variables in the site-options.conf file. To generate the SSL certificates, see Generate SSL certificates.
      • The SSL_CA_CERT_FILE and SSL_CHAIN_FILE are optional.
      • If you use certificates that are generated in-house, self-signed, or signed by a non-established Certificate Authority, they must be registered with each client system that will connect to the TeamForge server.
      • For the setup discussed in this topic, add the certificate of to the JVM of and In addition, add the certificate of to the JVM of Click here for more information.
    3. Set the gerrit replication server mode.
    4. Set the external system ID of the master Git integration server. See 'Points to note before you begin'.
    5. Set the obfuscation related tokens as discussed earlier in Points to note before you begin.
    6. Save the site-options.conf file.
  9. Deploy services.
    • /opt/collabnet/teamforge/bin/teamforge provision

    The "provision" command prompts for response before it bootstraps or migrates data during TeamForge installation and upgrade respectively. Enter "Yes" or "No" to proceed.

  10. Run the TeamForge post installation script. For more information, see
    • /opt/collabnet/teamforge/runtime/scripts/
Now, the gerrit service is running in replica mode. You can now find the newly created Git replica server listed on TeamForge server by accessing the following url. http://<TF_HOST>/sf/sfmain/do/listSystems
Once you have set up one or more Git replica servers, you can replicate repositories. For more information, see Replicate repositories with Git replica servers.