Sun Cluster Data Service for Sun Java System Application Server Guide for Solaris OS

Registering and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1

The following procedures describe how to use the scrgadm command to register and configure the Sun Cluster HA for Sun Java System Application Server. These instructions explain how to set the extension properties described in Appendix A, Extension Properties for Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1.

Both the Domain Administration Server (DAS) component and the Node Agent (NA) component are configured as failover services.


Note –

See Tools for Data Service Resource Administration in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for general information about registering and configuring data services.


Setting Sun Cluster HA for Sun Java System Application Server Extension Properties

The sections that follow contain instructions for registering and configuring resources. These instructions explain how to set only extension properties that Sun Cluster HA for Sun Java System Application Server requires you to set. For information about all Sun Cluster HA for Sun Java System Application Server extension properties, see Appendix A, Extension Properties for Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1. You can update some extension properties dynamically. You can update other properties, however, only when you create or disable a resource. The Tunable entry indicates when you can update a property.

To set an extension property of a resource, include the following option in the scrgadm(1M) command that creates or modifies the resource:


-x property=value
-x property

Identifies the extension property that you are setting

value

Specifies the value to which you are setting the extension property

You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.

ProcedureHow to Register and Configure Sun Cluster HA for Sun Java System Application Server as a Failover DAS Component and a Failover NA Component

Note that in How to Configure and Activate Network Resources you previously created the failover resource groups for the DAS component and for the NA component, added failover IP addresses and logical hosts to the resource groups, and brought the resource groups online.

Steps
  1. Become superuser on a cluster member.

  2. Register the resource type for the DAS component.


    # scrgadm -a -t SUNW.jsas
    
    -a

    Adds the resource type for the DAS component

    -t SUNW.jsas

    Specifies the predefined resource type name

  3. Add the DAS resource instance to the failover resource group that you created for your network resources.

    See SUNW.jsas Extension Properties for a detailed description of the extension properties for this resource type.


    # scrgadm -a -j DAS-resource -g DAS-resource-group \ 
    -t SUNW.jsas \
    -y Network_resources_used=logical-hostname \ 
    -x Adminuser=DAS-admin-username \ 
    -x Domain_name=domain-name \ 
    -x Passwordfile=password-file \ 
    -x Confdir_list=install-directory \ 
    -x Domaindir=domain-directory \ 
    -x Monitor_Uri_List=http://logical-hostname[:port][/path]
    
    -a

    Adds a resource.

    -j DAS-resource

    Specifies the DAS resource name.

    -g DAS-resource-group

    Specifies the resource group for the DAS component.

    -t SUNW.jsas

    Specifies the resource type for the DAS component.

    -y Network_resources_used=logical-hostname

    Specifies the failover IP address that is used by DAS.

    -x Adminuser=DAS-admin-username

    Specifies DAS administrative user name.

    -x Domain_name=domain-name

    Specifies the domain name.

    -x Passwordfile=password-file

    Specifies the full path to the file containing the DAS administrative password and master password.

    -x Confdir_list=install-directory

    Specifies the complete path to the Sun Java System Application Server installation directory. The default value for this extension property is /opt/SUNWappserver, which is the standard installation directory.

    -x Domaindir=domain-directory

    Specifies the full path to the domain directory. This extension property is optional if the domain directory is the default directory that was specified at the installation of the Sun Java System Application Server.

    -x Monitor_Uri_List=logical-hostname[:port][/path]

    (Optional) Specifies a comma-separated list of URIs from which Sun Cluster HA for Sun Java System Application Server makes requests. The Monitor_Uri_List extension property is required if the Port_list property is not set. The Port_list property is one of the standard properties for a resource, which specifies a list of port numbers on which a server is listening. See Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for a full description of the Port_list property.

  4. Register the resource type for the Node Agent component.


    # scrgadm -a -t SUNW.jsas-na
    
    -a

    Adds the resource type for the NA component

    -t SUNW.jsas-na

    Specifies the predefined resource type name

  5. Add the Node Agent resource instance to the failover resource group that you created for your network resources.

    SeeSUNW.jsas-na Extension Properties for a detailed description of the extension properties for this resource type.


    # scrgadm -a -j NA-resource -g NA-resource-group \
    -t SUNW.jsas-na \
    -y Resource_Dependencies=DAS-resource \
    -x Adminuser=DAS-admin-username \
    -x Confdir_list=install-directory \
    -x Adminhost=DAS-hostname \
    -x Adminport=DAS-port \
    -x Agentdir=NA-directory \
    -x Passwordfile=password-file
    
    -a

    Adds a resource.

    -j NA-resource

    Specifies the Node Agent resource name.

    -g NA-resource-group

    Specifies the resource group for the Node Agent component.

    -t SUNW.jsas-na

    Specifies the resource type for the Node Agent component.

    -y Resource_Dependencies=DAS-resource

    Specifies that the DAS resource must be online before the Node Agent resource can start.

    -x Adminuser=DAS-admin-username

    Specifies DAS administrative user name.

    -x Confdir_list=install-directory

    Specifies the complete path to the Sun Java System Application Server installation directory. The default value for this extension property is /opt/SUNWappserver, which is the standard installation directory.

    -x Adminhost=DAS-hostname

    Specifies the host name of the Domain Administration Server.

    -x Adminport=DAS-port

    Specifies the port where DAS listens.

    -x Agentdir=NA-directory

    Specifies the full path to the Node Agents directory.

    -x Passwordfile=password-file

    Specifies the full path to the file containing the DAS administrative password and master password.

Examples of Registering and Configuring the Failover DAS Component in the Sun Cluster HA for Sun Java System Application Server

These examples assume that the DAS resource group has already been created, the failover IP address has been added to the resource group, and the resource group has been brought online.


Example 1–1 Creating a Simple DAS Resource

In this example, the default values for the extension properties are used.


# scrgadm -a -t SUNW.jsas

# scrgadm -a -j das-rs  -g das-rg  \
-t SUNW.jsas \
-y Network_resources_used=IP1 \
-x Adminuser=admin \
-x Domain_name=new-domain \
-x Passwordfile=/global/disk1/passwordfile

In this example, the following values are set.



Example 1–2 Creating a DAS Resource by Specifying the Installation Directory and the Domain Directory

In this example, the Application Server is not installed in the default location and the domain directory is not the default.


# scrgadm -a -t SUNW.jsas

# scrgadm -a -j das-rs  -g das-rg  \
-t SUNW.jsas \
-y Network_resources_used=IP1 \
-x Adminuser=admin \
-x Domain_name=new-domain \
-x Passwordfile=/global/disk1/passwordfile \
-x Confdir_list=/global/disk1/SUNWappserver \
-x Domaindir=/global/disk1/my-domain

In this example, the following values are set.



Example 1–3 Creating a DAS Resource and Specifying a List of URIs to be Monitored

In this example, the extension property Monitor_Uri_Lis specifies the URI that is serviced by applications on the Application Server. The fault monitor probe monitors this URI to test the functionality of the Application Server.


# scrgadm -a -t SUNW.jsas

# scrgadm -a -j das-rs  -g das-rg  \
-t SUNW.jsas \
-y Network_resources_used=IP1 \
-x Adminuser=admin \
-x Domain_name=new-domain \
-x Passwordfile=/global/disk1/passwordfile \
-x Confdir_list=/global/disk1/SUNWappserver \
-x Domaindir=/global/disk1/my-domain \
-x Monitor_Uri_List=http://IP1:4848/web-service

In this example, the following values are set.


Example of Creating the Failover Node Agent Component in the Sun Cluster HA for Sun Java System Application Server

The example in this section assumes the following configuration, where failover IP addresses are represented by logical host names.


Example 1–4 Creating Failover Node Agent Resources

  1. To register the resource type for the Node Agents, the following command is run.


    # scrgadm -a -t SUNW.jsas-na
    
  2. To create the failover resource group na-rg1 to contain the failover IP address IP1 and the Node Agent resource for Node Agents NA1 and NA2, the following command is run.


    # scrgadm -a -g na-rg1
    
  3. To create the failover resource group na-rg2 to contain the failover IP address IP2 and the Node Agent resource for Node Agents NA3 and NA4, the following command is run.


    # scrgadm -a -g na-rg2
    
  4. To add the failover IP address resource IP1 to the resource group na-rg1, the following command is run.


    # scrgadm -a -L -g na-rg1 -l IP1
    
  5. To add the failover IP address resource IP2 to the resource group na-rg2, the following command is run.


    # scrgadm -a -L -g na-rg2 -l IP2
    
  6. To create the Node Agent resource na-rs1 in resource group na-rg1, the following command is run.


    Note –

    Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

    In this example, Node Agents NA1 and NA2 and all their server instances (I1, I2, I3, and I4) are configured on IP1, and therefore only one resource, na-rs1 is created for NA1 and NA2.


    • Run this command if you use the default values for the extension properties.


      # scrgadm -a -j na-rs1  -g na-rg1  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p
      
    • Run this command if the installation is not in the default location, and the administrative port is not the default value.


      # scrgadm -a -j na-rs1  -g na-rg1  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p \
      -x Confdir_list=/global/disk1/appserver-install-dir \
      -x Adminport=6162
      
  7. To create the Node Agent resource na-rs2 in resource group na-rg2, the following command is run.


    Note –

    Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

    In this example, Node Agents NA3 and NA4 and all their server instances (I5, I6, I7, and I8) are configured on IP2, and therefore only one resource, na-rs2 is created for NA3 and NA4.


    • Run this command if you use the default values for the extension properties.


      # scrgadm -a -j na-rs2  -g na-rg2  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p
      
    • Run this command if the installation is not in the default location, and the administrative port is not the default value.


      # scrgadm -a -j na-rs2  -g na-rg2  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p \
      -x Confdir_list=/global/disk1/appserver-install-dir \
      -x Adminport=6162
      
  8. To bring the Node Agent resource group na-rg1 online, the following command is run.


    # scswitch -Z -g na-rg1
    

    By bringing online the resource group na-rg1, you enable the following resources.

    • Node Agent NA1 and server instances I1 and I2, which are configured under NA1.

    • Node Agent NA2 and server instances I3 and I4, which are configured under NA2.

  9. To bring the Node Agent resource group na-rg2 online, the following command is run.


    # scswitch -Z -g na-rg2
    

    By bringing online the resource group na-rg2, you enable the following resources.

    • Node Agent NA3 and server instances I5 and I6, which are configured under NA3.

    • Node Agent NA4 and server instances I7 and I8, which are configured under NA4.