Sun Cluster Data Service for Apache Tomcat Guide for Solaris OS

Configuration Requirements

These requirements apply to Sun Cluster HA for Apache Tomcat only. You must meet these requirements before you proceed with your Sun Cluster HA for Apache Tomcat installation and configuration.


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


Location of the Tomcat Home Directory for Scalable or Multiple Masters Configurations

If you intend to install Apache Tomcat in a scalable resource group, create the Tomcat Home directory and its dynamic data on local storage.

This required because Apache Tomcat uses the directory structure to store its configuration, logs, deployed applications and so on.

If your local storage is not big enough, you can use a Global File System on the shared storage.


Caution – Caution –

In this scenario, the deployment of Tomcat applications needs to occur on every node where Apache Tomcat is hosted.


Load Balancing for Multiple Master Configurations

If you intend to install Apache Tomcat in a multiple master configuration, an external load balancer is required.

Location of the Tomcat Home Directory for Failover Configurations

If you intend to install Apache Tomcat in a failover resource group, create the Tomcat Home directory on the shared storage. The location for the Tomcat Home directory can reside on a Global File System (GFS) or it can reside on a Failover File System (FFS) with an HAStoragePlus resource. It is best practice to store it on a FFS.

This is required because Apache Tomcat uses the directory structure to store its configuration, logs, deployed applications, and so on. It is not recommended to store the binaries local and the dynamic parts of the data on the shared storage.


Note –

It is best practice to mount Global File Systems with the /global prefix and to mount Failover File Systems with the /local prefix.


Apache Tomcat Component Dependencies

You can configure the Sun Cluster HA for Apache Tomcat data service to protect one or more Apache Tomcat instances. Each instance needs to be covered by one Apache Tomcat resource. The dependencies between the Apache Tomcat resource and other needed resources are described in Table 3, in Table 4, or in Table 5.

Table 3 Dependencies Failover

Component 

Description 

Storage Resource 

This resource can be a SUNW.HAStoragePlus or a SUNW.HAStorage resource type.

Apache Tomcat(Mandatory)

-> SUNW.HAStoragePlus resource or SUNW.HAStorage resource

The Storage resource manages the Apache Tomcat File System Mount points and ensures that Apache Tomcat is not started until they are mounted. 

Logical Host(Mandatory)

The Apache Tomcat has an implicit dependency on the logical hosts of the resource group, because it is based on the generic data service. On behalf of this reason a logical Host needs to exist, but no explicit dependency is necessary. 

Because of the special requirements of a scalable configuration, you need no dependencies to storage or addresses, as long as every Apache Tomcat and its parameter file pfile is stored on the root file system. Otherwise follow Table 4.

Table 4 Dependencies Scalable

Component 

Description 

Storage Resource 

This resource can be a SUNW.HAStorage or a SUNW.HAStoragePlus resource type.

Apache Tomcat(Mandatory)

-> Storage resource 

The Storage resource manages the Apache Tomcat File System Mount points and ensures that Apache Tomcat is not started until they are mounted. 

Shared address(Mandatory)

The shared address resource resides in a separate resource group on which the scalable resource group depends. 

A multiple master configuration is running on more than one nodes like a scalable configuration, but without a shared address. Because of the special requirements of a multiple masters configuration, you need no dependencies to storage or addresses, as long as every Apache Tomcat and its parameter file pfile is stored on the root file system. Otherwise follow Table 5.

Table 5 Dependencies Multiple Masters

Component 

Description 

Storage Resource 

This resource can be a SUNW.HAStorage or a SUNW.HAStoragePlus resource type.

Apache Tomcat(Mandatory)

-> Storage resource 

The Storage resource manages the Apache Tomcat File System Mount points and ensures that Apache Tomcat is not started until they are mounted. 

Shared address(Mandatory)

The shared address resource resides in a separate resource group on which the scalable resource group depends. 


Note –

For more detailed information about Apache Tomcat, refer to the http://jakarta.apache.org web page.


Apache Tomcat Configuration and Registration Files

Apache Tomcat component has configuration and registration files in the directory /opt/SUNWsctomcat/util . These files let you register the Apache Tomcat component with Sun Cluster.

Within these files, the appropriate dependencies have been applied.


# cd /opt/SUNWsctomcat
# 
# ls -l util
total 4
-rwx--x---   1 root     other        709 Apr 29 11:57 sctomcat_config
-rwx--x---   1 root     other        561 Apr 29 11:58 sctomcat_register
# more util/*g
::::::::::::::
util/sctomcat_config
::::::::::::::
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
# 
# This file will be sourced in by sctomcat_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#        RS - name of the resource for the application
#        RG - name of the resource group containing RS
#      PORT - name of the port number
#        LH - name of the LogicalHostname SC resource
#  SCALABLE - true or false for a scalable or failover resource
#   NETWORK - false or true, false for multiple master configurations without
#             shared address, in this case SCALABLE will be ignored
#
#     PFILE - absolute pathname to the parameter file for the Tomcat resource
#    HAS_RS - name of the HAStoragePlus SC resource 
#             (it can be a , separated list for the dependencies)
#

RS=
RG=
PORT=8080
LH=
SCALABLE=false
NETWORK=true
PFILE=
HAS_RS=