Install applications with the wsadmin tool

 

+

Search Tips   |   Advanced Search

 

 

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

Before starting this task, the wsadmin tool must be running.

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.

 

Overview

The application that you install must be...

The archive file must end in...

...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 option...

useMetaDataFromBinary

...specified, then you can only install this application on a WAS 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 WAS 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 the configuration.

    For example, if the 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 to locate the correct syntax for the -node, -cell, and -server options.

    For this configuration, the Jacl command is:

    $AdminApp install "/Location/Of/EarFile.ear" {-node nodeName -cell cellName -server serverName}

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

    Use Jacl:

    $AdminApp options

    Use Jython:

    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 server. Customize your install or installInteractive command with on the options you chose based on the configuration.

    • Use 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:

          Use Jacl:

          $AdminApp install "c:/MyStuff/application1.ear" {-server server}

          Use Jython list:

          AdminApp.install('c:/MyStuff/application1.ear', ['-server', 'server'])

          Use Jython string:

          AdminApp.install('c:/MyStuff/application1.ear', '[-server server]')

        where:

        $ Jacl operator for substituting a variable name with its value
        AdminApp Object supporting application object management
        install AdminApp command
        MyStuff/application1.ear Name of the application to install
        server Installation option
        server 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:

          Use Jacl:

          $AdminApp install "c:/MyStuff/application1.ear" {-cluster cluster1}

          Use Jython list:

          AdminApp.install('c:/MyStuff/application1.ear', ['-cluster', 'cluster1'])

          Use Jython string:

          AdminApp.install('c:/MyStuff/application1.ear', '[-cluster cluster1]')

        where:

        $ Jacl operator for substituting a variable name with its value
        AdminApp Object allowing application objects to be managed
        install AdminApp command
        MyStuff/application1.ear Name of the application to install
        cluster 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:

        Use Jacl:

        $AdminApp installInteractive "c:/MyStuff/application1.ear"

        Use Jython:

        AdminApp.installInteractive('c:/MyStuff/application1.ear')

      where:

      $ Jacl operator for substituting a variable name with its value
      AdminApp kbject allowing application objects to be managed
      installInteractive AdminApp command
      MyStuff/application1.ear 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.



Use the AdminApp object for scripted administration

 

Related Reference

Commands for the AdminApp object
Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands
Example: Obtaining option information for AdminApp object commands