The ClearCase Bridge Quick Start Guide

/!\ Caution: Before setting up bridges for production systems, please refer to the ClearCase Bridge Administration Guide for important information on planning and setting up bridges. It is strongly recommended that you test your bridge setup in a test environment before applying bridges to a production environment to ensure that the correct result is achieved.

Introduction

Welcome to Clearvision's ClearCase Bridge: Integrating Subversion and Git with ClearCase.

/!\ Please note that CC2GIT functionality is currently in beta with an official release expected soon.

System Diagram

Prerequisites

The following prerequisites need to be in place before you can start using CC2SVN.

Licence

Run the Clearvision/cc2x/tools/get_license_info program in a terminal window. Send the information requested to sales@clearvision-cm.com to apply for a license.

ClearCase Bridge Installation

The installation consists of three parts: the ClearCase Bridge server and Webadmin Server, Subversion hooks and ClearCase attribute type creation.

It is recommended to install and run the ClearCase Bridge server and the Webadmin server under the same user id. If you do need to use different user id's, then please make sure file permissions are set appropriately on the workspace directory, in particular the webadmin subdirectory and the files it contains.

Start by unpacking the zip file on the machine to be used as the ClearCase Bridge server host. Note that files can be extracted in any location. However, recommended locations are C:\Program Files on Windows and /opt on Linux hosts. The following directory structure will be created:

ClearCase Bridge Webadmin Server

The Webadmin server must be configured and started before the ClearCase Bridge server is started. This will create and configure important data structures required for the ClearCase Bridge server.

Edit Clearvision/cc2svn/server/cc2x_server.cfg using a suitable text editor (avoid Notepad or MS Word as these may introduce unwanted characters, corrupting config files) and configure the following parameters:

[General]
; Staging area for cc2x information
workspace=/opt/Clearvision/cc2x/workspace

; Email server information to allow the !ClearCase Bridge to send email notifications on problems
smtp_host=mail.server.com
smtp_username=user
smtp_password=password
from_address=user@localhost

[License]
company_name=Your Company Plc
licence_email=admin@yourcompany.com
expiry_date=2008-12-31
bridges=999
allow_svn_bridges=1
allow_git_bridges=1
license_key=PLEASE_ADD_YOUR_LICENCE_key_HERE
license_certificate=PLEASE_ADD_YOUR_LICENCE_certificate_HERE

[Server]
; Define this ClearCase Bridge server machine as per your license
server_ip=192.168.1.2

[WebAdmin]
; Port for webadmin server
webadmin_port=8181

The License and Server sections must match the licence received from Clearvision. Any changes to the License or Server section will invalidate your licence.

It is strongly recommended that the staging area defined as the ClearCase Bridge workspace in the config file points to a local file system and not a network drive. Also, on older Windows systems, if the workspace lives on a FAT file system, you will need share.exe running for file locking to work correctly.

Please note that for the Webadmin server to operate correctly, you currently need to change your current working directory to the location of the Webadmin server executable and start the server from there. You will also need to point to the location of the config file using the -f option:-

cd /opt/Clearvision/cc2x/admin
./cc2x_webadmin -f ../server/cc2x_server.cfg

ClearCase Bridge Server

If you have followed the instructions above, you will already have installed the ClearCase Bridge server. Please now start the server as follows:-

cd /opt/Clearvision/cc2x/server
./cc2x_server -f ./cc2x_server.cfg

The ClearCase Bridge server and Webadmin server must point to the same config file to ensure that they are both configured to use the same workspace. It is via the workspace directory configured in the config file that the ClearCase Bridge server and Webadmin server exchange information.

Subversion Hooks

The ClearCase bridge requires pre-revprop-change and post-revprop-change hooks to be installed on Subversion repositories. If you do not currently have such hooks, please create hooks in the hooks directory as follows:-

On Unix platforms:

 #!/bin/sh

 exit 0

Make sure that the script is executable, i.e. chmod 755 pre-revprop-change post-revprop-change.

On Windows platforms please create pre-revprop-change.bat and post-revprop-change.bat hooks in the hooks directory with the following content:

 exit 0

ClearCase Attribute Creation

The ClearCase bridge requires a special attribute type to exist for all ClearCase vobs being bridged. Please create the attribute type by changing your current working directory into the vob directory under a suitable view and run the following command:-

cleartool mkattype -vtype integer clearvision_cc2x

Configure Bridges

Login to the Webadmin server using the default user admin password admin.

Add a new bridge by filling out the form at the bottom of the screen. A bridge bridges between an existing Subversion/Git repository location and an existing directory inside a view.

If you are setting up multiple bridges for the same VOB/repository, please make sure you do not have any overlaps been bridges.

For details on bridge configuration, please refer to the ClearCase Bridge Administration Guide.