Using WebSphere® Control Program (wscp) to install different modules to a different server group or application server
 Technote (FAQ)
 
Problem
This technote includes a sample Tcl script which installs a server group enterprise application.
 
 
Solution

#Sample tcl
set mynode NodeA
#setting the dir where my .ear file is located
#$WAS_HOME/installableApps
set instdir C:/WebSphere/AppServer/installableApps
#setting my ear file name
set earfile Sample.ear
#SG1 and SG2 are my 2 server groups.
#Sample.ear file contains 2 war files
# "examples.war" and  "default_app.war "
#This tcl will install..
#"examples.war"    --->ServerGroup "SG1"
#"default_app.war" --->ServerGroup "SG2"
#
set sname1 "SG1"
set sname2 "SG2"
#Set Driver and virtual host
set jdbcdrivername "Sample DB Driver"
set vhostName "default_host"
#
set modserv1 [list examples.war /ServerGroup:$sname1/]
set modserv2 [list default_app.war /ServerGroup:$sname2/]
#To install this war file to some AppServer then the
# "list" part will look like
#[list default_app.war/Node:$mynode/ApplicationServer:$sname2/]
#Since the AppServer is attached to some specific "Node" you
#need to specify where the "AppServer" is attached to

#
set modservers [list $modserv1 $modserv2]
#
EnterpriseApp install /Node:$mynode/ $instdir$earfile -moduleappservers $modservers

where:
wscp is connected to NodeA
SG1,SG2 are server groups
ServerGroup is an operator which allows you to configure server groups and clones. It is not attached with any Nodes (like application servers). They are domain level entities.
Sample.ear is an enterprise archive (EAR) file. It contains examples.war and default_app.war

To execute the sample Tcl script above, use the -f option as follows:

$WAS_HOME\bin> wscp -f Sample.tcl

For other examples please review the following section from the WebSphere Application Server V4.0 Information Center:
6.6.0.2.2.5: Sample Tcl procedures and scripts
 
Related information
More details on wscp and Tcl
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Administrative Console (all non-scripting)
Operating system(s): Windows
Software version: 4.0.7
Software edition:
Reference #: 1162252
IBM Group: Software Group
Modified date: Mar 3, 2004