Set up a Git Replica Server
- A Git Replica Server has one and only one
master
Git server. - It’s not possible to set up both Git master and slave on the same server. However, you can have multiple master and slave servers in your TeamForge environment.
- Git replication servers can be set up with TeamForge 8.1 or later only.
You can have your master Git integration server installed on the TeamForge Application Server or on a separate server dedicated to Git/SCM integration.


- Make sure you have upgraded your Git integration to TeamForge-Git v8.4.6 or later.
-
Have the master Git integration server’s
externalSystemId
handy.Open the
/opt/collabnet/gerrit/etc/gerrit.config
file on the master Git integration server and note down theexternalSystemId
from the [teamforge] section.Alternatively, log on to the TeamForge Application Server as a Site Administrator, click Admin > Integrations > SCM Integrations, select the master Git integration server, click Edit and look for a token such as
exsy####
, for exampleexsy1002
, in the browser URL. This is the external system ID of your Git integration server. - Open the TeamForge Application Server’s
site-options.conf
file and keep the values of the following tokens handy.SCM_DEFAULT_SHARED_SECRET=
Note down the values of the following tokens if and only if obfuscation is enabled (
OBFUSCATION_ENABLED=true
):OBFUSCATION_ENABLED= OBFUSCATION_KEY= OBFUSCATION_PREFIX= AUTO_DATA=
-
Install Red Hat Enterprise Linux/CentOS 7.9 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. - Check your basic networking setup. See Set up Networking for more information.
- Upgrade the operating system packages.
yum upgrade
- Reboot the server.
reboot
-
TeamForge Installation Repository Configuration for Sites with Internet Access
- Contact the CollabNet Support and download the TeamForge 20.3 installation repository package to
/tmp
. - Install the repository package.
yum install -y /tmp/collabnet-teamforge-repo-20.3-0-noarch.rpm
- Refresh your repository cache.
yum clean all
TeamForge Installation Repository Configuration for Sites without Internet Access
- Contact the CollabNet Support to get the auxiliary installer package for TeamForge 20.3 disconnected installation and save it in
/tmp
.- RHEL/CentOS 7.9 64 bit:
CTF-Disconnected-media-20.3.398-677.rhel7.x86_64.rpm
- In addition to the above CentOS 7.9 64 bit RPM package, you must get the following CentOS 7.9 compatibility RPM, which is required for TeamForge 20.3 disconnected media installation on CentOS 7.9 profile:
compat-ctf-dc-media-1.2-1.el7.noarch.rpm
.
- RHEL/CentOS 7.9 64 bit:
- Unpack the disconnected installation package.
rpm -ivh <package-name>
- Unpack the
compat-ctf-dc-media-1.2-1.el7.noarch.rpm
package if you are installing TeamForge 20.3 on CentOS 7.9.rpm -ivh compat-ctf-dc-media-1.2-1.el7.noarch.rpm
- If you are installing TeamForge 20.3 on RHEL/CentOS 6.10, contact the CollabNet Support to get the
python-modules-sources-el6.zip
file and unzip it to/opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
.unzip python-modules-sources-el6.zip -d /opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
If you are installing TeamForge 20.3 on RHEL/CentOS 7.9, contact the CollabNet Support to get the
python-modules-sources-el7.zip
file and unzip it to/opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
.unzip python-modules-sources-el7.zip -d /opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
-
If not mounted already, mount the RHEL/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.
- Create a yum configuration file that points to the RHEL/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
- Verify your yum configuration files.
yum list httpd yum list apr
- Contact the CollabNet Support and download the TeamForge 20.3 installation repository package to
- Install the Git packages.
yum install teamforge-git
- Set up the
site-options.conf
tokens for the Git Replica Server.vi /opt/collabnet/teamforge/etc/site-options.conf
It is assumed that:
my.app.domain.com
is the Fully Qualified Domain Name (FQDN) of your TeamForge Application Server.
my.git.domain.com
is the Fully Qualified Domain Name (FQDN) of your Git Integration Server.
my.gitreplica.domain.com
is the Fully Qualified Domain Name (FQDN) of your Git Replica Server.- Set up the
SERVICES
tokens.my.gitreplica.domain.com:SERVICES=gerrit gerrit-database my.app.domain.com:SERVICES=ctfcore ctfcore-database ctfcore-datamart etl search subversion binary binary-database
- 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.SSL=on SSL_CERT_FILE= SSL_KEY_FILE= SSL_CHAIN_FILE=
- The SSL_CHAIN_FILE is 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
my.app.domain.com
to the JVM ofmy.git.domain.com
andmy.gitreplica.domain.com
. In addition, add the certificate ofmy.gitreplica.domain.com
to the JVM ofmy.git.domain.com
. Click here for more information.
- Set the gerrit replication server mode.
GERRIT_REPLICATION_MODE=slave
- Set the external system ID of the master Git integration server.
GERRIT_REPLICATION_MASTER_EXTERNAL_SYSTEM_ID=exsy####
- Set the obfuscation related tokens.
- Save the
site-options.conf
file.
- Set up the
- Provision services.
teamforge provision
Now, the gerrit service is running in replica mode. You can now find the newly created Git Replica Server listed on TeamForge Application 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.
Upgrade Git Replica Servers
To upgrade existing Git Replica Servers:
- Log on to the Git Replica Server and move the existing TeamForge repository from
/etc/yum.repos.d
. - Remove the
collabnet-teamforge-internal-repo.rpm
.yum erase collabnet-teamforge-internal-repo rpm
-
TeamForge Installation Repository Configuration for Sites with Internet Access
- Contact the CollabNet Support and download the TeamForge 20.3 installation repository package to
/tmp
. - Install the repository package.
yum install -y /tmp/collabnet-teamforge-repo-20.3-0-noarch.rpm
- Refresh your repository cache.
yum clean all
TeamForge Installation Repository Configuration for Sites without Internet Access
- Contact the CollabNet Support to get the auxiliary installer package for TeamForge 20.3 disconnected installation and save it in
/tmp
.- RHEL/CentOS 7.9 64 bit:
CTF-Disconnected-media-20.3.398-677.rhel7.x86_64.rpm
- In addition to the above CentOS 7.9 64 bit RPM package, you must get the following CentOS 7.9 compatibility RPM, which is required for TeamForge 20.3 disconnected media installation on CentOS 7.9 profile:
compat-ctf-dc-media-1.2-1.el7.noarch.rpm
.
- RHEL/CentOS 7.9 64 bit:
- Unpack the disconnected installation package.
rpm -ivh <package-name>
- Unpack the
compat-ctf-dc-media-1.2-1.el7.noarch.rpm
package if you are installing TeamForge 20.3 on CentOS 7.9.rpm -ivh compat-ctf-dc-media-1.2-1.el7.noarch.rpm
- If you are installing TeamForge 20.3 on RHEL/CentOS 6.10, contact the CollabNet Support to get the
python-modules-sources-el6.zip
file and unzip it to/opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
.unzip python-modules-sources-el6.zip -d /opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
If you are installing TeamForge 20.3 on RHEL/CentOS 7.9, contact the CollabNet Support to get the
python-modules-sources-el7.zip
file and unzip it to/opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
.unzip python-modules-sources-el7.zip -d /opt/collabnet/teamforge/service/reviewboard/resources/SOURCES/python-modules-sources
-
If not mounted already, mount the RHEL/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.
- Create a yum configuration file that points to the RHEL/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
- Verify your yum configuration files.
yum list httpd yum list apr
- Contact the CollabNet Support and download the TeamForge 20.3 installation repository package to
- Refresh your repository cache.
yum clean all
- Upgrade the Git packages.
yum install teamforge-git
- Provision services.
teamforge provision
Replicate Repositories with Git Replica Servers
It is assumed that you already have one or more Teamforge projects that consists of one or more Git repositories that you want to replicate.
- To start replicating a repository–go to the TeamForge project–select the Git repository you want to replicate, select the Settings tab and then select the Replicas tab.
This page lists the available Git Replica Servers.
- From the list of Replica Servers, click the Add button of one or more Replica Servers to have the server(s) replicate the selected repository.
- Click Save.
- Push a commit and verify if it’s replicated on the Replica Servers.