N1 Grid Service Provisioning System 5.0 User's Guide for the BEA WebLogic Plug-In

Chapter 3 Using the BEA WebLogic Plug-In

The BEA WebLogic Plug-In provides a number of specific component types and provides easy access to functions for working with WebLogic applications. This chapter describes the following information:

Creating and Managing WebLogic Servers and Clusters

Use the WebLogic common tasks page to create and manage WebLogic server and clusters in the provisioning software. You can perform several specific tasks:

ProcedureTo Create a WebLogic Admin Server for 7.0

Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. On the WebLogic Common Tasks page, click Manage 7.0 Admin Servers.

  3. On the Components Details page for the 7.0 Admin Server component, click the Run action next to default:install.

  4. To set variables for this Admin Server, click Select from List in the Plan Parameters section of the window.

    • To create a new set of variables that have different values from the default values, click Create Set.

      The Select Variable Setting From List window appears.

      1. In the text field at the top of the table, enter the name of the new variable settings set.

      2. To specify the name of the WebLogic Admin Server, click the box next to adminHost and type the name into the field.

      3. To change the port number for the WebLogic Admin Server from the default value of 7001, click the box next to adminPort and type the new number into the field.

      4. To specify that secure HTTP be used to connect to the WebLogic Admin Server, click the box next to secureConnect and type True into the field.

      5. To change the path to where WebLogic is installed, click the box next to wlHomeDir and type the path into the field.

      6. To change the WebLogic domain name, click the box next to domainName and type the domain name into the field.

        The remaining variables are pre-defined for you, although you can modify them if necessary.

        • The targetRefName is created based on the values for the host name and for the domain name. This variable follows the format :[target:sys.hostName]_admin_:[domainName]

        • The installPath is created based on the value for the domain name. This variable follows the format admin_:[domainName]

        • The webLogicJARPath is created based on the value for the WebLogic home directory. This variable follows the format :[wlHomeDir]:[/]weblogic700:[/]server:[/]lib:[/]weblogic.jar

        • The domainRoot is user_projects

      7. After updating the component variable values, click Save.

        The new variable settings display in the table.

      8. Click Select.

    • To use variable settings for another component, click Import Set.

      The Import Variable Settings window displays.

      1. If necessary, navigate to the Folder that contains the component with the variable settings to import.

      2. Select the component version.


        Note –

        Variable settings can vary between component versions.


      3. Click Import Variable Settings.

        The imported variable settings display in the table.

      4. Click Select.

  5. Select the target host.

  6. Click Run Plan (includes preflight).

ProcedureTo Create a WebLogic Admin Server for 6.1

Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. On the WebLogic Common Tasks page, click Manage 6.1 Admin Servers.

  3. On the Components Details page for the 6.1 Admin Server component, click the Run action next to default:install.

  4. To set variables for this Admin Server, click Select from List in the Plan Parameters section of the window.

    • To create a new set of variables that have different values from the default values, click Create Set.

      The Select Variable Setting From List window appears.

      1. In the text field at the top of the table, enter the name of the new variable settings set.

      2. To specify the name of the WebLogic Admin Server, click the box next to adminHost and type the name into the field.

      3. To change the port number for the WebLogic Admin Server from the default value of 7001, click the box next to adminPort and type the new number into the field.

      4. To specify that secure HTTP be used to connect to the WebLogic Admin Server, click the box next to secureConnect and type True into the field.

      5. To change the path to where WebLogic is installed, click the box next to wlHomeDir and type the path into the field.

      6. To change the WebLogic domain name, click the box next to domainName and type the domain name into the field.

        The remaining variables are pre-defined for you, although you can modify them if necessary.

        • The targetRefName is created based on the values for the host name and for the domain name. This variable follows the format :[target:sys.hostName]_admin_:[domainName]

        • The installPath is created based on the value for the domain name. This variable follows the format admin_:[domainName]

        • The webLogicJARPath is created based on the value for the WebLogic home directory. This variable follows the format :[wlHomeDir]:[/]lib:[/]weblogic.jar

      7. After updating the component variable values, click Save.

        The new variable settings display in the table.

      8. Click Select.

    • To use variable settings for another component, click Import Set.

      The Import Variable Settings window displays.

      1. If necessary, navigate to the Folder that contains the component with the variable settings to import.

      2. Select the component version.


        Note –

        Variable settings can vary between component versions.


      3. Click Import Variable Settings.

        The imported variable settings display in the table.

      4. Click Select.

  5. Select the target host.

  6. Click Run Plan (includes preflight).

ProcedureTo Create a WebLogic Cluster

A WebLogic server cluster consists of multiple WebLogic server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic server instance. The server instances that constitute a cluster can run on the same machine, or can be located on different machines. Each server instance in a cluster must run the same version of WebLogic server.


Note –

In the N1 Grid Service Provisioning System environment, you must create a cluster, then create the managed servers that are in that cluster. While creating the managed server, one of the optional arguments in the variable list is the cluster host name. When installing a managed server, this cluster host name is used to create a dependency on it. If you create the managed servers before the cluster, there will be no cluster host and therefore the dependency creation will fail.


Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. On the WebLogic Common Tasks page, click Manage Clusters.

  3. On the Components Details page for the WebLogic cluster component, click the Run action next to default:install.

  4. To set variables for this cluster, click Select from List in the Plan Parameters section of the window.

    • To create a new set of variables that have different values from the default values, click Create Set.

      The Select Variable Setting From List window appears.

      1. In the text field at the top of the table, enter the name of the new variable settings set.

      2. To specify the name of the cluster, click the box next to targetName and type the cluster name into the field.

      3. After updating the component variable values, click Save.

        The new variable settings display in the table.

      4. Click Select.

    • To use variable settings for another component, click Import Set.

      The Import Variable Settings window displays.

      1. If necessary, navigate to the Folder that contains the component with the variable settings to import.

      2. Select the component version.


        Note –

        Variable settings can vary between component versions.


      3. Click Import Variable Settings.

        The imported variable settings display in the table.

      4. Click Select.

  5. Select the target WebLogic Admin server on which to define the cluster.

  6. Click Run Plan (includes preflight).

  7. Create server instances to be part of the cluster, as described in

ProcedureTo Manage WebLogic Server Instances

For each actual WebLogic admin server, you can run multiple server instances. This task explains how to create, start, and stop WebLogic server instances.


Note –

Do not manage your WebLogic applications outside of the N1 Grid Service Provisioning System. If you use the provisioning software, you must manage your WebLogic applications exclusively with the provisioning software.


Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. On the WebLogic Common Tasks page, click Manage Server Instances.

  3. To create a managed server instance, click the Run action next to Default: Install in the Components Procedures list.

    1. To choose a set of variables that apply to this managed server, click Select from List in the Plan Parameters section of the window.

      • To create a new set of variables that have different values from the default values, click Create Set.

        The Select Variable Setting From List window appears.

        1. In the text field at the top of the table, enter the name of the new variable settings set.

        2. To specify the name of the WebLogic Admin Server on which this managed service instance will run, click the box next to adminServerHostName and type the name into the field. This must be an existing WebLogic Admin Server name.

        3. To provide a name for the managed server instance, click the box next to targetName and type the name into the field.

          This name will be used in the targetRefName to create the actual name for the managed server instance.

        4. To provide a full name for the managed server instance, click the box next to targetRefName and type the name into the field.

          By default, the targetRefName is created based on the host name, followed by the type of the host (such as “server”), followed by the targetName you provided in the previous step.

        5. To provide a path to where to install the managed server instance, click the box next to installPath and provide a complete path name.

          By default, the installPath is generated based on the type of the host, followed by the domain name of either the adminServerHostName or some other targetable component, followed by the targetName.

        6. If this managed server is part of a cluster, provide the clusterHostName.


          Note –

          The managed server depends on the existence of this cluster. If the cluster does not yet exist, you must create it and then return to create the managed server instance.


        7. Provide a complete path to the WebLogic startup script.

          If an appropriate script does not exist, you cannot start the WebLogic server instance. You might need to modify the default WebLogic startup script. Specifically, make sure that you provide values for the following variables:

          • SERVER_NAME=server_name — The name of the WebLogic admin server; for example, managed2

          • ADMIN_URL=URL_for_server — The URL to the WebLogic server; for example, http://myplace.domain.me.com:7001/

          • WLS_USER=${1} — The username to be used for the WebLogic server. The ${1} nomenclature sets the WebLogic username to the first argument that you provide when you call the script. This usage bypasses the username prompt during server startup.

          • WLS_PW=${2} — The password for the WebLogic username. The ${2} nomenclature sets the WebLogic password to the password that you provide as the second argument when you call the script. This usage bypasses the password prompt during server startup.


          Note –

          When you make these changes to the startup script, make sure that you delete any old information in the script that would override the values that you defined. Also, be sure to set the script to run in the background, and to redirect the input and output streams for the script.


        8. After updating the component variable values, click Save.

          The new variable settings display in the table.

        9. Click Select.

          You are returned to the Components Details page for the managed server instance.

      • To use variable settings for another component, click Import Set.

        The Import Variable Settings window displays.

        1. If necessary, navigate to the Folder that contains the component with the variable settings to import.

        2. Select the component version.


          Note –

          Variable settings can vary between component versions.


        3. Click Import Variable Settings.

          The imported variable settings display in the table.

        4. Click Select.

          You are returned to the Components Details page for the managed server instance.

    2. On the Components Details page for the managed server instance, select the target host on which to run this managed server instance.

    3. Click Run Plan (includes preflight).

  4. To start a WebLogic managed server instance, click the Run action next to Start in the Component Procedures list on the Components Details page for the managed server instance.

    1. Choose a managed server.

    2. Click Run Selected Installations.

    3. Click Run Plan (includes preflight).

  5. To stop a WebLogic managed server instance, click the Run action next to Stop in the Component Procedures list on the Components Details page for the managed server instance.

    1. Choose a managed server.

    2. Click Run Selected Installations.

    3. Click Run Plan (includes preflight).

Capturing and Editing WebLogic Applications

The WebLogic Common Tasks page enables you to capture, configure, and deploy WebLogic Enterprise, EJBTM, and Web Applications.

You can perform several specific tasks:


Note –

Do not deploy or manage your WebLogic applications outside of the N1 Grid Service Provisioning System. If you use the provisioning software, you must manage your WebLogic applications exclusively with the provisioning software.


ProcedureTo Capture a WebLogic Enterprise Application or EAR File

Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. Click Create New in the Enterprise Applications (EARs) section of the WebLogic Common Tasks page.

  3. Type a label for this component.

  4. Type a description for this component.

  5. Select the WebLogic Admin Server on which this enterprise application resides.

  6. Navigate through the hierarchy to find the enterprise application to capture.

  7. Click Check-in Selected Item.

  8. Confirm the information on the check-in page, then click Continue to Check-in.

ProcedureTo Capture a WebLogic Web Application or WAR File

Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. Click Create New in the Web Applications (WARs) section of the WebLogic Common Tasks page.

  3. Type a label for this component.

  4. Type a description for this component.

  5. Select the WebLogic Admin Server on which this web application resides.

  6. Navigate through the hierarchy to find the web application to capture.

  7. Click Check-in Selected Item.

  8. Confirm the information on the check-in page, then click Continue to Check-in.

ProcedureTo Capture a WebLogic JAR File

Steps
  1. From the Common Tasks section in the browser interface, click WebLogic.

  2. Click Create New in the Java Archives Containing EJBs (JARs) section of the WebLogic Common Tasks page.

  3. Type a label for this component.

  4. Type a description for this component.

  5. Select the WebLogic Admin Server on which this JAR file resides.

  6. Navigate through the hierarchy to find the JAR file to capture.

  7. Click Check-in Selected Item.

  8. Confirm the information on the check-in page, then click Continue to Check-in.

Component Types

The BEA WebLogic Plug-In includes several WebLogic-specific component types. These component types enable you to quickly model many of the most common WebLogic application components and to automatically associate install, uninstall, export, and snapshot behavior with a particular resource. Many of the component types are used by the software when you create and manage servers and clusters. As a result, there are only a few component types that you will work with directly:

Enterprise Application (EAR) Component Type

A component of this type models an enterprise application. The component can contain either an enterprise application archive (EAR) or the expanded version of an EAR as a package.

Browsing for an Enterprise Application

You can use one of the following browsers to select your enterprise application for this component type:

Installing an Enterprise Application

To install an enterprise application component, you must use a WebLogic server or cluster as the target host. The installation process performs three main tasks:

  1. Install the EAR file on that target.

  2. Register the EAR with the WebLogic admin server.

  3. Apply any properties previously captured during domain browse.

Uninstalling an Enterprise Application

When you uninstall an enterprise application component, the enterprise application is untargeted from the target. If the enterprise application is not targeted elsewhere, the registration component is removed from the admin sever.

Error Conditions

Table 3–1 WebLogic Enterprise Application Error Conditions

Action 

Condition 

Result 

Install 

The topology is incorrectly configured (target host does not point at correct domain host) 

Targeting fails 

Install 

The target host is not a valid WebLogic target. 

Installation prohibited 

Browsing/Install/Uninstall 

Credentials are not properly configured. 

Operation fails 

Browsing 

Path not correctly configured in domain host. 

Browsing fails 

Web Application (WAR) Component Type

A component of this type includes a web application. The component can contain either a web application and its elevant settings or the web application without its settings.

Browsing for a Web Application

You can use one of the following browsers to select your web application for this component type:

Installing a Web Application

To install a web application component, you must use a WebLogic server or cluster as the target host. The installation process will install the component on that target, and install the contained registration component on the admin server of the target.

Uninstalling a Web Application

When you uninstall a web application component, the web application is untargeted from the target. If the web application is not targeted elsewhere, the registration component is removed from the admin sever.

Error Conditions

Table 3–2 WebLogic Web Application Error Conditions

Action 

Condition 

Result 

Install 

The topology is incorrectly configured (target host doesn't point at correct domain host) 

Targeting fails. 

Install 

The target host is not a valid WL target. 

Installation prohibited. 

Browsing/Install/Uninstall 

Credentials aren't properly configured. 

Operation fails. 

Browsing 

Path not correctly configured in domain host. 

Browsing fails. 

Java Archive Files Containing EJBs Component Type

Browsing

You can use one of the following browsers to select your EJB or JAR files for this component type:

Installation

When you install a component of this type, the file or directory is copied to the filesystem based on the install path. Once that copy finishes, the file or directory is registered with the WebLogic admin server.

Uninstall

When you uninstall a component of this type, the file or directory is removed from the master server.

Error Conditions

Table 3–3 WebLogic EJB container Error Conditions

Action 

Condition 

Result 

Uninstall 

A dependant WebLogic EJB is still installed. 

Uninstall fails indicating the dependency. 

Plans

There are no pre-defined plans included with the BEA WebLogic Plug-In.

Resources

There are no additional resources included with the BEA WebLogic Plug-In.