Sun Cluster Data Service for Apache Guide for Solaris OS

Example – Registering Scalable Sun Cluster HA for Apache

For scalable services, you create the following resource groups.

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: resource-group-1 (for shared addresses), 
	resource-group-2 (for scalable Apache application 
Resources: schost-1 (shared address), apache-1 (Apache application 
(Add a failover resource group to contain shared addresses.)
# scrgadm -a -g resource-group-1
(Add the shared address resource to the failover resource group.)
# scrgadm -a -S -g resource-group-1 -l schost-1 
(Register the Apache resource type.)
# scrgadm -a -t SUNW.apache
(Add a scalable resource group.)
# scrgadm -a -g resource-group-2 -y Maximum_primaries=2 \
-y Desired_primaries=2 -y RG_dependencies=resource-group-1
(Add Apache application resources to the scalable resource group.)
# scrgadm -a -j apache-1 -g resource-group-2 \
-t SUNW.apache -y Network_resources_used=schost-1 \
-y Scalable=True -y Port_list=80/tcp \
-x Bin_dir=/opt/apache/bin
(Bring the failover resource group online.)
# scswitch -Z -g resource-group-1
(Bring the scalable resource group online on both nodes.)
# scswitch -Z -g resource-group-2