Sun Cluster Data Service for Apache Tomcat Guide for Solaris OS

ProcedureHow to Enable Apache Tomcat to run in a Zone Configuration

  1. Become superuser or assume a role that provides solaris.cluster.verb RBAC authorization on one of the nodes in the cluster that will host Apache Tomcat.

  2. Create and boot your zone Apache Tomcat-zone on all the nodes to host your Apache Tomcat data base.

  3. Register the SUNW.gds and SUNW.HAStoragePlus resource type.


    # clresourcetype register  SUNW.gds SUNW.HAStoragePlus
    
  4. Create a failover resource group.


    Note –

    Perform this step only if you create a failover data service.



    # clresourcegroup create -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone \
    Apache Tomcat-failover-resource-group
    
  5. (Optional) Create a resource for the Apache Tomcat Disk Storage.


    Note –

    Perform this step only if you create a failover data service.



    # clresource create   \
    > -g Apache-Tomcat-failover-resource-group  \
    > -t SUNW.HAStoragePlus  \
    > -p FilesystemMountPoints=Apache Tomcat- instance-mount-points Apache-Tomcat-has-resource
    
  6. (Optional) Create a resource for the Apache Tomcat Logical Hostname.


    Note –

    Perform this step for a failover data service.



    # clreslogicalhostname   \
    > -g Apache Tomcat-failover-resource-group  \
    > -h Apache Tomcat-logical-hostname \
    > Apache Tomcat-lh-resource
    
  7. Enable the failover resource group that now includes the Apache Tomcat Disk Storage and Logical Hostname resources.


    Note –

    Perform this step for a failover data service.



    # clresourcegroup online -M -n current-node Apache Tomcat-failover-resource-group
    
  8. (Optional) Create the resource group for the multiple masters data service.


    Note –

    Perform this step only if you create a multiple masters data service.



    # clresourcegroup create  \
    >  -p Maximum_primaries=2 \
    >  -p Desired_primaries=2 \
    >  -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone\
    > Apache-Tomcat-Scalable-resource-group
    

    If you need more nodes, adjust Maximum_primaries and Desired_primaries to the appropriate value.

  9. (Optional) Create a resource for the Apache Tomcat Disk Storage if it is not in the root file system.


    Note –

    Perform this step only if you create a multiple masters data service.



    # clresource create   \
    > -g Apache-Tomcat-failover-resource-group  \
    > -t SUNW.HAStoragePlus  \
    > -p FilesystemMountPoints=Apache Tomcat- instance-mount-points Apache-Tomcat-has-resource
    
  10. Enable the failover resource group that now includes the Apache Tomcat Disk Storage and Logical Hostname resources.


    Note –

    Perform this step only if you create a multiple masters data service.



    # clresourcegroup online -M  Apache Tomcat-failover-resource-group
    
  11. Create a failover resource group for the SharedAddress resource.


    Note –

    Perform this step only if you create a scalable data service.



    # clresourcegroup create -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone\
    > Apache-Tomcat-SharedAddress-resource-group
    
  12. Create the SharedAddress resource.


    Note –

    Perform this step only if you create a scalable data service.



    # clressharedaddress create   \
    > -g Apache-Tomcat-SharedAddress-resource-group\
    > -h Apache-Tomcat-SharedAddress-hostname \
    > Apache-Tomcat-SharedAddress-resource
    
  13. Online the SharedAddress resource group.


    Note –

    Perform this step only if you create a scalable data service.



    # clresourcegroup online -M  Apache-Tomcat-SharedAddress-resource-group
    
  14. Create the resource group for the scalable service.


    Note –

    Perform this step only if you create a scalable data service.



    # clresourcegroup create \
     > -p Maximum_primaries=2 \
     > -p Desired_primaries=2 \
     > -p RG_dependencies=Apache-Tomcat-SharedAddress-resource-group \
    -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone\
    Apache-Tomcat-Scalable-resource-group
    

    If you need more nodes, adjust Maximum_primaries and Desired_primaries to the appropriate value.

  15. Create a resource for the Apache Tomcat Disk Storage if it is not in the root file system.


    Note –

    Perform this step only if you create a scalable data service.



    # clresource create Apache-Tomcat-has-resource  \
    > -g Apache-Tomcat-scalable-group   \
    > -t SUNW.HAStoragePlus  \
    > -p FilesystemMountPoints=Apache Tomcat- instance-mount-points
    
  16. Enable the failover resource group that now includes the Apache Tomcat Disk Storage and Logical Hostname resources.


    Note –

    Perform this step only if you create a scalable data service.



    # clresourcegroup online -M  Apache Tomcatscalable-resource-group