+

Search Tips   |   Advanced Search

Application installation and uninstallation scripts


The scripting library provides multiple script procedures to automate the application configurations. This page provides usage information for scripts that install applications. We can run each script individually or combine procedures to create custom automation scripts for the environment.

Each application management script procedure is located in...

WAS_HOME/scriptLibraries/application/V70

Use the following script procedures to install and uninstall applications:

 

installAppWithAppNameOption

This script installs an application using the -appname option. The -appname option specifies the name of the application. The default is the display name of the application. To run the script, specify the application name and EAR file arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.

Syntax

AdminApplication.installAppWithAppNameOption(appName, 
 earFile)

Example usage

(Windows)

AdminApplication.installAppWithAppNameOption("myApp", 
 "c:/ears/DefaultApplication.ear") 
[AIX] [HP-UX] [Linux] [Solaris]

AdminApplication.installAppWithAppNameOption("myApp", "\ears\DefaultApplication.ear") 

 

installAppWithDefaultBindingOption

This script installs an application using the -usedefaultbindings option. To run the script, specify the application name, EAR file, data source Java ™ Naming and Directory Interface (JNDI) name, data source user name, data source password, connection factory, Enterprise Java Beans™ prefix, and virtual host name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the target node.
serverName Name of the target server.
dsJndiName JNDI name of the data source to use.
dsUserName User name for the data source.
dsPassword for the data source.
connFactory Name of the connection factory to use.
EJBprefix Specifies the EJB prefix to use.
virtualHostName Virtual host for the application to install.

Syntax

AdminApplication.installAppWithDefaultBindingOption(appName, 
 earFile, nodeName, serverName, dsJndiName, 
 dsUserName, dsPassword, connFactory, EJBprefix, 
 virtualHostName)

Example usage

(Windows)

AdminApplication.installAppWithDefaultBindingOption("myApp", 
 "c:/ears/DefaultApplication.ear", "myNode", "myServer", "myJndi", "user1", "password", 
 "myCf", "myEjb", "myVH")
[AIX] [Solaris]

[Linux] [HP-UX]

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. To run the script, specify the application name, EAR file, node name, and server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName Name of the appserver of interest.

Syntax

AdminApplication.installAppWithNodeAndServerOptions(appName, 
 earFile, nodeName, serverName)

Example usage

(Windows)

AdminApplication.installAppWithNodeAndServerOptions("myApp", 
 "c:/ears/DefaultApplication.ear", "myNode", "myServer") 
[AIX] [Solaris]

[Linux] [HP-UX]

AdminApplication.installAppWithNodeAndServerOptions("myApp", "/ears/DefaultApplication.ear", 
 "myNode", "myServer") 

 

installAppWithClusterOption

This script installs an application using the -cluster option. To run the script, specify the application name, EAR file, and cluster name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
clusterName Name of the cluster of interest.

Syntax

AdminApplication.installAppWithClusterOption(appName, 
 earFile, clusterName)

Example usage

(Windows)

AdminApplication.installAppWithClusterOption("myApp", 
 "c:\ears\DefaultApplication.ear", "myCluster") 
[AIX] [Solaris]

[Linux] [HP-UX]

AdminApplication.installAppWithClusterOption("myApp", "/ears/DefaultApplication.ear", 
 "myCluster") 

 

installAppModulesToSameServerWithMapModulesToServersOption

This script deploys application modules to the same server using the -MapModulesToServers option. To run the script, specify the application name, EAR file, node name, and server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName Name of the appserver of interest.

Syntax

AdminApplication.installAppModulesToSameServerWithMapModulesToServersOption(appName, 
 earFile, nodeName, serverName)

Example usage

(Windows)

AdminApplication.installAppModulesToSameServerWithMapModulesToServersOption("myApp", 
 "c:\ears\DefaultApplication.ear", "myNode", "myServer")
[AIX] [Solaris]

[Linux] [HP-UX]

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. To run the script, specify the application name, EAR file, node name, and both server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName1 Name of the appserver to which the application is deployed.
serverName2 Name of an additional appserver to which the application is deployed.

Syntax

AdminApplication.installAppModulesToDiffServersWithMapModulesToServersOption(appName, 
 earFile, nodeName, serverName1, 
 serverName2)

Example usage

(Windows)

AdminApplication.installAppModulesToDiffServersWithMapModulesToServersOption("myApp", 
 "c:\ears\DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2") 
[AIX] [Solaris]

[Linux] [HP-UX]

AdminApplication.installAppModulesToDiffServersWithMapModulesToServersOption("myApp", 
 "/ears/DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2") 

 

installAppModulesToSameServerWithPatternMatching

This script deploys application modules with the -MapModulesToServers pattern matching option. To run the script, specify the application name, EAR file, node name, and server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName Name of the appserver of interest.

Syntax

AdminApplication.installAppModulesToSameServerWithPatternMatching(appName, 
 earFile, nodeName, serverName)

Example usage

(Windows)

AdminApplication.installAppModulesToSameServerUingPatternMatching("myApp", "c:\ears\DefaultApplication.ear", "myNode", "myServer") 
[AIX] [Solaris]

[Linux] [HP-UX]

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. To run the script, specify the application name, EAR file, node name, and both server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName1 Name of the appserver to which the application is deployed.
serverName2 Name of an additional appserver to which the application is deployed.

Syntax

AdminApplication.installAppModulesToDiffServersWithPatternMatching(appName, 
 earFile, nodeName, serverName1, 
 serverName2)

Example usage

(Windows)

AdminApplication.installAppModulesToDiffServersWithPatternMatching("myApp", 
 "c:\ears\DefaultApplication.ear", "myNode", "myServer1", "myServer2")
[AIX] [Solaris]

[Linux] [HP-UX]

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. To run the script, specify the application name, EAR file, node name, and each server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName1 Name of the appserver to which the application is deployed.
serverName2 Name of an additional appserver to which the application is deployed.

Syntax

AdminApplication.installAppModulesToMultiServersWithPatternMatching(appName, 
 earFile, nodeName, serverName1, 
 serverName2)

Example usage

(Windows)

AdminApplication.installAppModulesToMultiServersWithPatternMatching("myApp", 
 "c:\ears\DefaultApplication.ear", "myCell", "myNode", "myServer1", "myServer2")
[AIX] [Solaris]

[Linux] [HP-UX]

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. To run the script, specify the application name, EAR file, node name, and each server name arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the node of interest.
serverName1 Name of the appserver to which the application is deployed.
serverName2 Name of an additional appserver to which the application is deployed.

Syntax

AdminApplication.installAppWithTargetOption(appName, 
 earFile, nodeName, serverName1, 
 serverName2)

Example usage

(Windows)

AdminApplication.installAppWithTargetOption("myApp", 
 "c:\ears\DefaultApplication.ear", "myNode", "myServer1", "myServer2")
[AIX] [Solaris]

[Linux] [HP-UX]

AdminApplication.installAppWithTargetOption("myApp", "/ears/DefaultApplication.ear", "myCell", 
 "myNode", "myServer1", "myServer2")

 

installAppWithDeployEjbOptions

This script deploys an application with the -deployejb option. To run the script, specify the application name and EAR file arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.
nodeName Name of the target node.
serverName Name of the target server.

Syntax

AdminApplication.installAppWithDeployEjbOptions(appName, 
 earFile, nodeName, serverName)

Example usage

(Windows)

AdminApplication.installAppWithDeployEjbOptions("myApp", 
 "c:\ears\DefultApplication.ear", "myNode", "myServer")
[Solaris]

[AIX] [Linux] [HP-UX]

AdminApplication.installAppWithDeployEjbOptions("myApp", "/ears/DefultApplication.ear", "myNode", 
 "myServer")

 

installAppWithVariousTasksAndNonTasksOptions

This script deploys an application with various tasks and non-tasks options. To run the script, specify the application name and EAR file arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
earFile Specifies the EAR file to deploy.

Syntax

AdminApplication.installAppWithVariousTasksAndNonTasksOptions(appName, 
 earFile)

Example usage

(Windows)

AdminApplication.installAppWithVariousTasksAndNonTasksOptions("myApp", 
 "c:\ears\DefaultApplication.ear")
[AIX] [Solaris]

[Linux] [HP-UX]

AdminApplication.installAppWithVariousTasksAndNonTasksOptions("myApp", 
 "/ears/DefaultApplication.ear")

 

installWarFile

This script installs a WAR file. A Web module is created by assembling servlets, JSPs, and static content such as HTML pages into a single deployable unit. Web modules are stored in WAR files, which are standard Java archive files. To run the script, specify the application name, WAR file, node name, server name, and context root arguments, as defined in the following table:

Argument Description
appName Name of the application to install.
warFile Specifies the WAR file to deploy.
nodeName Name of the node of interest.
serverName Name of the appserver of interest.
contextRoot Context root of the Web app. 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

(Windows)

AdminApplication.installWarFile("myApp", 
 "c:\binaries\DefaultWebApplication.war", "myNode", "myServer", "/") 
[AIX] [Solaris]

[Linux] [HP-UX]

AdminApplication.installWarFile("myApp", "/binaries/DefaultWebApplication.war", "myNode", 
 "myServer", "/")

 

uninstallApplication

This script uninstalls an application. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application to uninstall.

Syntax

AdminApplication.uninstallApplication(appName)

Example usage

AdminApplication.uninstallApplication("myApp")




 

Related tasks


Use the script library to automate the application serving environment
Automating application configurations using the scripting library
Application administration scripts

 

Related


Application query scripts
Application update scripts
Application export scripts
Application deployment configuration scripts