Installing applications with the wsadmin tool

You can use the wsadmin tool and scripting to install an application into the run time.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

On a single server installation, the server must be running before you install an application.

On a network deployment installation, the deployment manager must be running before you install an application. See the startManager command article for more information.

About this task

The application that you install must be an enterprise archive file (EAR), a Web archive (WAR) file, a servlet archive (SAR), or a Java archive (JAR) file. The archive file must end in .ear, .jar, .sar or .war for the wsadmin tool to be able to install it. The wsadmin tool uses these extensions to figure out the archive type. If the file is a WAR or JAR file, it will be automatically wrapped as an EAR file.

If you are installing an application that has the AdminApp useMetaDataFromBinary option specified, then you can only install this application on a WebSphere Application Server V6.x deployment target. This also applies to editing the application, using the AdminApp edit command, after you install it. If you use the V5.x wsadmin tool to install or edit an application on a WebSphere Application Server V6.x cell, only the steps available for the V5.x wsadmin tool will be shown.

Perform the following steps to install an application into the run time:

Procedure

  1. Determine which options to use to install your application in your configuration.
    For example, if your configuration consists of a node, a cell, and a server, you can specify that information when you enter the install command. Review the list of valid options for the install and installinteractive commands in the Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands topic to locate the correct syntax for the -node, -cell, and -server options. For this configuration, the Jacl command is:
    $AdminApp install "location_of_ear.ear" {-node nodeName -cell cellName -server serverName}
    The Jython command is:
    AdminApp.install('location_of_ear.ear', '[-node nodeName -cell cellName -server serverName]')

    You can also obtain a list of supported options for an Enterprise Archive (EAR) file using the options command, for example:

    Using Jacl:
    $AdminApp options
    Using Jython:
    print AdminApp.options()
  2. Choose to use the install or installInteractive command to install the application.

    You can install the application in batch mode, using the install command, or you can install the application in interactive mode using the installinteractive command. Interactive mode prompts you through a series of tasks to provide information. Both the install command and the installinteractive command support the set of options you chose to use for your installation in the previous step.

  3. Install the application. For this example, only the server option is used with the install command, where the value of the server option is serv2. Customize your install or installInteractive command with on the options you chose based on your configuration.
    • Using the install command to install the application in batch mode:
      • For a single server installation only, the following example uses the EAR file and the command option information to install the application:
        • Using Jacl:

          [AIX HP-UX Linux Solaris Windows]
          $AdminApp install "c:/MyStuff/application1.ear" {-server serv2}
          [z/OS]
          $AdminApp install "MyStuff/application1.ear" {-server serv2}
          [iSeries]
          $AdminApp install "/home/myProfile/MyStuff/application1.ear" {-server serv2}
        • Using Jython list:

          [AIX HP-UX Linux Solaris Windows]
          AdminApp.install('c:/MyStuff/application1.ear', ['-server', 'serv2'])
          [z/OS]
          AdminApp.install('MyStuff/application1.ear', ['-server', 'serv2'])
          [iSeries]
          AdminApp.install('/home/myProfile/MyStuff/application1.ear', ['-server', 'serv2'])
        • Using Jython string:

          [AIX HP-UX Linux Solaris Windows]
          AdminApp.install('c:/MyStuff/application1.ear', '[-server serv2]')
          [z/OS]
          AdminApp.install('MyStuff/application1.ear', '[-server serv2]')
          [iSeries]
          AdminApp.install('home/myProfile/MyStuff/application1.ear', '[-server serv2]')
        where:
        $ is a Jacl operator for substituting a variable name with its value
        AdminApp is an object supporting application object management
        install is an AdminApp command
        MyStuff/application1.ear is the name of the application to install
        server is an installation option
        serv2 is the value of the server option
      • For a network deployment installation only, the following command uses the EAR file and the command option information to install the application on a cluster:
        • Using Jacl:

          [AIX HP-UX Linux Solaris Windows]
          $AdminApp install "c:/MyStuff/application1.ear" {-cluster cluster1}
          [z/OS]
          $AdminApp install "MyStuff/application1.ear" {-cluster cluster1}
          [iSeries]
          $AdminApp install "/home/myProfile/MyStuff/application1.ear" {-cluster cluster1}
        • Using Jython list:

          [AIX HP-UX Linux Solaris Windows]
          AdminApp.install('c:/MyStuff/application1.ear', ['-cluster', 'cluster1'])
          [z/OS]
          AdminApp.install('MyStuff/application1.ear', ['-cluster', 'cluster1'])
          [iSeries]
          AdminApp.install('/home/myProfile/MyStuff/application1.ear', ['-cluster', 'cluster1'])
        • Using Jython string:

          [AIX HP-UX Linux Solaris Windows]
          AdminApp.install('c:/MyStuff/application1.ear', '[-cluster cluster1]')
          [z/OS]
          AdminApp.install('MyStuff/application1.ear', '[-cluster cluster1]')
          [iSeries]
          AdminApp.install('/home/myProfile/MyStuff/application1.ear', '[-cluster cluster1]')
        where:
        $ is a Jacl operator for substituting a variable name with its value
        AdminApp is an object allowing application objects to be managed
        install is an AdminApp command
        MyStuff/application1.ear is the name of the application to install
        cluster is an installation option
        cluster1 the value of the cluster option which will be cluster name
    • Use the installInteractive command to install the application using interactive mode. The following command changes the application information by prompting you through a series of installation tasks:
      • Using Jacl:

        [AIX HP-UX Linux Solaris Windows]
        $AdminApp installInteractive "c:/MyStuff/application1.ear"
        [z/OS]
        $AdminApp installInteractive "MyStuff/application1.ear"
        [iSeries]
        $AdminApp installInteractive "/home/myProfile/MyStuff/application1.ear"
      • Using Jython:

        [AIX HP-UX Linux Solaris Windows]
        AdminApp.installInteractive('c:/MyStuff/application1.ear')
        [z/OS]
        AdminApp.installInteractive('MyStuff/application1.ear')
        [iSeries]
        AdminApp.installInteractive('/home/myProfile/MyStuff/application1.ear')
      where:
      $ is a Jacl operator for substituting a variable name with its value
      AdminApp is an object allowing application objects to be managed
      installInteractive is an AdminApp command
      MyStuff/application1.ear is the name of the application to install
  4. Save the configuration changes.
    Using Jacl:
    $AdminConfig save
    Using Jython:
    AdminConfig.save()
  5. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.

What to do next

The steps in this task return a success message if the system successfully installs the application. When installing large applications, the command might return a success message before the system extracts each binary file. You cannot start the application until the system extracts all binary files. If you installed a large application, use the isAppReady and getDeployStatus commands for the AdminApp object to verify that the system extracted the binary files before starting the application.

The isAppReady command returns a value of true if the system is ready to start the application, or a value of false if the system is not ready to start the application, as the following examples display:

Using Jython:
print AdminApp.isAppReady('application1')
Using Jacl:
$AdminApp isAppReady application1

If the system is not ready to start the application, the system might be expanding application binaries. Use the getDeployStatus command to display additional information about the binary file expansion status, as the following examples display:

Using Jython:
print AdminApp.getDeployStatus('application1')
Using Jacl:
$AdminApp getDeployStatus application1



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 4:28:44 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-mp&topic=txml_callappinstall
File name: txml_callappinstall.html