Sun Cluster 3.1 8/05 With Sun Java Enterprise System 5 Special Instructions

ProcedureHow to Register Sun Cluster HA for Apache Tomcat in a Failover Zone

This procedure uses the configuration file to register Sun Cluster HA for Apache Tomcat in a failover zone.

Before You Begin

Before you register Sun Cluster HA for Apache Tomcat in a failover zone, perform the following tasks. Follow procedures in the Sun Cluster Data Service for Solaris Containers Guide and Sun Cluster Data Service for Apache Tomcat Guide for Solaris OS.

  1. Become superuser in the global zone.

  2. Make a copy of the /opt/SUNWsctomcat/util/sctomcat_config file to use as your configuration file.

    You can place this configuration file in any directory that is accessible to the failover zone.

  3. Open your configuration file for editing and modify the variables for non-global zones.

    These variables are used only when the data service is installed in a non-global zone. Set the values of these variables as follows:

    ZONE

    Set the name of the zone where Sun Cluster HA for Apache Tomcat should run.

    ZONE_BT

    Set the name of the resource that controls the zone.

    PROJECT

    Set the name of the Sun Resource Manager Project in the failover zone. If the PROJECT variable is omitted from the configuration file, the data service uses the default project of the user, :default, in a Solaris Service Management Facility (SMF) context. This project name is placed in the start/project property and the stop/project property of the SMF service.


    Note –

    Keep this modified configuration file for possible future use.


  4. Log in as superuser to the failover zone's console.

  5. Install Apache Tomcat software in the zone.

  6. Copy and modify the parameter file /opt/SUNWsctomcat/pfile.

    Follow instructions in How to Register and Configure Sun Cluster HA for Apache Tomcat as a failover data service in Sun Cluster Data Service for Apache Tomcat Guide for Solaris OS.

  7. Create the environment script.

    Follow instructions in How to Register and Configure Sun Cluster HA for Apache Tomcat as a failover data service in Sun Cluster Data Service for Apache Tomcat Guide for Solaris OS.

  8. Disconnect from the failover zone's console.

  9. Register Sun Cluster HA for Apache Tomcat with SMF.


    # ksh /opt/SUNWsctomcat/util/sctomcat_register -f filename
    
    -f

    Specifies the configuration file name.

    filename

    The configuration file name.

    The registration of Sun Cluster HA for Apache Tomcat generates an SMF manifest and registers an SMF service in the failover zone that is specified by the ZONE variable in the configuration file. The manifest is named resourcename.xml, where resource is the name that is specified by the RS variable in the configuration file. This manifest is placed in the /var/svc/manifest/application/sczone-agents/ directory. The SMF service is named svc:/application/sczone-agents/resource.

    The Sun Cluster HA for Apache Tomcat data service uses the SMF component of the Sun Cluster HA for Containers data service to control and probe this SMF service of the Sun Cluster HA for Apache Tomcat. It registers a Sun Cluster HA for Containers SMF component on top of the already-created SMF service. The name of the script that starts and stops the manifest as well as probes the SMF component is control_sctomcat.