I had installed Sentinel Control Center (SCC) on my notebook with one environment host and I needed to connect to multiple Sentinel environments such as development, test and production. As the sentinel server host information is hard coded in the configuration file, it was difficult to edit configuration file, every time and keep changing as I needed to connect to multiple environments many times a day. Here is the DOS command script batch file I came up with to solve the problem:
Step 1 - Preparation: Copy configuration file with different environment prefix.
When you install SCC make a note of the sentinel server host name you enter for connectivity to one specific environment, e.g., sendevsrv.mycompany.com for development environment. The configuration file is located on windows C:\Program Files\Novell\Sentinel6\Config. After the installation of SCC in the development environment has been tested and working, make a copy of the configuration file with your environment specific prefix, e.g., DEVConfiguration.xml, TESTConfiguration.xml and PRODConfiguration.xml. Example: edit TESTConfiguration.xml and replace sendevsrv.mycompany.com with sentestsrv.mycomany.com for test environment.
Edit PRODConfiguration.xml and replace sendevsrv.mycompany.com with senprdsrv.mycomany.com for production environment.
Configuration.xml under C:\Program Files\Novell\Sentinel6\config file stores the host information. Section of configuration.xml which has the host server information is shown below.
<!-- Used by the java gui client --> <strategy active="yes" id="sentinel_client" location="com.esecurity.common.communication.strategy.sonicstrategy.SonicStrategyFactory" name="Sonic"> <sonic brokerURL="tcp:// sendevsrv.mycompany.com:10012" interceptors="compression,encryption" password="" username=""/> </strategy> <strategy active="yes" id="proxied_client" location="com.esecurity.common.communication.strategy.proxystrategy.ProxiedClientStrategyFactory"> <transport type="ssl"> <ssl host=" sendevsrv.mycompany.com " keystore="C:\Program Files\Novell\Sentinel6/config/.proxyClientKeystore" port="10013" usecacerts="false"/> </transport> </strategy> <strategy active="yes" id="proxied_trusted_client" location="com.esecurity.common.communication.strategy.proxystrategy.ProxiedClientStrategyFactory"> <transport type="ssl"> <ssl host=" sendevsrv.mycompany.com" keystore="C:\Program Files\Novell\Sentinel6/config/.proxyClientKeystore" port="10014" usecacerts="false"/> </transport> </strategy>
Step 2. Copy the following dos command script as a batch file say SETENVLAUNCHSCC.bat.
@ECHO off REM FILENAME: SETENVLAUNCHSCC.bat REM LAST MODIFIED DATE: 14-SEP-2010 REM ENVRIONMENT: WINDOWS, CODE TESTED on Windows XP REM PURPOSE: TO SET Environment specific Configuration File and Launch Sentinel Control Center REM Sentinel Version (SCC) Tested: 6.1 cls :start ECHO. ECHO 1. Dev environment ECHO 2. Test environment ECHO 3. Prod environment set choice= set /p choice=Type the number to select environment: if not '%choice%'=='' set choice=%choice:~0,1% if '%choice%'=='1' goto ONE if '%choice%'=='2' goto TWO if '%choice%'=='3' goto THREE ECHO "%choice%" is not valid please try again by restarting SETSCCENV.BAT program Pause GOTO END :ONE ECHO YOU HAVE SELECTED -Dev environment cd C:\Program Files\Novell\Sentinel6\config COPY DEVConfiguration.xml Configuration.xml Echo Dev environment Configuration file copied! SCC will be launched after you press any key to continue! pause CALL "C:\Program Files\Novell\Sentinel6\bin\control_center.exe" GOTO END :TWO ECHO YOU HAVE SELECTED 2-Test environment cd C:\Program Files\Novell\Sentinel6\config COPY TESTConfiguration.xml Configuration.xml Echo Test environment Configuration file copied! SCC will be launched after you press any key to continue! Pause CALL "C:\Program Files\Novell\Sentinel6\bin\control_center.exe" GOTO END :THREE ECHO YOU HAVE SELECTED 3-Prod environment cd C:\Program Files\Novell\Sentinel6\config COPY TESTConfiguration.xml Configuration.xml Echo Test environment Configuration file copied! SCC will be launched after you press any key to continue! Pause CALL "C:\Program Files\Novell\Sentinel6\bin\control_center.exe" GOTO END :END