2. How to... : Add an AccuRev Server
   
Add an AccuRev Server
If the AccuRev server you use for SCM is the same one that the original Administrator user logged into after installation, you may never need to perform the procedures described in this section. But if you have multiple AccuRev SCM servers, then you need to add them to GitCentric.
Note: A client pointing to each master AccuRev server must be on the same machine as the GitCentric server.
Adding an AccuRev server is a two-step process:
1. Register the AccuRev server with GitCentric. You need to register an AccuRev server with GitCentric if:
You are adding another AccuRev server to GitCentric
Your existing AccuRev server has multiple IP addresses
See Registering an AccuRev Server on page 46.
2. Configure the server as described in Configuring the AccuRev Server on page 47.
Registering an AccuRev Server
For security reasons, the GitCentric bridge accepts commands only from IP addresses that it recognizes. If you add an AccuRev server that has multiple IP addresses (for example, if the server has multiple Ethernet cards), you must register each IP address. In this case, you should perform GitCentric operations only against one of these servers entries -- typically one where you have specified a host name rather than an IP address.
To register an AccuRev server:
1. Log in to GitCentric as described in Log In to GitCentric on page 14.
2. Click the Administration button, then click the AccuRev Servers menu to display the Servers page. (See Chapter 5 Administration for reference information.)
3. Click the Add button.
A panel appears to allow you to register the AccuRev server.
4. The AccuRev Server and Port fields are relatively self-explanatory, but the AccuRev CLI Path may need careful reading:
AccuRev Server: -- The host name or IP address of the AccuRev server you wish to associate with one or more repos, or the IP address for an AccuRev server with multiple IP addresses. (The name of the server you first logged in to GitCentric with -- see Log In to GitCentric on page 14 -- is automatically added to the GitCentric database.)
Note that if you specify localhost, this indicates an AccuRev server on the GitCentric host, not necessarily the machine where you are running your browser.
Port: -- This is typically “5050” for most AccuRev servers, but the AccuRev administrator may have changed it to something different.
AccuRev CLI Path: -- This is the path to the AccuRev client executable on the GitCentric server that should be used to communicate with a particular AccuRev server. For example:
<ac_home>/bin/accurev
For more information, see A Note about the CLI Path Setting on page 74.
5. Click the Save button.
GitCentric refreshes the Servers table with the server you just added.
Configuring the AccuRev Server
The previous procedure simply registers the AccuRev server with GitCentric. Before you can use this server with GitCentric and Git, you must configure the server using the following procedure.
1. Check to see if a triggers directory exists under <ac_home>/storage/site_slice/.
If not, create it.
2. Copy the server_master_trigger.pl file from <gc_home>/bin to the AccuRev server trigger directory. For example:
> cd <gc_home>/bin
> cp server_master_trig.pl <ac_home>/storage/site_slice/triggers
> cd <ac_home>/storage/site_slice/triggers
> chmod +x server_master_trig.pl
Note: server_master_trig.pl includes several lines of documentation in comments toward the end of the file.
3. Locate the ################ ACCUREV CLIENT PATH section in the server_master_trig.pl file and specify the path for your AccuRev client. For example:
$::AccuRev = "/usr/accurev/bin/accurev";
4. Log in to AccuRev.
Tip: Log in using the -n option so that the user’s log in session does not expire.
5. See the GitCentric Installation and Release Notes for suggestions about testing newly-configured servers.
Configure Multiple AccuRev Servers
You can configure additional AccuRev servers for GitCentric using the same procedures above. However, you should observe the following guidelines:
Use the same username and password across all servers. Otherwise, you will frequently need to re-enter your login credentials.
If the multiple AccuRev servers are running different AccuRev versions, you must have an AccuRev CLIENT for each version installed on the GitCentric server. When you configure a server, you must point to the correct client in the “CLI Path” field. For more information, see A Note about the CLI Path Setting on page 74.
If you have a situation where IP addresses can change over time (such as dynamic IP addresses assigned via DNS), you may need to consider setting AC_BRIDGEAPI_SECURITY_POLICY to AllowAnyHost. Note, however, that this workaround has a security impact that you need to carefully consider before implementing it. See GitCentric Bridge Configuration Settings on page 79 for more information.