Smarts: How to configure several SMARTS domains running out of one installation? Using SM_SITEMOD and SM_WRITEABLE to configure multiple Smarts domains in one installation
search cancel

Smarts: How to configure several SMARTS domains running out of one installation? Using SM_SITEMOD and SM_WRITEABLE to configure multiple Smarts domains in one installation

book

Article ID: 331754

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - SMARTS

Resolution

How to configure several SMARTS domains running out of one installation?

Using SM_SITEMOD and SM_WRITEABLE you can configure multiple Smarts domains in one installation


The easiest way to configure several AM servers running out of one installation is by specifying a separate SM_SITEMOD environment for each server.  This will allow you to specify configuration files unique to each domain, yet still use the same core files that are not different between sites.

The SM_SITEMOD variable provides a search list that InCharge uses to locate files.  This list is used to find files users can modify to use with Smarts at their site. 

Such files include configuration files, ASL rulesets, and scripts.  The components of the list are separated by colons (:) on UNIX and semicolons (;) on Microsoft Windows. The default value of SM_SITEMOD is:  BASEDIR/smarts/local.

Create <BASEDIR>/IP/smarts/local2 and create only those directories under local2 that are unique to the particular domain using the directory.  Do not copy the entire local to local2

Place the files specifc to the domain using local2 under local2. One of the most common files required for an IP domain is trapd.conf.  So you will need to create local2/conf/trapd directory.  If trapd.conf is the only file that will be unique to the second domain no other files/directories need to be created. 

NOTE: This will need to be done for every single domain that you run out of a single install directory.
 
 A.  set SM_SITEMOD on the command line.  Setting the variable will tell sm_edit to save modified copies of default files under local2 directory 
      structure.
       C:\set SM_SITEMOD=C:\InCharge6\IP\smarts\local2;C:\InCharge6\IP\smarts\local
 B.  use sm_edit to modify trapd.conf file. 
       C:\InCharge6\IP\smarts\bin\sm_edit conf\trapd\trapd.conf
 C.  Change the PORT parameter value from PORT: 9000 to PORT: 9001 and then save the file.  The file should be saved under
       C:\InCharge6\IP\smarts\local2\conf\trapd
 D.  Register the new AM domain as a service and specify a separate local directory and directory for log files.  Run the below command from
       BASEDIR\smarts\bin.   Please note that setting SM_WRITABLE  is only necessary if you would like the log for the second domain to go into a separate directory.  If you prefer that the logs for all domains are written into the same directory, then do not set SM_WRITABLE
  
 NOTE: The entire command below must be entered as one line.

sm_service install --force --name=ic-am-pm-server-2 --description="INCHARGE-AM-PM for Site 2" --startmode=runonce --env=SM_SITEMOD=C:\InCharge6\IP\smarts\local2;C:\InCharge6\IP\smarts\local;C:\InCharge6\IP\smarts --env=SM_WRITEABLE=C:\InCharge6\IP\smarts\local2 C:\InCharge6\IP\smarts\bin\sm_server --name=INCHARGE-AM-PM-2 --config=icf  --bootstrap=bootstrap-am-pm.conf --port=0 --subscribe=default --ignore-restore-errors --output


Additional Information

It is important to note that the SM_SITEMOD is not applicable for the runcmd_env.sh file. So it always looks for the default location for runcmd_env.sh file.
Whereas the same is applicable for other configuration files or asl files. This is as per design