N1 Grid Service Provisioning System User's Guide and Release Notes for the WebSphere Plug-In 1.0

Using the Command-Line Interface to Work with WebSphere 5.1

Using the N1 Grid Service Provisioning System Command-Line Interface

By default, the provisioning system's command-line interface is located in the following directory: /opt/SUNWn1sps/N1_Grid_Service_Provisioning_system_5.0/cli/bin/cr_cli

WebSphere 5.1 plug-in objects are located in the /com/sun/was/5.1 folder.

You can interact with plug-in components and plans much like any other custom component or plan. However, if you want to make changes to the components or plans, you must save the component or plan to a new folder and make your changes there. For more information about using the provisioning system's command-line interface, see Chapter 1, Using the Command-Line Interface, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual

Using the WebSphere 5.1 wsadmin Script

You can run the WebSphere 5.1scripting program, wsadmin, through the N1 Grid Service Provisioning System. For more information about how to use the scripting program, see IBM's WebSphere 5.1 documentation.

ProcedureHow to Run the wsadmin Script

Steps
  1. In the Common Tasks section in the browser interface, click WebSphere 5.1.

  2. Click the Command Line Interface: Run Command link.

    The plan's Details page displays.

  3. Click Run.

  4. Select the target host.

    You can target the virtual host of the standalone application server or deployment manager.

  5. Type the arguments for the wsadmin script in the Plan Variables field.

  6. Click Run Plan (Includes Preflight).


Example 4–1 Creating a Cluster Using the wsadmin Script

This example illustrates input for the wsadmin script.

If you wanted to create a cluster using the command line, you could type the following string in the Enter the Arguments to wsadmin Script field.


-c 'set cell [$AdminConfig getid /Cell:cellname/]' 
-c '$AdminConfig create ServerCluster $cell {{name clustername}}' 
-c '$AdminConfig save' 

In this example, cellname is the name of the existing cell and clustername is the cluster that you plan to create.