To install TrueSight Network Automation on a cluster for high availability (HA), you must install the product separately on each node in the Linux cluster. This topic includes the following sections:
Before you begin installing the primary TrueSight Network Automation server
Ensure that the cluster setup is ready with the shared disk.
To install the primary TrueSight Network Automation server
Install the primary TrueSight Network Automation server. For instructions, see Installing-the-application-server-on-Linux.
Note
With the exception of the following steps, which differ, the installation sequence in an HA cluster is the same as that for a standalone application server.
- Data Directory Information panel: Specify the path where the cluster shared disk is mounted, /gsf/bca-networks-data for example, in the Data Directory field, and click Next.
- Certificate Information panel: Enter the host name of the cluster for the HTTPS certificate, and click Next.
Back to top
Before you begin installing the secondary TrueSight Network Automation server
Ensure that you take a backup of the data directory, BCAN_DATA before you install the secondary TrueSight Network Automation server.
To install the secondary TrueSight Network Automation server
Install the secondary TrueSight Network Automation server. For instructions, see Installing-the-application-server-on-Linux.
Note
- During installation, provide details of the temporary user schema (Oracle) or database (SQL Server and PostgreSQL) that you have created before installation.
- Ensure that you specify the same inputs that you had specified when you installed the primary TrueSight Network Automation server.
After you install the secondary server, do the following:
- Stop the enatomcat service.
- Update the database.properties file:
- Navigate to the BCAN_DATA directory, and open the file with a text editor.
- (Oracle) Locate the javax.jdo.option.ConnectionUserName=<userName> property and update its value with the primary server database user name.
- (SQL Server and PostgreSQL) Locate the javax.jdo.option.ConnectionURL property and update its value with the primary server database information.
- Save the file.
- (Required only if you are using local authentication) Update the catalina.properties file
- Navigate to the BCAN_HOME/tomcat/conf directory and open the catalina.properties file with a text editor.
- (Oracle) Locate the bna.jdbcRealm.connectionUsername property and update its value with the primary server database user name.
- (SQL Server and PostgreSQL) Locate the bna.jdbcRealm.connectionURL property and update its value with the primary server database information.
- Save the file.
- Update the BCaninstalledConfiguration.xml file:
- Navigate to the BCAN_HOME directory and open the file with a text editor:
- (Oracle) Locate the DATABASE_USER_ID property and update its value with the primary server database user name.
- (SQL Server and PostgreSQL) Locate the DATABASE_URL property and update its value with the primary server database information.
- Save the file.
- Delete the temporary database or user.
- Start the enatomcat service.
Back to top
Installing TrueSight Network Automation remote device agents in a cluster
Install the remote device agent on the primary and secondary nodes in the cluster by following the steps listed on the TrueSight Network Automation page.
Note
On the HTTPS Certificate Information panel, ensure that you specify the host name of the cluster in the Common Name (CN) field.
Back to top
Configuring TrueSight Network Automation for HA
This section provides instructions for configuring TrueSight Network Automation for high availability (HA).
- Run the system-config-cluster command to open the Cluster Configuration console or the web-based console for Cluster Configuration. For example, https://hostName:port.
- Add the relevant nodes that make up the cluster and specify the host names for the primary and secondary servers.
- Add the failover domain with the Virtual Cluster host name.
- Add the following resources:
- Shared disk, for example, GFS

- Virtual IP address to which the service will be assigned and running on the cluster

- Add a new service under the Service Groups tab as shown in the following figure:

- Add the resources added in step 4 to the newly created service.
Verify whether the /etc/cluster/cluster.conf file is created.
Click here to view a sample cluster.conf file.
<?xml version="1.0"?>
<cluster config_version="9" name="cdl-lnx-clust">
<clusternodes>
<clusternode name="cdl-lnx-clust1" nodeid="1"/>
<clusternode name="cdl-lnx-clust2" nodeid="2"/>
</clusternodes>
<rm>
<failoverdomains>
<failoverdomain name="cdl-lnx-clust" ordered="1">
<failoverdomainnode name="cdl-lnx-clust1" priority="1"/>
<failoverdomainnode name="cdl-lnx-clust2" priority="2"/>
</failoverdomain>
</failoverdomains>
<resources>
<clusterfs device="/dev/sdb" fsid="56449" fstype="gfs2" mountpoint="/gfs" name="gfs2"/>
<ip address="10.129.180.60" sleeptime="10"/>
</resources>
<service autostart="0" domain="cdl-lnx-clust" name="cdl-lnx-clust" recovery="relocate">
<clusterfs ref="gfs2"/>
<ip ref="10.129.180.60"/>
</service>
</rm>
<cman expected_votes="1" two_node="1"/>
</cluster>
- Turn off the cluster virtual machines (VMs).
- Turn on the cluster VMs.
- Verify the cluster status by using either of the following methods:
By executing the following command on any node:
clustat \- verify cluster status
- By viewing the Service Groups tab on the web-based console for Cluster Configuration
Move the cluster to the other node by using either of the following methods:
By executing the following command on any node:
clusvcadm \-r gfs \-m <Secondary Node/Primary Node>
- By using the web-based console for Cluster Configuration as shown in the following figure:

Add the shell script, which automatically triggers the TrueSight Network Automation service on and off when failover occurs to the shared disk.
Click here to view an example shell script for aTrueSight Network Automation server.
#! /bin/bash
# ---------------------------------------------------------------------------
# Script to stop/start and give a status of ftp service in the cluster.
# This script is build to receive 3 parameters.
# - start : Executed by cluster to start the application(s) or service(s)
# - stop : Executed by cluster to stop the application(s) or service(s)
# - status: Executed by cluster every 30 seconds to check service status.
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
#set -x
FsDIR="/gfs" ; export FsDIR # Root directory for Services
ScDIR="$FsDIR/service_startup" ; export ScDIR # Service Scripts Directory
ScName="startservice" ; export ScName # Service ScNameance Name
LOG="$ScDIR/log/${ScName}.log" ; export LOG # Service Log file name
HOSTNAME=`hostname -a` ; export HOSTNAME # HostName
SePath="/etc/init.d/enatomcat" ; export SePath # Service Program name
ScTxt="/opt/bmc/bca-networks/java/bin/java" ; export ScTxt
# Service Config. file name
RC=0 port RC # Service Return Code
DASH="---------------------" ; export DASH # Dash Line
# Where the Action Start
# ---------------------------------------------------------------------------
case "$1" in
start)
echo -e "\n${DASH}" >> $LOG 2>&1
echo -e "Starting service $SePath on $HOSTNAME at `date`" >>
$LOG 2>&1
echo -e "${SePath}" >> $LOG 2>&1
${SePath} start >> $LOG 2>&1
RC=$?
FPID=`ps -ef |grep -v grep |grep ${ScTxt} |awk '{ print $2 }'|
head -1`
echo "Service $SePath started on $HOSTNAME - PID=${FPID} RC=$RC">>
$LOG
echo "${DASH}" >> $LOG 2>&1
;;
stop )
echo -e "\n${DASH}" >> $LOG 2>&1
echo -e "Stopping Service $SePath on $HOSTNAME at `date` " >>
$LOG
ps -ef | grep ${ScTxt}| grep -v grep >> $LOG 2>&1
FPID=`ps -ef |grep -v grep |grep ${ScTxt} |awk '{ print $2 }
'|head -1`
echo -e "Killing PID ${FPID}" >> $LOG 2>&1
kill $FPID >> $LOG 2>&1
echo -e "Service $SePath is stopped ..." >> $LOG 2>&1
RC=0
echo "${DASH}" >> $LOG 2>&1
;;
status)
COUNT=`ps -ef | grep ${ScTxt}| grep -v grep | wc -l`
FPID=`ps -ef |grep -v grep |grep ${ScTxt} |awk '{ print $2 }
'|head -1`
echo -n "`date` Service $SePath ($COUNT) on $HOSTNAME">>
$LOG 2>&1
if [ $COUNT -gt 0 ]
then echo " - PID=${FPID} - OK" >> $LOG 2>&1
RC=0
else echo " - NOT RUNNING" >> $LOG 2>&1
ps -ef | grep -i ${ScTxt} | grep -v grep >> $LOG 2>&1
RC=1
fi
;;
esac
exit $RC
Click here to view an example shell script for a TrueSight Network Automation agent.
#! /bin/bash
# ---------------------------------------------------------------------------
# Script to stop/start and give a status of ftp service in the cluster.
# This script is build to receive 3 parameters.
# - start : Executed by cluster to start the application(s) or service(s)
# - stop : Executed by cluster to stop the application(s) or service(s)
# - status: Executed by cluster every 30 seconds to check service status.
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
#set -x
FsDIR="/gfs" ; export FsDIR # Root directory for Services
ScDIR="$FsDIR/service_startup" ; export ScDIR # Service Scripts Directory
ScName="startservice" ; export ScName # Service ScNameance Name
LOG="$ScDIR/log/${ScName}.log" ; export LOG # Service Log file name
HOSTNAME=`hostname -a` ; export HOSTNAME # HostName
SePath="/etc/init.d/bcanagent" ; export SePath # Service Program name
ScTxt="java" ; export ScTxt # Service Config. file name "java"
RC=0 port RC # Service Return Code
DASH="---------------------" ; export DASH # Dash Line
# Where the Action Start
# ---------------------------------------------------------------------------
case "$1" in
start)
echo -e "\n${DASH}" >> $LOG 2>&1
echo -e "Starting service $SePath on $HOSTNAME at `date`" >>
$LOG 2>&1
echo -e "${SePath}" >> $LOG 2>&1
${SePath} start >> $LOG 2>&1
RC=$?
FPID=`ps -ef |grep -v grep |grep ${ScTxt} |awk '{ print $2 }
'|head -1`
echo "Service $SePath started on $HOSTNAME - PID=${FPID} RC=$RC">>
$LOG
echo "${DASH}" >> $LOG 2>&1
;;
stop )
echo -e "\n${DASH}" >> $LOG 2>&1
echo -e "Stopping Service $SePath on $HOSTNAME at `date` " >>
$LOG
ps -ef | grep ${ScTxt}| grep -v grep >> $LOG 2>&1
FPID=`ps -ef |grep -v grep |grep ${ScTxt} |awk '{ print $2 }
'|head -1`
echo -e "Killing PID ${FPID}" >> $LOG 2>&1
kill $FPID >> $LOG 2>&1
echo -e "Service $SePath is stopped ..." >> $LOG 2>&1
RC=0
echo "${DASH}" >> $LOG 2>&1
;;
status)
COUNT=`ps -ef | grep ${ScTxt}| grep -v grep | wc -l`
FPID=`ps -ef |grep -v grep |grep ${ScTxt} |awk '{ print $2 }
'|head -1`
echo -n "`date` Service $SePath ($COUNT) on $HOSTNAME">>
$LOG 2>&1
if [ $COUNT -gt 0 ]
then echo " - PID=${FPID} - OK" >> $LOG 2>&1
RC=0
else echo " - NOT RUNNING" >> $LOG 2>&1
ps -ef | grep -i ${ScTxt} | grep -v grep >> $LOG 2>&1
RC=1
fi
;;
esac
exit $RC
- Perform the following tasks to add the script as a resource:
- Click Add, and select Script as the resource type.

- Specify a name for the script.
- Specify the location of the script.
- Add the newly added script resource to the existing service.