Perform the following steps to complete a Sun Cluster HA for Sun ONE Application Server failover configuration. You can also use this procedure to configure a domains administrative server to be a failover resource.
Become superuser on a cluster member.
Add a resource group for Sun ONE Application Server if you have not performed the steps in Configuring and Activating Network Resources for Failover.
# scrgadm -a -g resource-group [-h nodelist] |
Add the logical hostname resource to the resource group if you have not performed the steps in Configuring and Activating Network Resources for Failover.
# scrgadm -a -L -g resource-group -l logical-hostname |
Register the resource type for the data service.
# scrgadm -a -t SUNW.s1as |
Adds the data service resource type
Specifies the predefined resource type name
Add the application server resource instance to the failover resource group that you created for your network resources.
# scrgadm -a -j resource -g resource-group \ -t SUNW.s1as \ -x Confdir_list=install-directory/domains/domain/server \ -y Network_resources_used=logical hostname \ -y Port_list=port/tcp,port/tcp \ -x Monitor_uri_list=http://logical-hostname[:port][/path] |
The resource group that contains the application resources is the same resource group that you created for your network resources in “Creating a Resource Group” in Sun Cluster 3.1 Data Service Planning and Administration Guide.
Specifies the Sun ONE Application Server application resource name.
Specifies a comma-separated list of network resources in resource-group.
Specifies the type of resource to add.
Specifies a path for your Sun ONE Application Server configuration directory. The Confdir_list extension property is required and must have exactly one entry.
Specifies a comma-separated list of the port number and the protocol to be used, for example, 80/tcp. If the Monitor_Uri_list is set, the Port_list setting is optional.
Specifies a comma-separated list of URIs from which Sun Cluster HA for Sun ONE Application Server makes requests. The Monitor_Uri_list extension property is required if the Port_list property is not set.
Bring the resource group online.
# scswitch -Z -g resource-group |
Enables the resource and its monitor.
Specifies the name of the application resource group that is being enabled.
Verify that the resource group and application server resource is online.
# scstat -g # ps -ef |
This example shows how to register Sun Cluster HA for Sun ONE Application Server as a failover data service.
Cluster Information Node names: phys-schost-1, phys-schost-2 Logical hostname: schost-1 Resource group: appsrv-rg (for all resources) Resources: schost-1 (logical hostname), SUNW.s1as (Sun ONE Application Server application resource) (Create a failover resource group.) # scrgadm -a -g appsrv-rg -h phys-schost-1,phys-schost-2 (Add a logical hostname resource to the resource group.) # scrgadm -a -L -g appsrv-rg -l schost-1 (Register the SUNW.s1as resource type.) # scrgadm -a -t SUNW.s1as (Create a Sun ONE Application Server resource and add it to the resource group.) # scrgadm -a -j appsrv-rs -g appsrv-rg \ -t SUNW.s1as \ -x Confdir_list=/global/appsrv/domains/scdomain/server1 \ -y Network_resources_used=schost-1 \ -y Port_list=80/tcp,3700/tcp \ -x Monitor_Uri_list=http://schost-1:80/servlet/monitor (Bring the application resource group online.) # scswitch -Z -g appsrv-rg |
This example shows how the admin-server can be configured as part of the failover resource group created in the above example.
Cluster Information Node names: phys-schost-1, phys-schost-2 Logical hostname: schost-1 Resource group: appsrv-rg (for all resources) Resources: schost-1 (logical hostname), (Create a Sun ONE Application Server resource and add it to the resource group.) # scrgadm -a -j admin-rs -g appserv-rg \ -t SUNW.s1as \ -x Confdir_list=/global/appsrv/domains/scdomain/admin-server \ -y Network_resources_used=schost-1 \ -y Port_list=4848/tcp \ -x Monitor_Uri_List=http://schost-1:4848 |