Sun Cluster Data Service for Sun Java System Message Queue Guide for Solaris OS

Registering and Configuring the Sun Cluster HA for Sun Java System Message Queue

This procedure describes how to use the scrgadm command to register and configure the Sun Cluster HA for Sun Java System Message Queue.


Note –

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


To perform this procedure, you need the following information about your configuration.

Setting Sun Cluster HA for Sun Java System Message Queue Extension Properties

The section that follows contains instructions for registering and configuring Sun Cluster HA for Sun Java System Message Queue resources. For information about the extension properties, see Appendix A, Sun Cluster HA for Sun Java System Message Queue Extension Properties. The Tunable entry indicates when you can update a property.

See Appendix A, Standard Properties, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on all of the Sun Cluster properties.

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 the Sun Cluster HA for Sun Java System Message Queue as a Failover Data Service

Perform the following steps to complete your configuration.

Steps
  1. Become superuser on a cluster member.

  2. Add the resource group for the Sun Java System Message Queue if you have not performed the steps in Configuring and Activating Network Resources.


    # scrgadm -a -g resource group [-h nodelist]
  3. Add the logical hostname resource to the resource group if you have not performed the steps in Configuring and Activating Network Resources.


    # scrgadm -a -L -g  resource group -l logical hostname
    
  4. Register the resource type for the data service.


    # scrgadm -a -t SUNW.s1mq
    
    -a

    Adds the data service resource type

    -t SUNW.s1mq

    Specifies the predefined resource type name

  5. If the Smooth_Shutdown extension property is set to TRUE, create a file named scs1mqconfig in the $IMQ_VARHOME/instances/broker/ directory. Add the following line to the file you created:


    Password password
    

    See Appendix A, Sun Cluster HA for Sun Java System Message Queue Extension Properties for a description of the Smooth_Shutdown extension property.

  6. Add the Sun Java System Message Queue resource instance to the failover resource group.


    [If Smooth_Shutdown will be set to FALSE (the default):]
    # scrgadm -a -j resource -g resource-group -t SUNW.s1mq \
    -x Confdir_list=$IMQ_VARHOME/instances/broker \
    -x Broker_Name=broker \
    -y Network_Resources_Used=logical hostname \
    -y Port_list=port/tcp[,port/tcp]
    

    [If Smooth_Shutdown is set to TRUE:]
    # scrgadm -a -j resource -g resource-group -t SUNW.s1mq \ 
     -x Confdir_list=$IMQ_VARHOME/instances/broker \
    -x Broker_Name=broker \
    -x Broker_User=user \
    -y Network_resources_used=logical hostname \
    -y Port_list=port/tcp[,port/tcp] \ 
    -x Smooth_Shutdown=TRUE
    

    The resource group that contains the application resources is the same resource group that you created for your network resources in How to Configure and Activate Network Resources.

    -j resource

    Specifies the Sun Java System Message Queue application resource name.

    -t SUNW.s1mq

    Specifies the type of resource to add.

    -x Confdir_list=$IMQ_VARHOME/instances/broker

    Specifies a path for your Sun Java System Message Queue configuration directory. The Confdir_list extension property is required. The Confdir_list property must have exactly one entry.

    -x Broker_Name=broker

    Specifies the name of the broker to monitor.

    -x Broker_User=user

    Specifies the user name of the managed broker.

    -y Network_resources_used=network-resource

    Specifies a comma-separated list of network resources (logical hostnames) in resource-group, which the Sun Java System Message Queue application resource must use.

    -y Port_list=port-number/protocol

    Specifies a port number and the protocol to be used, for example, 80/tcp. The Port_list property must have one or two entries.

    -x Smooth_Shutdown=TRUE

    Used to shutdown the broker. Use of the impcmd command exposes the broker password in the imqcmd command string.

  7. Bring the resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and its monitor.

    -g resource-group

    Specifies the name of the application resource group that is being enabled.

  8. Verify that the resource group and application-server resource is online.


    # scstat -g
    # ps -ef
    

Example 1 Registering and Configuring the Sun Cluster HA for Sun Java System Message Queue

This example shows how to register the Sun Cluster HA for Sun Java System Message Queue.


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),
SUNW.s1mq (Sun Java System Message Queue application resource) 
 
(Create a failover resource group.)
# scrgadm -a -g resource-group-1 -h phys-schost-1,phys-schost-2
 
(Add a logical hostname resource to the resource group.)
# scrgadm -a -L -g resource-group-1 -l schost-1
 
(Register the SUNW.s1mq resource type.)
# scrgadm -a -t SUNW.s1mq
 
(Create a Sun Java System Message Queue resource and add it to the 
resource group.)
# scrgadm -a -j s1mq-rs -g s1mq-rg \
-t SUNW.s1mq \
-x Confdir_list=$IMQ_VARHOME/instances/hamq1 \
-x Broker_Name=hamq1 \
-y Network_resources_used=schost-1 \
-y Port_list=7676/tcp

 (Enable the application resource group.)
# scswitch -Z -g s1mq-rg


Example 2 Registering and Configuring Sun Cluster HA for Sun Java System Message Queue With Smooth_Shutdown Enabled

This example shows how to register Sun Cluster HA for Sun Java System Message Queue with Smooth_Shutdown enabled.


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),
	s1mq-1 (Sun Java System Message Queue application resource) 
 
(Create a failover resource group.)
# scrgadm -a -g resource-group-1 -h phys-schost-1,phys-schost-2
 
(Add a logical hostname resource to the resource group.)
# scrgadm -a -L -g resource-group-1 -l schost-1
 
(Register the SUNW.s1mq resource type.)
# scrgadm -a -t SUNW.s1mq
 
(Create a Sun Java System Message Queue resource and add it to the 
resource group.)
# scrgadm -a -j s1mq-rs -g s1mq-rg \
-t SUNW.s1mq \
-x Confdir_list=$IMQ_VARHOME/instances/hamq1 \
-x Broker_Name=hamq1 \
-x Broker_User=admin \
-y Network_resources_used=schost-1 \
-y Port_list=7676/tcp \
-x Smooth_Shutdown=TRUE
 
(Enable the application resource group.)
# scswitch -Z -g s1mq-rg