Sun Cluster 3.0 Data Services Installation and Configuration Guide

Example-Registering Scalable Sun Cluster HA for Apache

For scalable services, you create two resource groups: a failover resource group that contains the network resources and a scalable resource group that contains the application resources. The following example shows how to register a scalable Apache service on a two-node cluster.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Shared address: schost-1
Resource groups: sa-schost-1 (for shared addresses), 	ap-schost-1 (for scalable Apache application resources)
Resources: schost-1 (shared address),	apache-1 (Apache application resource) 
 
(Add a failover resource group to contain shared addresses.)
# scrgadm -a -g sa-schost-1
 
(Add the shared address resource to the failover resource group.)
# scrgadm -a -S -g sa-schost-1 -l schost-1 
 
(Register the Apache resource type.)
# scrgadm -a -t SUNW.apache
 
(Add a scalable resource group.)
# scrgadm -a -g ap-schost-1 -y Maximum_primaries=2 \
-y Desired_primaries=2 -y RG_dependencies=sa-schost-1
 
(Add Apache application resources to the scalable resource group.)
# scrgadm -a -j apache-1 -g ap-schost-1 \
-t SUNW.apache -y Network_resources_used=schost-1 \
-y Scalable=True -y Port_list=80/tcp \
-x Bin_dir=/opt/apache/bin -x Confdir_list=/opt/apache/conf
 
(Bring the failover resource group online.)
# scswitch -Z -g sa-schost-1
 
(Bring the scalable resource group online on both nodes.)
# scswitch -Z -g ap-schost-1