GitCentric installation

This section lists the installation steps for GitCentric. Before you begin the installation, refer to Before installing GitCentric.

Installation flow

This section provides a high level view of the steps required for installing the product.

To set up your machine with GitCentric:

  1. Install Linux, if necessary, as the GitCentric server needs to run on a Linux host.
  2. Create (or identify) a <gc_installer> OS administrative user, and log in to this account to perform the rest of the installation.
  3. Download the components you will need to install (AccuRev installer, GitCentric installer, AccuRev and GitCentric license keys, and so forth).
  4. Install the AccuRev Server (5.6 or higher) , AccuRev Web UI Server , and AccuRev Client.
  5. Install GitCentric as the OS user <gc_installer>.
  6. Restart Tomcat.
  7. Configure GitCentric and AccuRev.
  8. Configure the server_master_trig.pl file in the AccuRev triggers directory.
  9. Bring up the GitCentric Web UI and log in.

Back to top

Install GitCentric

Except where noted below, first-time GitCentric installations and upgrades from previous releases are the same. Refer to Generic names used during installation during this procedure.

  1. Log in as the <gc_installer> administrative user (created above in the Linux Installation). <gc_installer> should be the same user that installed AccuRev.
    Note: If you have just installed AccuRev for the first time as described in the previous section, you should log out and log back into the OS to ensure that environment variables which the AccuRev installer appended to your .profile (JRE_HOME and LD_LIBRARY_PATH) have been set and are available to the GitCentric installer.
  2. Get a copy of the latest GitCentric installer and save it in your Downloads directory. You can get the GitCentric installer from the Support Line web site: http://supportline.microfocus.com
  3. The GitCentric installation assumes that the Tomcat web server is running, and that “hot deploy” mode is enabled (this is the default mode when Tomcat is installed). If your site has turned off this mode, we recommend that you turn it back on for the duration of the installation process by setting autoDeploy to true in the Tomcat server.xml configuration file.
  4. Make sure that the AccuRev database server is running. You can use the following commands to verify that the database server is running:
    > <ac_home>/postgresql/bin/psql -h localhost -U <db-admin-name> -p <db-port> -l
    Note: The final parameter for the psql command is hyphen lower-case el.
  5. From the Downloads directory, run the installer, where <AccuRevGitCentricInstall> is the name of the current GitCentric installation package, such as AccuRevGitCentric_2017_1_00_Linux_x86.bin:
    > sh ./<AccuRevGitCentricInstall>.bin
    Note: You can run the installer in a non-graphical console mode with the -i option:
    > sh ./<AccuRevGitCentricInstall>.bin -i console

    The installer will automatically run in console mode if it determines that it is unable to run in graphical mode.

  6. The installer procedure is fairly self-explanatory. Note the following:
    • Adjust the path of the AccuRev server as necessary, and ensure that the path is accurate. For example, if the default assumes /home/<gc_installer>/accurev and the server is actually located at /opt/accurev, adjust the path accordingly.
      Note: If you are using AccuRev in a replication environment, this is the location of the master AccuRev Server.
    • Adjust the path of the GitCentric installation as necessary. Again, if the default is /home/<gc_installer>/AccuRevGitCentric and you want to install in /opt/AccuRevGitCentric, adjust the path accordingly.
      Note: If you install in /opt or some other root-owned directory, you must use pseudo commands to create the installation directory and ensure that ownership and permissions are correct. For Upgrades only: If you are upgrading an existing GitCentric installation, you must specify

      the existing installation path as the location for the new GitCentric installation.

  7. Restart Tomcat:
    <tomcat_home>/bin/shutdown.sh
    <tomcat_home>/bin/startup.sh
  8. Configure GitCentric and AccuRev:

    Note: If you are using GitCentric in a replication environment, perform all AccuRev Server configuration on the AccuRev master server.

    1. Add the ASSIGN_USER_PRIVILEGE role in the AccuRev Server configuration file (acserver.cnf). Restart AccuRev Server for this change to take effect.
    2. Copy server_master_trig.pl from <gc_home>/bin to <ac_home>/storage/site_slice/triggers.
    3. Edit the server_master_trig.pl (after it is copied) to have the correct path to the accurev client on the line beginning '$::AccuRev ='
    4. On the AccuRev Server, establish a persistent AccuRev login with accurev login -n <user> <password>.
      Note: Step 3 and 4 are required for the server_master_trig.pl script to run AccuRev commands when the trigger fires.

Back to top

Generic names used during installation

The setup process involves a number of configurable elements. This section describes the names used during installation.

Use the Name at Your Site column in the following table to record the names you plan to use.

Generic Name Description Name at Your Site
<gc_installer> Linux admin OS account for installing AccuRev, GitCentric, etc. If you have an existing AccuRev server on Linux, this should be the account you used to install it, such as acserver. If you are starting from scratch, you can create a new one such as gcadmin.  
<gc_sync_user> This is the AccuRev “service account” (typically gcSyncUser) that GitCentric uses to automatically keep Git and AccuRev in sync. This is a member of the scm_bridge_group group, which is set to be the value of ASSIGN_USER_PRIVILEGE in the acserver.cnf configuration file on each AccuRev server controlled by GitCentric. For any single mapped repository, there is an AccuRev user who is the service account.
Note: The <gc_sync_user> should not be a member of an AccuRev administrator group.
 
<gc_home> Location where GitCentric is installed. This is typically: (Linux) ~<gc_installer>/AccuRevGitCentric  
<ac_home> Location where AccuRev is installed. For GitCentric, this is typically:

(Linux) ~<gc_installer>/accurev (but sometimes /opt/accurev or elsewhere).

Note: If you are using AccuRev in a replication environment, this is the location of the AccuRev master server.
 
<tomcat_install> Location where the Tomcat web server is installed. For GitCentric, this is typically: (Linux) <ac_home>/WebUI/tomcat.  
<db-port> Port number that the database server runs on. Defaults to 5075.  
<db-admin-name> Name of the database superuser. Defaults to postgres.  
<db-admin-pass> Password for <db-admin-name>.  

Back to top

Test the GitCentric Bridge Connection

Perform the following tests to ensure that various GitCentric modules are in place and that the operating system meets basic requirements to run GitCentric successfully. This test also ensures that there are no firewall issues.

To test the connection to the GitCentric bridge:

  1. From the GitCentric server command line:
    wget -q -O - http://localhost:8080/kandoBridge/v1

    You should see a HTTP Request sent message, followed by additional information, and ending with v1 saved [nn/nn].

  2. Cat the file v1:
    cat ./v1

    You should see a message displaying a SHA, like this:

    {"sha", "<40-hex chars>"}

    where <40-hex chars> is the SHA value. Any other result indicates a problem that should be corrected.

Back to top

Move GitCentric to a new machine

One variation of the GitCentric installation process involves moving GitCentric repositories to a new machine on which a new version of GitCentric is installed. For example, this might be required after you have upgraded a server. Perform the following steps:

On the existing machine

Using tar or a similar copy utility to make a copy of all Git repositories that are mapped to AccuRev. Git repositories are located in the <gc_home>/site/git directory.

On the new machine

  1. Install GitCentric as described in Install GitCentric .
  2. Drop the GitCentric repositories you copied previously to <gc_home>/site/git in the new GitCentric installation.
  3. Stop and restart Tomcat with the following commands:

    <tomcat_home>/bin/shutdown.sh
    <tomcat_home>/bin/startup.sh
  4. Configure your new GitCentric installation. This requires creating new branch-stream mappings to associate your Git repositories with your AccuRev depots. For more information, see Map a Git branch to an AccuRev stream.
  5. Re-register GitCentric.

Tip: For information related to moving AccuRev, see Moving the AccuRev Server and Repository to Another Machine .

Back to top

Uninstall GitCentric

The GitCentric uninstaller removes everything in the GitCentric installation directory, including the GitCentric database. Therefore, before running the uninstaller, back up any files you need to keep, and use the full_backup.sh command to back up the GitCentric database. For details, see Backup and Restore.

The GitCentric uninstall command must be run from the home directory of the user who performed the GitCentric installation, <gc_installer>.

To uninstall GitCentric, from this location, run:

./Uninstall\ AccuRevGitCentric

The uninstaller displays a warning message. You can cancel the uninstall operation at this time if you choose.

Back to top

Next steps: