Application installation and uninstallation scripts
The scripting library provides multiple script procedures to automate your application configurations. See the usage information for scripts that install applications. You can run each script individually or combine procedures to create custom automation scripts for your environment.
- installAppWithDefaultBindingOption
- installAppWithNodeAndServerOptions
- installAppWithClusterOption
- installAppModulesToSameServerWithMapModulesToServersOption
- installAppModulesToDiffServersWithMapModulesToServersOption
- installAppModulesToSameServerWithPatternMatching
- installAppModulesToDiffServersWithPatternMatching
- installAppModulesToMultiServersWithPatternMatching
- installAppWithTargetOption
- installAppWithDeployEjbOptions
- installAppWithVariousTasksAndNonTasksOptions
- installWarFile
- uninstallApplication
The file path specified for the earFile argument
can use forward (/
) or backward (\
)
slashes. For example, both c:\ears\MyApp.ear and c:/ears/MyApp.ear
are
supported values for earFile.
installAppWithDefaultBindingOption
This script installs an application using the -usedefaultbindings option.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the target node. |
serverName | Specifies the name of the target server. |
dsJndiName | Specifies the JNDI name of the data source to use. |
dsUserName | Specifies the user name for the data source. |
dsPassword | Specifies the password for the data source. |
connFactory | Specifies the name of the connection factory to use. |
EJBprefix | Specifies the Enterprise JavaBeans (EJB) prefix to use. |
virtualHostName | Specifies the virtual host for the application to install. |
Syntax
AdminApplication.installAppWithDefaultBindingOption(appName, earFile,
nodeName, serverName, dsJndiName, dsUserName,
dsPassword, connFactory, EJBprefix, virtualHostName)
Example usage
AdminApplication.installAppWithDefaultBindingOption("myApp", "c:/ears/DefaultApplication.ear",
"myNode", "myServer", "myJndi", "user1", "password", "myCf", "myEjb", "myVH")
AdminApplication.installAppWithDefaultBindingOption("myApp", "/ears/DefaultApplication.ear",
"myNode", "myServer", "myJndi", "user1", "password", "myCf", "myEjb", "myVH")
installAppWithNodeAndServerOptions
This script installs an application using the -node and -server options.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the application server of interest. |
Syntax
AdminApplication.installAppWithNodeAndServerOptions(appName, earFile,
nodeName, serverName)
Example usage
AdminApplication.installAppWithNodeAndServerOptions("myApp", "c:/ears/DefaultApplication.ear",
"myNode", "myServer")
AdminApplication.installAppWithNodeAndServerOptions("myApp", "/ears/DefaultApplication.ear",
"myNode", "myServer")
installAppWithClusterOption
This script installs an application using the -cluster option.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
clusterName | Specifies the name of the cluster of interest. |
Syntax
AdminApplication.installAppWithClusterOption(appName, earFile, clusterName)
Example usage
AdminApplication.installAppWithClusterOption("myApp", "c:/ears/DefaultApplication.ear", "myCluster")
AdminApplication.installAppWithClusterOption("myApp", "/ears/DefaultApplication.ear", "myCluster")
installAppModulesToSameServerWithMapModulesToServersOption
This script deploys application modules to the same server using the -MapModulesToServers option.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the application server of interest. |
Syntax
AdminApplication.installAppModulesToSameServerWithMapModulesToServersOption(appName,
earFile, nodeName, serverName)
Example usage
AdminApplication.installAppModulesToSameServerWithMapModulesToServersOption("myApp",
"c:/ears/DefaultApplication.ear", "myNode", "myServer")
AdminApplication.installAppModulesToSameServerWithMapModulesToServersOption("myApp",
"/ears/DefaultApplication.ear", "myNode", "myServer")
installAppModulesToDiffServersWithMapModulesToServersOption
This script deploys application modules to different servers using the -MapModulesToServers option. Use this script to install application modules to one or two servers. To install to additional servers, create a custom script based on the syntax in the AdminApplication.py file, or run the script multiple times.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName1 | Specifies the name of the application server to which the application is deployed. |
serverName2 | Specifies the name of an additional application server to which the application is deployed. |
Syntax
AdminApplication.installAppModulesToDiffServersWithMapModulesToServersOption(appName,
earFile, nodeName, serverName1, serverName2)
Example usage
AdminApplication.installAppModulesToDiffServersWithMapModulesToServersOption("myApp",
"c:/ears/DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2")
AdminApplication.installAppModulesToDiffServersWithMapModulesToServersOption("myApp",
"/ears/DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2")
installAppModulesToSameServerWithPatternMatching
This script deploys application modules with the -MapModulesToServers pattern matching option.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the application server of interest. |
Syntax
AdminApplication.installAppModulesToSameServerWithPatternMatching(appName,
earFile, nodeName, serverName)
Example usage
AdminApplication.installAppModulesToSameServerUingPatternMatching("myApp",
"c:\ears\DefaultApplication.ear", "myNode", "myServer")
AdminApplication.installAppModulesToSameServerUingPatternMatching("myApp",
"/ears/DefaultApplication.ear", "myNode", "myServer")
installAppModulesToDiffServersWithPatternMatching
This script deploys application modules to different servers using the -MapModulesToServers pattern matching option. Use this script to install application modules to one or two servers. To install to additional servers, create a custom script based on the syntax in the AdminApplication.py file, or run the script multiple times.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName1 | Specifies the name of the application server to which the application is deployed. |
serverName2 | Specifies the name of an additional application server to which the application is deployed. |
Syntax
AdminApplication.installAppModulesToDiffServersWithPatternMatching(appName,
earFile, nodeName, serverName1, serverName2)
Example usage
AdminApplication.installAppModulesToDiffServersWithPatternMatching("myApp",
"c:\ears\DefaultApplication.ear", "myNode", "myServer1", "myServer2")
AdminApplication.installAppModulesToDiffServersWithPatternMatching("myApp",
"/ears/DefaultApplication.ear", "myNode", "myServer1", "myServer2")
installAppModulesToMultiServersWithPatternMatching
This script deploys application modules to multiple servers using the -MapModulesToServers pattern matching option. Use this script to install application modules to one or two servers. To install to additional servers, create a custom script based on the syntax in the AdminApplication.py file, or run the script multiple times.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName1 | Specifies the name of the application server to which the application is deployed. |
serverName2 | Specifies the name of an additional application server to which the application is deployed. |
Syntax
AdminApplication.installAppModulesToMultiServersWithPatternMatching(appName,
earFile, nodeName, serverName1, serverName2)
Example usage
AdminApplication.installAppModulesToMultiServersWithPatternMatching("myApp",
"c:\ears\DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2")
AdminApplication.installAppModulesToMultiServersWithPatternMatching("myApp",
"/ears/DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2")
installAppWithTargetOption
This script deploys an application to multiple servers using the -target option. Use this script to install application modules to one or two servers. To install to additional servers, create a custom script based on the syntax in the AdminApplication.py file, or run the script multiple times.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName1 | Specifies the name of the application server to which the application is deployed. |
serverName2 | Specifies the name of an additional application server to which the application is deployed. |
Syntax
AdminApplication.installAppWithTargetOption(appName, earFile, nodeName,
serverName1, serverName2)
Example usage
AdminApplication.installAppWithTargetOption("myApp", "c:\ears\DefaultApplication.ear", "myNode",
"myServer1", "myServer2")
AdminApplication.installAppWithTargetOption("myApp", "/ears/DefaultApplication.ear", "myNode",
"myServer1", "myServer2")
installAppWithDeployEjbOptions
This script deploys an application with the -deployejb option.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
nodeName | Specifies the name of the target node. |
serverName | Specifies the name of the target server. |
Syntax
AdminApplication.installAppWithDeployEjbOptions(appName, earFile,
nodeName, serverName)
Example usage
AdminApplication.installAppWithDeployEjbOptions("myApp", "c:\ears\DefultApplication.ear",
"myNode", "myServer")
AdminApplication.installAppWithDeployEjbOptions("myApp", "/ears/DefultApplication.ear",
"myNode", "myServer")
installAppWithVariousTasksAndNonTasksOptions
This script deploys an application with various tasks and non-tasks options.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
earFile | Specifies the EAR file to deploy. |
Syntax
AdminApplication.installAppWithVariousTasksAndNonTasksOptions(appName, earFile)
Example usage
AdminApplication.installAppWithVariousTasksAndNonTasksOptions("myApp", "c:\ears\DefaultApplication.ear")
AdminApplication.installAppWithVariousTasksAndNonTasksOptions("myApp", "/ears/DefaultApplication.ear")
installWarFile
This script installs a web application archive (WAR) file. A web module is created by assembling servlets, JavaServer Pages (JSP) files, and static content such as Hypertext Markup Language (HTML) pages into a single deployable unit. Web modules are stored in web application archive (WAR) files, which are standard Java archive files.
Argument | Description |
---|---|
appName | Specifies the name of the application to install. |
warFile | Specifies the WAR file to deploy. |
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the application server of interest. |
contextRoot | Specifies the context root of the web application. The context root is combined with the defined servlet mapping (from the WAR file) to compose the full URL that users type to access the servlet. For example, if the context root is /gettingstarted and the servlet mapping is MySession, then the URL is http://host:port/gettingstarted/MySession. |
Syntax
AdminApplication.installWarFile(appName, warFile,
nodeName, serverName, contextRoot)
Example usage
AdminApplication.installWarFile("myApp", "c:\binaries\DefaultWebApplication.war",
"myNode", "myServer", "/")
AdminApplication.installWarFile("myApp", "/binaries/DefaultWebApplication.war",
"myNode", "myServer", "/")
uninstallApplication
This script uninstalls an application.
Argument | Description |
---|---|
appName | Specifies the name of the application to uninstall. |
Syntax
AdminApplication.uninstallApplication(appName)
Example usage
AdminApplication.uninstallApplication("myApp")