Automating Control Center (CC) installation and configuration

IBM Sterling Control Center installation can be automated using silent installation properties file. CC configuration can also be automated using configuration properties file. This document provides details on automating installation and configuration of Control Center for the Linux/UNIX environment.

Automating new the installation of CC in Linux and Unix environment

  1. Create a file named installer.properties with the following contents. Note that the specified directory will be created if it does not already exist.
    #Indicate whether the license agreement been accepted 
    #---------------------------------------------------- 
    LICENSE_ACCEPTED=TRUE
    
    #Choose installation folder 
    #-------------------------- 
    USER_INSTALL_DIR=<<Specify/Install/Directory/here>>
    
  2. Run the installer as below:
    ./CCInstall64.bin -i silent -f installer.properties 
    When the above command is run, no interactive prompts will be displayed.

Automating CC upgrade process in Linux/Unix environment

  1. Create a file named upgrade.properties with the following contents. Note that the specified directory will be created if it does not already exist:
    #Indicate whether the license agreement been accepted
    #----------------------------------------------------
    LICENSE_ACCEPTED=TRUE
    
    #Choose installation folder
    #--------------------------
    USER_INSTALL_DIR=<<Specify/Existing Install/Directory/here>>
    
    #Upgrade
    #-------
    UPGRADE=1
    DO_NOT_UPGRADE=0
    
  2. Run the installer as below:
    ./CCInstall64.bin -i silent -f upgrade.properties
    When the above command is run, no interactive prompts will be displayed.

Automating CC configuration process

Control Center installation includes a sample silent configuration script, runConfigCCSample.sh. It is located under <<CCInstallDir>>/utils directory. To automate the configuration, the sample script should be cloned, edited to specify required values and saved. After saving the changes, run the cloned script.
Note: It is recommended to set the value of “N” for this following configuration property as below:
INITIALIZE_DB="N"
  1. Make a copy of the file named runConfigCCSample.sh located under <<CCInstallDir>>/utils folder.
  2. Edit the cloned script and replace the place holder input values with your input values.
  3. Save the script.
  4. Run the cloned script from <<CCInstallDir>>/utils>> directory.
  5. When the configuration script is run, no interactive prompts will be displayed.

configCC_Sample_Oracle Script

#!/bin/sh

cd /home/palani3/62_maint/2_orcl19c/bin

#
#   Licensed Materials - Property of IBM 
#   IBM Control Center 
#   (C) Copyright IBM Corp. 2003, 2018.
#	Updated on : 05/31/2020

#------------------------------------------------------------------------------------------- 
# Note:
# 
# 1. This script is applicable for 6.2.0.x
# 2. This is a sample script and no additional support will be provided.
# 3. This script does not cover all the configuration steps. 
# 4. To go through all configuration steps in interactive mode, run <<CCInstall>>/bin/configCC.sh  
# 5. Provide valid values.
# 6. Password related sensitive information can be given in environment variables for security if it is needed, so before running this script, following commands needs to be executed with values otherwise password can be set in variables in this script
# export DB_PASSWORD=<<DB Password>>
# export EMAIL_SERVER_PASSWORD=<<Email Password>>
# export KEYSTORE_PASS=<<Keystore password>>
# export TRUSTSTORE_PASS=<<Truststore password>>
# export JRE_TRUSTSTORE_PASS=<<JRE trustStore password>>
# export ADMIN_USER_ID=<<Admin username>>
# export ADMIN_USER_PW=<<Admin User Password>>

echo "Setting configCC parms..."

#-----------------------------------------#
#--- Product Installation Information --- #
#-----------------------------------------#
# This option will be used to configure Product Entitlement, 
# There will be three values
# 1. CCD
# 2. CCM
# 3. CCM,CCD

PRODUCT_ENTITILEMENT=CCM,CCD


#--------------------------------------------------------------#
#--- Supported ONLY FOR Oracle DB - Kerberos configuration  ---#
#--------------------------------------------------------------#
# Example: KERBEROS_CONFIG_FILE=/etc/krb5.conf
KERBEROS_CONFIG_FILE=""

# Example: KERBEROS_CREDENTIAL_CACHE=/tmp/krb5cc_1017 (change it to your location)
KERBEROS_CREDENTIAL_CACHE=""

# Possible values are "true" or "false"
ORACLE_KERBEROS_CONNECTION=false

# Possible values are "true" or "false"
KERBEROS_DEBUG=false


#---------------------------------#
#--- JDBC Driver Information  --- #
#---------------------------------#
# Sample for Oracle :"/data/jdbc_drivers/oracle/ojdbc8.jar" 
# Sample for DB2	: 
# Sample for MSSQL	: "/data/jdbc_drivers/oracle/sqljdbc41.jar"

JDBC_DRIVERS="/home/palani3/62_maint/2_orcl19c/bin/ojdbc8.jar" 

#-----------------------------#
#--- DATABASE INFORMATION --- #
#-----------------------------#
# Possible values for DB_TYPE :  Oracle, DB2, MSSQL, DB2zOS
DB_TYPE="ORACLE" 

# DB_HOST: If Oracle RAC is used, specify host names separated by semicolon(;)
# Example for Oracle RAC: DB_HOST="OracleDBServerOne.mycompanydomain.com;OracleDBServerTwo.mycompanydomain.com"
DB_HOST="10.120.136.39"

# DB_PORT: If Oracle RAC is used, specify port numbers separated by semicolon(;)
# Example for Oracle RAC:DB_PORT="1521;1521" 
DB_PORT="1521" 

# Optional ONLY when Oracle/Kerberos is used
DB_USER="CCDBUSER3"

# Password for database can be taken from environment variable
# Optional ONLY when Oracle/Kerberos is used
DB_PASSWORD="SpecifyCCDBUSER3PasswordHere"

# DB_NAME: In case of Oracle, for DB_NAME, specify the SID or specify Service Name(for Oracle RAC)
DB_NAME="orcl19c"

# DB_LOCATION is applicable only for DB2 z/OS
DB_LOCATION="none" 

#--- MSSQL Only - Create tables for globalization(Multi-byte) support ---#
# Possible values are "true" or "false"
MSSQL_ENABLE_GLOBALIZATION="false"


#----------------------------------------#
#--- Database Initialization 		  ---#
# If "Y" is specified for INITIALIZE_DB, then
# transaction tables like EVENTS, CD_STATS_LOG, FG_STATS_LOG, BP_STATS_LOG, AF_STATS_LOG, and CE_STATS_LOG 
# will be dropped and re-created
# None of configuration tables will be dropped.
#---------------------------------------#

INITIALIZE_DB="Y"

#----------------------------------------# 
#---------- Database Partition ----------#  
# If Y or true is specified for DB_PARTITION, then
# partitioning of database will be happened
#---------------------------------------#  

DB_PARTITION="Y"

#--------------------------------------------#
#--------- Admin user Configuration ---------#
#--------------------------------------------#

# Admin username and Admin user password can be taken from environment variables
ADMIN_USER_ID="ccadmin"
ADMIN_USER_PW="SpecifyStrongPassword"
ADMIN_EMAIL_ADDRESS="cc.admin@scc.ibm.com"

#---------------------------------------#
#--- Event Processor(Engine) name.      #
# It cannot be more than 10 characters. #
# No Space is allowed. 				 ---#
#---------------------------------------#
EVENT_PROCESSOR_NAME="CCM1"

#--- HTTP Connector(For EP to EP communication) configuration values
HTTP_CONNECTOR_PORT="25600"

#-------------------------------#
#--- Web Sever configuration ---#
#-------------------------------#
WEB_SEVER_PORT="25602"
# Host name where Control Center is installed.
WEB_SERVER_HOSTNAME="10.120.133.225"
WEB_LISTEN_ADDRESS="0.0.0.0"
# Automatically stop the web application server when the event processor (engine) is stopped? 
# Possible values are: "true" or "false"
AUTO_STOP_WEB_SERVER="true"
# Do you want to enable authentication for the Event Repository?
# Possible values are: "true" or "false"
EVENT_REPO_AUTH_ENABLED="false"

#----------------------------#
#--- E-Mail configuration ---#
#----------------------------#
EMAIL_SERVER_HOST_NAME="10.203.158.20"
EMAIL_SERVER_PORT="25"
EMAIL_SERVER_USER="" 

# Email Password can be taken from environment variable
EMAIL_SERVER_PASSWORD=""

EMAIL_FROM_ADDRESS="cc.admin@scc.ibm.com"
CCENTER_ADMIN_EMAIL_ADDRESS="cc.admin@scc.ibm.com" 

#--------------------------------------------#
#--- Secure Port Numbers and certificates ---#
#--------------------------------------------#

# These  fields will be must required if PRODUCT_ENTITILEMENT is CCD and CCD,CCM otherwise
# for PRODUCT_ENTITILEMENT as CCM, these will be given if secure Control Center is required 

# Here path of keystore file will be given
KEYSTORE="/home/palani3/62_maint/2_orcl19c/bin/CCenter.keystore"

# Password of Keystore certification can be taken from environment variable
KEYSTORE_PASS="changeit"

#Key Alias for keystore
KEY_ALIAS="test_ccenter"

# Here path of truststore file will be 
TRUSTSTORE="/home/palani3/62_maint/2_orcl19c/bin/CCenter.truststore"

# Password of truststore certification and JRE truststore can be taken from environment variables
TRUSTSTORE_PASS="changeit"
JRE_TRUSTSTORE_PASS=""

# Secure port for EP to EP communication will be given here 
HTTPS_PORT="35601"

# Secure web port will be given here
WEB_HTTPS_PORT="35603"

#--------------------------------------------#
#------ Some basic more  configuration ------#
#--------------------------------------------#

# Specify user key if secure Control center is required
USER_KEY=""

# Will be `true` if Oracle Real Application Clusters is having feature of Single Client Access Name (SCAN)
ORACLE_RAC_OR_SCAN=""

#--------------------------------------------#
#-------- JMS Related configuration ---------#
#--------------------------------------------#
# below are configuration values for JMS, if not required leave these values as intact
JMS_ENABLE=""
JMS_TYPE=""
JMS_HOST=""
JMS_PORT=""
JMS_QUEUE_MANAGER=""
JMS_CHANNEL=""
JMS_SUBJECT=""
JMS_TOPIC=""
JMS_USER_ID=""
JMS_PASSWORD=""
JMS_EMBED_BROKER=""
JMS_DATA_DIRECTORY=""
JMS_TIME_TO_LIVE=""
JMS_RETRIES=""
JMS_RETRY_WAIT=""
JMS_BROKER_NAME=""

#--------------------------------------------#
#--- Secure Database Related configuration --#
#--------------------------------------------#

# If secure DB is required then this value will be `Y`
DB_SSL=""

#--------------------------------------------#
#-------- Package Path configuration --------#
#--------------------------------------------#

PACKAGE_PATH="../packages"

#----------------------------------------------------#
#--- External Authentication Server configuration ---#
#----------------------------------------------------#

PRIMARY_ADDRESS=""
PRIMARY_PORT="61365"
ALTERNATE_ADDRESS=
ALTERNATE_PORT=
PROFILE_NAME="test"
PERSISTENT_CONNECTION="N"
SECURE_CONNECTION="N"
SECURE_PROTOCOL=""


echo "Calling configCC..."

. ./setEnv.sh

# Common settings

JAVA_HEAP="-Xms256m -Xmx1024m"
JAVA_XX_OPT="-XX:+UseParallelGC  -XX:+HeapDumpOnOutOfMemoryError"

JAVA_SYSTEM_VAR="-Dopenjpa.DynamicEnhancementAgent=false -Djava.util.Arrays.useLegacyMergeSort=true -Dfile.encoding=UTF-8 "
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -Djava.util.logging.config.file=../conf/javalogging.properties "
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR  -Dlog4j.configurationFile=../conf/configCCLogger.xml "
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DCONFIG_DIR=../conf -DDB_SCRIPTS_DIR=../db"
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DADD_ACTIVE_ALERTS_TO_DB_USING_OPENJPA=true  -DLAUNCH_MODE=console"
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -Dcom.ibm.tools.attach.enable=no"
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -Dcom.ibm.jsse2.overrideDefaultTLS=true"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DproductEntitilement=${PRODUCT_ENTITILEMENT} -DengineName=${EVENT_PROCESSOR_NAME}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DdbType=${DB_TYPE} -DdbHost=${DB_HOST} -DdbPort=${DB_PORT} -DdbUser=${DB_USER} -DdbPass=${DB_PASSWORD} -DdbName=${DB_NAME} -DdbInit=${INITIALIZE_DB} -DdbPartition=${DB_PARTITION} -DdbDrivers=${JDBC_DRIVERS} -DdbLoc=${DB_LOCATION} -DdbSSL=${DB_SSL} -DmssqlGlobal=${MSSQL_ENABLE_GLOBALIZATION}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DhttpPort=${HTTP_CONNECTOR_PORT} -DhttpsPort=${HTTPS_PORT} -DwebHttpPort=${WEB_SEVER_PORT} -DwebHost=${WEB_SERVER_HOSTNAME} -DweblistenAddress=${WEB_LISTEN_ADDRESS} -DwebHttpsPort=${WEB_HTTPS_PORT} -DautoStopJavaWebAppServer=${AUTO_STOP_WEB_SERVER}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DadminUserPw=${ADMIN_USER_PW} -DadminUserId=${ADMIN_USER_ID} -DadminEmailAddress=${ADMIN_EMAIL_ADDRESS}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DeventRepositoryAuth=${EVENT_REPO_AUTH_ENABLED}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DjmsEnable=${JMS_ENABLE} -DjmsType=${JMS_TYPE} -DjmsHost=${JMS_HOST} -DjmsPort=${JMS_PORT} -DjmsQueueManager=${JMS_QUEUE_MANAGER} -DjmsChannel=${JMS_CHANNEL} -DjmsSubject=${JMS_SUBJECT} -DjmsTopic=${JMS_TOPIC} -DjmsUserid=${JMS_USER_ID} -DjmsPassword=${JMS_PASSWORD} -DjmsEmbedBroker=${JMS_EMBED_BROKER} -DjmsBrokerName=${JMS_BROKER_NAME} -DjmsRetries=${JMS_RETRIES} -DjmsRetryWait=${JMS_RETRY_WAIT} -DjmsTimeToLive=${JMS_TIME_TO_LIVE} -DjmsDataDirectory=${JMS_DATA_DIRECTORY}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DkeyStore=${KEYSTORE} -DkeyStorePass=${KEYSTORE_PASS} -DtrustStore=${TRUSTSTORE} -DtrustStorePass=${TRUSTSTORE_PASS} -DjreTrustStorePass=${JRE_TRUSTSTORE_PASS} -DkeyAlias=${KEY_ALIAS}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DemailHostname=${EMAIL_SERVER_HOST_NAME} -DemailPort=${EMAIL_SERVER_PORT} -DemailUser=${EMAIL_SERVER_USER} -DemailPassword=${EMAIL_SERVER_PASSWORD} -DemailRespond=${EMAIL_FROM_ADDRESS} -DccAdminEmailAddress=${CCENTER_ADMIN_EMAIL_ADDRESS}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DuserKey=${USER_KEY} -DoracleRacOrScan=${ORACLE_RAC_OR_SCAN}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DpackagePath=${PACKAGE_PATH} -DseasPrimaryAddress=${PRIMARY_ADDRESS} -DseasPrimaryPort=${PRIMARY_PORT} -DseasAlternativeAddress=${ALTERNATE_ADDRESS} -DseasAlternativePort=${ALTERNATE_PORT} -DseasSecureConnection=${SECURE_CONNECTION} -DseasProfileName=${PROFILE_NAME} -DseasPersistentConnection=${PERSISTENT_CONNECTION} -DseasSecureProtocol=${SECURE_PROTOCOL}"

JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -Djava.security.krb5.conf=${KERBEROS_CONFIG_FILE} -Doracle.net.kerberos5_cc_name=${KERBEROS_CREDENTIAL_CACHE} "
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -DORACLE_KERBEROS_CONNECTION=${ORACLE_KERBEROS_CONNECTION} "
JAVA_SYSTEM_VAR="$JAVA_SYSTEM_VAR -Dsun.security.krb5.debug=${KERBEROS_DEBUG} "

BACKUP_CMD="-jar ../lib/sterling/SCCenter.jar com.sterlingcommerce.scc.common.util.FileMgr -backup ../log/CCInstall.log"


# Backup log files
${JAVA_HOME}/bin/java  -Xbootclasspath/p:$BOOT_CP   ${JAVA_HEAP}  ${JAVA_SYSTEM_VAR} ${BACKUP_CMD}

# Configure Engine

LAUNCH_CMD="-jar ../lib/sterling/SCCenter.jar com.sterlingcommerce.scc.agent.install.Installer"

${JAVA_HOME}/bin/java   -Xbootclasspath/p:$BOOT_CP:$XERCES_IMPL_JAR ${JAVA_XX_OPT}  ${JAVA_HEAP} ${JAVA_SYSTEM_VAR} ${LAUNCH_CMD}

### restrict permissions for encryption key files
CC_RPP_ENC_FILE="../conf/SCCRootPass.enc"
CC_RPP_DIGEST_FILE="../conf/SCCRootPass.digest"
CC_UK_DIGEST_FILE="../conf/SCCUserKey.digest"

echo "Updating permissions for encryption key files..."
if [ -e ${CC_RPP_ENC_FILE} ]
then
        #echo "Updating  ${CC_RPP_ENC_FILE}"
        chmod 600  ${CC_RPP_ENC_FILE}
fi

if [ -e ${CC_RPP_DIGEST_FILE} ]
then
        #echo "Updating  ${CC_RPP_ENC_FILE}"
        chmod 600 ${CC_RPP_DIGEST_FILE}
fi


if [ -e ${CC_UK_DIGEST_FILE} ]
then
        #echo "Updating  ${CC_UK_DIGEST_FILE}"
        chmod 600 ${CC_UK_DIGEST_FILE}
fi
echo "Updating permissions for encryption key files...Done!"