Installing a Second Version of SCM Agent on Linux
search cancel

Installing a Second Version of SCM Agent on Linux

book

Article ID: 243439

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

One of the caveats of SCM is that the Agent must be the same version as the Client that is connecting to it.  While transitioning to a new release there may be a period of time where some users are still on older releases of the client while others have already upgraded.  This may require running two different versions of the SCM Agent on a remote computer so that both types of clients can have access.  On the Windows operating system this is not possible as only one version of SCM can be installed.  But on Linux and Unix, you can install and configure 2 different versions of the Agent, configuring each to run in its own isolated environment and each to listen on different port numbers.

Environment

Release : 13.0.3 and up

Component : CA HARVEST SCM INTERFACES (CLI/API/SDK)

Resolution

When installing a second version of the SCM Agent on the Linux platform, the new version must be installed to a separate folder structure, and scripts must be written to set the environment variables correctly for each version of the agent so that it uses its own environment and version of pec and CAPKI to execute.

For example, suppose that the SCM 12.5 agent is installed in the following folders:
  Agent: /opt/CA/scm
 CAPKI: /opt/CA/SharedComponents
 PEC: /opt/CA/pec

We will not move the SCM 12.5 installation to a new folder.  It should stay in its original folder structure.  We will create a new, separate folder structure for SCM 13.0.4 agent.  The reason is that the scripts in the $CA_SCM_HOME/bin folder have certain folder locations hard-coded within them.  Moving the entire folder to a different location would cause problems with the scripts.

For example, we could install the SCM 13.0.4 agent to new folders:
  Agent: /opt/CA1304/scm
 CAPKI: /opt/CA1304/SharedComponents
 PEC: /opt/CA1304/pec

Installing v13.0.3 CAPKI:

We must also take special steps when installing the 13.0.4 CAPKI so that it does not get installed in the default location which would overwrite the 12.5 version of CAPKI.  This way the version of CAPKI needed for SCM 12.5 is preserved and the version of CAPKI needed for 13.0.4 is installed in the new location.

To install CAPKI to a non-default location:

1. Make sure CASHCOMP, CABIN, and CALIB are set to the new location for CAPKI:

   export CASHCOMP=/opt/CA1304/SharedComponents
   export CABIN=$CASHCOMP/bin
   export CALIB=$CASHCOMP/lib

2. Install the agent for the single user rather than all users

   ./setup install caller=SCMAGENT verbose env=user

Installing v13.0.3 PEC:

 1. Make sure RTHOME, LD_LIBRARY_PATH, and PATH contain the new location for PEC:

   export RTHOME=/opt/CA1304/pec
   export PATH=$CA_SCM_HOME/bin:$RTHOME:$CABIN:$PATH
   # if installing 32-bit SCM Agent use this LD_LIBRARY_PATH
   export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_linux24:$CALIB:$LD_LIBRARY_PATH
   # if installing 64-bit SCM Agent use this LD_LIBRARY_PATH
   # export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_64_linux24:$CALIB:$LD_LIBRARY_PATH

  2. Use the regular installation command:

   ./INSTALL.SH configure_rtserver=false

Installing v13.0.3 SCM Agent:

 1. Make sure environment variables are set for the new location:

   export CASHCOMP=/opt/CA1304/SharedComponents
   export CABIN=$CASHCOMP/bin
   export CALIB=$CASHCOMP/lib
   export CAPKIHOME=$CASHCOMP/CAPKI
   export RTHOME=/opt/CA1304/pec
   export CA_SCM_HOME=/opt/CA1304/scm
   export PATH=$CA_SCM_HOME/bin:$RTHOME:$CABIN:$PATH
   # if installing 32-bit SCM Agent use this LD_LIBRARY_PATH
   export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_linux24:$CALIB:$LD_LIBRARY_PATH
   # if installing 64-bit SCM Agent use this LD_LIBRARY_PATH
   # export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_64_linux24:$CALIB:$LD_LIBRARY_PATH

2. Use the standard installation command

   cd /opt/CA1304/scm/install
   ./setup.sh

Example Agent startup scripts might look like this:

cat /home/cascm/start_agntd_12.5.sh

#!/bin/bash

export CASHCOMP=/opt/CA/SharedComponents
export CABIN=$CASHCOMP/bin
export CALIB=$CASHCOMP/lib
export CAPKIHOME=$CASHCOMP/CAPKI
export RTHOME=/opt/CA/pec
export CA_SCM_HOME=/opt/CA/scm

export PATH=$CA_SCM_HOME/bin:$RTHOME:$CABIN:$PATH
export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_linux24:$CALIB:$LD_LIBRARY_PATH

$CA_SCM_HOME/bin/agntd

#--end of script --

cat /home/cascm/start_agntd_13.0.4.sh

#!/bin/bash

export CASHCOMP=/opt/CA1304/SharedComponents
export CABIN=$CASHCOMP/bin
export CALIB=$CASHCOMP/lib
export CAPKIHOME=$CASHCOMP/CAPKI
export RTHOME=/opt/CA1304/pec
export CA_SCM_HOME=/opt/CA1304/scm

export PATH=$CA_SCM_HOME/bin:$RTHOME:$CABIN:$PATH
# if installing 32-bit SCM Agent use this LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_linux24:$CALIB:$LD_LIBRARY_PATH
# if installing 64-bit SCM Agent use this LD_LIBRARY_PATH
# export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:$RTHOME/lib/i86_64_linux24:$CALIB:$LD_LIBRARY_PATH

$CA_SCM_HOME/bin/agntd

#--end of script --