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

ProcedureHow to Register and Configure Sun Cluster HA for Sun Java System Web Server in a Failover Configuration

This procedure describes how to use the Sun Cluster maintenance commands to register and configure Sun Cluster HA for Sun Java System Web Server in a failover configuration.


Note –

Other options also enable you to register and configure the data service. See Tools for Data Service Resource Administration in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about these options.


To perform this procedure, you must have the following information.


Note –

Perform this procedure on any cluster member.


  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorization.

  2. Register the SUNW.iws resource type for Sun Cluster HA for Sun Java System Web Server.


    # clresourcetype register SUNW.iws
    
  3. Create a failover resource group.

    You can optionally select the set of nodes or zones on which the data service can run with the -n option.


    # clresourcegroup create [-n node-zone-list] resource-group
    
    resource-group

    Specifies the name of the failover resource group. This name can be your choice but must be unique for resource groups within the cluster.

    -n node-zone-list

    Specifies a comma-separated, ordered list of zones that can master this resource group. The format of each entry in the list is node. In this format, node specifies the node name and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.

  4. Verify that all of the network addresses that you use have been added to your name service database.

    You should have performed this verification during the Sun Cluster installation. See the planning chapter in the Sun Cluster Software Installation Guide for Solaris OS for details.


    Note –

    To avoid any failures because of name service lookup, ensure that all logical hostnames and shared addresses are present in the server's and client's /etc/inet/hosts file. Configure name service mapping in /etc/nsswitch.conf on the servers to first check the local files before trying to access NIS or NIS+.


  5. Add a logical hostname to the failover resource group.


    # clreslogicalhostname create -g resource-group \
    -h logical-hostname,… \
    [-p auxnodelist=node] [-N netiflist] resource
    
    -g resource-group

    Specifies the name of the failover resource group.

    -h logical-hostname,…

    Specifies a comma-separated list of logical hostnames that this resource is to make available.

    -p auxnodelist=node,…

    Specifies an optional comma-separated list of physical node IDs that identify cluster nodes that can host the shared address but never serve as a primary if failover occurs. These nodes are mutually exclusive with the nodes identified in nodelist for the resource group, if specified.

    resource-group

    Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.

    -N netiflist

    Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node or zone. The format of each entry in the list is netif@node. The replaceable items in this format are as follows:

    netif

    Specifies an IPMP group name, such as sc_ipmp0, or a public network interface card (NIC). If you specify a public NIC, Sun Cluster attempts to create the required IPMP groups.

    node

    Specifies the name or ID of a node. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, Sun Cluster attempts to create the required IPMP groups.


    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.



    Note –

    Sun Cluster does not currently support using the adapter name for netif.


    resource

    Specifies the name of the resource.

  6. Create an application resource in the failover resource group.

    You can repeat this step to add multiple application resources (such as secure and insecure versions) to the same resource group.


    # clresource create -g resource-group \
    -t resource-type \
    -p Confdir_list=config-directory \
    -p Resource_dependencies=logical-hostname-list,.. \
    -p Port_list=port-number/protocol resource
    
    -g resource-group

    Specifies the name of the failover resource group into which the resources are to be placed.

    -t resource-type

    Specifies the type of the resource to add.

    -p Confdir_list=config-directory

    Specifies the location of the Sun Java System configuration files. The Confdir_list file for failover services must have exactly one entry only. The config-directory must contain a directory called config. Sun Cluster HA for Sun Java System Web Server requires this extension property.

    -p Resource_dependencies=logical-hostname-list,…

    Specifies a comma-separated list of network resources that identify the logical hosts that the data service uses.

    -p Port_list=port-number/protocol

    Specifies the port number and protocol to use, for example, 80/tcp. Port_list for failover services must have exactly one entry only because of the one-to-one mapping rule between Port_list and Confdir_list.

    resource

    Specifies the name of the resource to add.

    The resource is created in the enabled state.


    Note –

    Optionally, you can set additional extension properties that belong to the Sun Cluster HA for Sun Java System Web Server to override the default values of the properties. See Appendix A, Sun Cluster HA for Sun Java System Web Server Extension Properties for a list of these properties.


  7. Bring the failover resource group online.


    # clresourcegroup online resource-group
    
    resource-group

    Specifies the name of the failover resource group.


Example 4 Registering a Failover Sun Cluster HA for Sun Java System Web Server on a Two-Node Cluster


Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: resource-group-1 (for all resources) 
Resources: schost-1 (logical hostname), Sun-app-insecure-1 (insecure  
application resource), Sun-app-secure-1 (secure application resource)
 
(Add the resource group to contain all resources.)
# clresourcegroup create resource-group-1
 
(Add the logical hostname resource to the resource group.)
# clreslogicalhostname create -g resource-group-1 -h schost-1 
 
(Register the resource type for the Sun Cluster HA for Sun Java System Web Server.)
# clresourcetype register SUNW.iws
 
(Add an insecure application resource instance.)
# clresource create -g resource-group-1 -t SUNW.iws \
-p Confdir_list=/opt/SUNwbsrv/conf -p Scalable=False \
-p Resource_dependencies=schost-1 -p Port_list=80/tcp Sun-app-insecure-1 \ 

(Add a secure application resource instance.)
# clresource create -g resource-group-1 -t SUNW.iws \ 
-p Confdir_List=/opt/SUNwbsrv/https-Sun-app-secure-1 -p Scalable=False \
-p Resource_dependencies=schost-1 -p Port_list=443/tcp Sun-app-secure-1 \ 

(Bring the failover resource group online.)
# clresourcegroup online resource-group-1


Example 5 Registering a Failover Sun Cluster HA for Sun Java System Web Proxy Server on a Two-Node Cluster


Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: resource-group-1 (for all resources) 
Resources: schost-1 (logical hostname), Sun-app-insecure-1 (insecure  
application resource), Sun-app-secure-1 (secure application resource)
 
(Add the resource group to contain all resources.)
# clresourcegroup create resource-group-1
 
(Add the logical hostname resource to the resource group.)
# clreslogicalhostname create -g resource-group-1 -h schost-1 
 
(Register the resource type for the 
Sun Cluster HA for Sun Java System Web Proxy Server.)
# clresourcetype register SUNW.iws
 
(Add an insecure application resource instance.)
# clresource create -g resource-group-1 -t SUNW.iws \
-p Confdir_list=/opt/SUNwbproxy/proxy-insecure-1 -p Scalable=False \
-p Resource_dependencies=schost-1 -p Port_list=80/tcp Sun-app-insecure-1 \ 

(Add a secure application resource instance.)
# clresource create -g resource-group-1 -t SUNW.iws \ 
-p Confdir_List=/opt/SUNwbproxy/proxy-secure-1 -p Scalable=False \
-p Resource_dependencies=schost-1 -p Port_list=443/tcp Sun-app-secure-1 \ 

(Bring the failover resource group online.)
# clresourcegroup online resource-group-1

In this example, it is assumed that the global file system is being used. If a failover file system is used, you must set the dependency on the HAStoragePlus resource using the Resource_dependencies extension property during resource creation.