Setting Application Install Options

Overview

Parameters added to the app_options variable in your Jython file are passed to the AdminApp.install wsadmin function at deploy time. Any options supported by IBM are also supported by RapidDeploy our application release automation tool. Please see the IBM Documentation for a complete list of examples.

Also note all these configurations apply also for WAR files just by setting the location of the WAR file in the earLocation property and setting the proper -MapWebModToVH option.

Required Values in Jython

The following values are required for a deployment:

app_options = ["-server", serverName, "-cluster", clusterName, "-cell", cellName, "-node", nodeName, "-appname", appName  ]

Optional Values

There are a large number of optional values. These are split into general values (some examples below), and Mapping values such as MapResRefToEJB and MapWebModToVH detailed in other articles.

Start an application after installation

In order to launch an application right after its installation you can use the following property ("false" by default):

startAppAfterInstall = "true"

Examples

Example with pre-compiling of JSPs and using Meta data from binaries

#---------------------------------------------------
# Application install Related Variables
#---------------------------------------------------
entAppName=appName
app_options = ["-server", serverName, "-cluster", clusterName, "-cell", cellName, "-node", nodeName, "-appname", appName  ]
app_options.append([-preCompileJSPs])
app_options.append("-useMetaDataFromBinary")

Example setting file reload interval for an application

app_options.append("-reloadEnabled")
app_options.append(["-reloadInterval", "3"])

Example setting JSP Reload interval for a Web Module

#-------------------------------------------------------------------------------------------------------------
# The following line Sets WEB module JSP reload interval.
#-------------------------------------------------------------------------------------------------------------
app_options.append("-JspReloadForWebMod")
app_options.append([["IVT Application", "ivt_app.war,WEB-INF/ibm-web-ext.xmi","'AppDeploymentOption.Yes", 5]])

Example setting mapping web modules to virtual hosts

#-------------------------------------------------------------------------------------------------------------
# The following line maps the virtual host to use within the WEB module.
#
#-------------------------------------------------------------------------------------------------------------
app_options.append("-MapWebModToVH")
app_options.append([["prweb.war", "prweb.war,WEB-INF/web.xml", "SIPCServer"], ["prdbutil.war", "prdbutil.war,WEB-INF/web.xml", "SIPCServer"], ["prsysmgmt.war", "prsysmgmt.war,WEB-INF/web.xml", "SIPCServer"]])

Example mapping roles to users

app_options.append("-MapRolesToUsers")
app_options.append([[ "PegaAuthUser", "AppDeploymentOption.No", "AppDeploymentOption.No", "", "GG_PEGASI_USERS" ]])

Example ordering post install options

In this example, the cellName is set after the other application install options have been applied. The cellName is applied post install of the application.

#---------------------------------------------------
# Application edit (post install) Related Variables
#---------------------------------------------------

app_options = ["-server", serverName, "-cluster", clusterName, "-node", nodeName, "-appname", appName  ]
app_options.append([-preCompileJSPs])

app_options_1 = ["-cell", cellName]

Mapping Multiple Resources

Using the wsadmin AdminApp function, we can perform application mappings. However, sometimes we need to map multiple resources to a module, and the way of doing this using AdminApp is not always consistent.

Here are a couple of examples, and their syntax:

MapSharedLibForMod

#--------------------------------------------------- 
# Resource 8: Map Modules to Shared Libraries 
#--------------------------------------------------- 
# 
# Fields:- Web module:URI:Shared Library: 
# 
res8_1 = ["Default Web Application", "DefaultWebApplication.war,WEB-INF/web.xml", "RDSharedLib1+RDSharedLib2" ] 
res8_2 = ["Admin Web Application", "AdminWebApplication.war,WEB-INF/web.xml", "RDSharedLib3" ] 
app_options.append("-MapSharedLibForMod") 
app_options.append([res8_1,res8_2])

Here we map two libraries to the DefaultWebApplication, and one library to the AdminWebApplication. Note here the use of a "+" symbol to delimit the two libraries for the DefaultWebApplication mappings.

MapModulesToServers

This option specifies the application server or server cluster where you want to install modules that are contained in your application. You can install modules on the same server, or disperse them among several servers.

In the next example we map 2 different modules to the same server:

#--------------------------------------------------- 
# Map Modules to Servers of Clusters 
#--------------------------------------------------- 
# 
# Fields:- Module:URI:Target 
# 
res7_1=["UtilExt","UtilExt.war,WEB-INF/web.xml","WebSphere:cell=c1_ebz_dev,node=mynode,server=server1"]
res7_2=["UtilInt","UtilInt.war,WEB-INF/web.xml","WebSphere:cell=c1_ebz_dev,node=mynode,server=server1"]
app_options.append('-MapModulesToServers')
app_options.append([res7_1,res7_2])

And in the following example we map the same module to different clusters:

#--------------------------------------------------- 
# Map Modules to Servers of Clusters 
#--------------------------------------------------- 
# 
# Fields:- Module:URI:Target 
# 
res7_1a=["Util","Util.war,WEB-INF/web.xml","WebSphere:cell=c1_ebz_dev,cluster=k1_ebz_dev+WebSphere:cell=c1_ebz_dev,cluster=k2_ebz_dev"]
app_options.append('-MapModulesToServers')
app_options.append([res7_1a])

Note here the use of a "+" symbol to delimit the 2 different clusters.

MapRolesToUsers

#--------------------------------------------------- 
# Resource 9: Map Roles to Users 
#--------------------------------------------------- 
# 
# Fields:- Role:Everyone :All authenticated :Mapped users:Mapped groups: 
# 
res9_1 = ["All Role", "AppDeploymentOption.Yes", "AppDeploymentOption.No", "", "LOGIN_AUTH|FULL_AUTH"]
app_options.append("-MapRolesToUsers") app_options.append([res9_1])

Note here the use of a "|" (pipe) symbol to delimit the two mapped groups.

For both of the above examples, implementation is with AdminApp as follows:

AdminApp.install(earLocation, app_options )

Configure JSF implementation

You have to set the next variable to the 3 possibles values:

  • SunRI1.2: for "Sun Reference Implementation 1.2".
  • MyFaces1.2: for "MyFaces 1.2".
  • MyFaces: for "MyFaces 2.0" (only for WAS 8.5).

By default "Sun Reference Implementation 1.2" is used:

appJSFImplementation = "SunRI1.2"