Deploying VersionVault WAN servers on Apache Tomcat

Overview

The HCL VersionVault WAN servers provide the HCL VersionVault Explorer with access to HCL VersionVault repositories and support for HCL VersionVault web views and automatic views. The VersionVault WAN servers can be deployed either on IBM WebSphere or Apache Tomcat.

Tomcat is an open source Java application server provided by Apache. This topic highlights the deployment on a Tomcat server. To deploy on IBM WebSphere, refer to the documentation for that product.

Environment

The VersionVault WAN server can be deployed on either a Microsoft Windows or Linux server.
Operating system
Windows or Linux server, refer to the supported platforms list for VersionVault.
Apache Tomcat version
Tomcat 9.x 64-bit

Installing Tomcat

Review the Tomcat documentation for specific requirements, installation, and configuration for your system at https://tomcat.apache.org/. On Windows, you can choose to install Tomcat as a service or as a standalone application.
Important: On Linux, the user ID used by the Tomcat process needs root permissions in order to do the appropriate impersonation.

SSL/TLS setup

To use HTTPS connection with Tomcat, review the SSL/TLS Configuration documentation on the Tomcat website at https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html.

To configure the VersionVault Explorer client, follow the VersionVault documentation and technote 240547.

Post installation

After installation, ensure that both the JAVA_HOME and CATALINA_HOME environment variables are set correctly.

To allow access to the web manager, you need to add roles and users to Tomcat. The usernames/passwords configuration depends on which Realm implementation you are using (see https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html). By default, it uses an XML-format file that can be edited with any text editor, stored at $CATALINA_BASE/conf/tomcat-users.xml. This is explained in detail in the Tomcat documentation available at https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html#Configuring_Manager_Application_Access.

The following definition grants the user "devuser" access to the web manager and web status page. Add this line at the end of the tomcat-users.xml file:
<user username="devuser" password="password" roles="manager-gui,manager-status"/>

Installing VersionVault and the VersionVault WAN server

Refer to the VersionVault installation instructions in the help to install and set up the application on the server. In order to deploy the web services on Tomcat, during installation you must select the correct package to be installed:
  • On Windows, select the Server Components/View Server feature
    Server Components/View Server feature
  • On UNIX, select the VersionVault Server-only installation feature
    Note: When using Tomcat, you do not need to select the VersionVault WAN server and Automatic View WAN Server components. These components are for using IBM WebSphere.

If you use PAM authentication in your environment, you need to configure it for VersionVault. Create a VersionVault configuration file for pam.d; see technote 345521. On a RHEL7 system, you can also copy /etc/pam.d/login to /etc/pam.d/versionvault.

Deploying the VersionVault WAN server application to Tomcat

The application needs to be deployed to Tomcat. After installation, the WAR packages can be found in the versionvault/web directory of your installation.
  • On Windows: C:/Program Files/HCL/CCM/versionvault/web
  • On Linux: /opt/hcl/ccm/versionvault/web
There are two required packages to deploy:
  • ccrc.war
  • rview.war

In the next section, when the context path needs to be configured, it refers to the path the application will be accessed via HTTP. That is, to use the URL http://localhost:8080/ccrc, the context path field needs to be /ccrc.

There are several ways to deploy it to Tomcat. Remember that both WAR files need to be deployed.

Deploy manually

In your Tomcat instance, copy the two WAR files into the following directory: $CATALINA_HOME/webapps

After copying the files:
  • If the instance is running, Tomcat unpacks the archives and configures their context path.
  • If the instance is not running, both will be deployed and configured the next time it is started.

Deploy using Tomcat Manager

You can use the management dashboard to deploy the application. Access the manager dashboard on the system at the following URL: http://localhost:8080/manager

There are multiple sections in the dashboard, select the Deploy section. There are two subsections to choose from.
Tomcat Deploy dialog box

A. Deploy directory or WAR file located on server

Repeat theses steps for each WAR file to deploy.
  1. In the WAR or Directory path field, enter the absolute URL/path to the WAR file as it appears on your server and include the .war extension (for example, C:/apps/ccrc.war). On Windows you can use either forward or backward slashes in the path.
  2. In the Context Path field, include a forward slash before your entry (/ccrc and /rview, respectively for each WAR file)
  3. Click the Deploy button. The page will reload and you should see a message informing you the application has been deployed:
    Tomcat message

After deployment, the application will also appear in the Applications section of the page.

B. WAR file to deploy

Repeat these steps for each WAR file to deploy.
  1. Click the Choose file button.
  2. Navigate to the location of the WAR file and select it.
  3. Click the Deploy button.
In the Tomcat console, if the deployment is successful, a message like the following one displays:
INFO: Deployment of web application archive \path\to\ccrc has finished in x,yyy ms

Configuration

VersionVault post configuration

On UNIX, after installation, ensure that:
  • The following directories exist and are set with 0777 permissions:
    • /var/adm/hcl/versionvault/ccweb
    • /var/adm/hcl/versionvault/ccdav
  • /var/adm/atria is a symlink to /var/adm/hcl/versionvault

CCRC temporary directory (ccrcTempDir)

This variable specifies a directory where temporary files are stored. The pathname must be a directory on the CM server host in which all users of the HCL VersionVault remote client have permission to create and delete files (permission 777 on UNIX). By default, temporary files are stored in the pathname specified in the value of the TMP or TEMP environment variable, if they exist. This must be updated for both web view and automatic view.

For VersionVault Remote Client web view, you can change this location by editing the server.conf file located in the versionvault/config/ccrc directory of your VersionVault installation:
  • On Windows: C:/Program Files/HCL/CCM/versionvault/config/ccrc/server.conf
  • On Linux: /opt/hcl/ccm/versionvault/config/ccrc/server.conf
For VersionVault Remote Client automatic view, you can change this location by editing the rview_server.conf file located in the versionvault/config/rview directory of your VersionVault installation:
  • On Windows: C:/Program Files/HCL/CCM/versionvault/config/rview/rview_server.conf
  • On Linux: /opt/hcl/ccm/versionvault/config/rview/rview_server.conf
Open these files with a text editor and update the line with the appropriate path.
ccrcTempDir=

Configuring WAN server logging

The default Tomcat configuration does not provide session and some other log information for the VersionVault WAN server. In order to enable those logs, the Tomcat logging.properties file must be modified to add a log configuration for the WAN server.

  1. Open tomcat installation directory/conf/logging.properties in a text editor.
  2. Add these lines to the file:
    com.ibm.rational.cc.common.logging.CCRCLogger.level=INFO
    com.ibm.rational.cc.common.logging.LogHandler.formatter=java.util.logging.SimpleFormatter
    com.ibm.rational.cc.common.logging.LogHandler.pattern = ${catalina.base}/logs/CCRCLogger%g.log
    com.ibm.rational.cc.common.logging.LogHandler.limit = 20000000
    com.ibm.rational.cc.common.logging.LogHandler.count = 20
    com.ibm.rational.cc.common.logging.LogHandler.append = true
  3. Restart Tomcat.

Accessing the CCRC/RVIEW administration page

To access the CCRC and rview admin section on the CM server, you must create a new role in your Tomcat file called "Administrator" and assign it to the user that will be granted access.
<role rolename="Administrator"/> <user name="devuser" password="password" roles="Administrator,manager-gui,manager-status"/>
After creation, the user assigned to this role, will be able to access the ccrc and rview admin URL

Both URLs list the current settings for each server.

Connection to the VersionVault WAN server

After deploying the two war files in Tomcat, you can use the usual VersionVault applications to create web views and automatic views. When using VersionVault Explorer, to connect to the server, use the Tomcat URL/port and your normal VersionVault login.
Note: Selecting "server only" when installing VersionVault does not install the MVFS or client parts. Without MVFS, you cannot use dynamic views and automatic views as users on the server. You can, however, create and store VOBs and views on this server. To use these views, connect from a different host/client.

VersionVault WAN server maintenance

You can stop/start and un-deploy the application by using the usual Tomcat tools. You can also perform these operations from the web manager.
VersionVault WAN server maintenance

To upgrade to a new version, un-deploy the current two applications (ccrc and rview) and deploy the new WAR files.