Go to main content

Oracle® Solaris Cluster Data Service for Oracle Traffic Director Guide

Exit Print View

Updated: July 2014, E35577–01
 
 

How to Register and Configure HA for Oracle Traffic Director With a Scalable Shared Address

Before You Begin

Ensure that the /etc/netmasks file has IP-address subnet and netmask entries for all logical hostnames. If necessary, edit the /etc/netmasks file to add any missing entries.

  1. On a cluster member, become an administrator that provides solaris.cluster.modify and solaris.cluster.admin authorization.
  2. Register the ORCL.otd resource type for HA for Oracle Traffic Director.
    # clresourcetype register ORCL.otd
  3. Create a failover resource group for the scalable shared address resource.

    You can optionally select the set of nodes or zones on which the data service can run with the –n option.

    # clresourcegroup create [-n node[,…]] resource-group
    resource-group

    Specifies the name of the failover resource group. This name can be your choice but must be unique for resource groups within the cluster.

    –n node[,…]

    Specifies a comma-separated, ordered list of nodes that can master this resource group.

    This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.

  4. Verify that all of the network addresses that you use have been added to your name service database.

    You should have performed this verification during the Oracle Solaris Cluster installation. See the planning chapter in the Oracle Solaris Cluster Software Installation Guide for details.


    Note -  To avoid any failures because of name service lookup, ensure that all logical hostnames and shared addresses are present in the server's and client's /etc/inet/hosts file. Configure name service mapping in /etc/nsswitch.conf on the servers to first check the local files before trying to access NIS or NIS+.
  5. Add a scalable shared address resource to the failover resource group.
    # clressharedaddress create -g resource-group \
    -h shared-address[,…] \
    [-N netiflist] \
    resource
    –g resource-group

    Specifies the name of the failover resource group.

    –h shared-address[,…]

    Specifies a comma-separated list of shared addresses that this resource is to make available.

    resource-group

    Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.

    –N netiflist

    Specifies an optional, comma-separated list that identifies the IPMP groups that are on each node or zone. The format of each entry in the list is netif@node. The replaceable items in this format are as follows:

    netif

    Specifies an IPMP group name, such as sc_ipmp0, or a public network interface card (NIC). If you specify a public NIC, Oracle Solaris Cluster attempts to create the required IPMP groups.

    node

    Specifies the name or ID of a node. To specify the global zone, or to specify a node without non-global zones, specify only node[,…]

    This list is optional. If you omit this list, Oracle Solaris Cluster attempts to create the required IPMP groups.


    Note -  Oracle Solaris Cluster does not currently support using the adapter name for netif.
    resource

    Specifies the name of the resource.

  6. Bring the failover resource group online.
    # clresourcegroup online -eM otd-rg
    otd-rg

    Specifies the name of the failover resource group.

  7. Configure the Oracle Traffic Director server instance that uses the shared address.
  8. Create a scalable resource group to run on all the desired cluster nodes.

    Create a resource group to hold a data service application resource. You must specify the maximum and desired number of primary nodes as well as a dependency between this resource group and the failover resource group that you created in Step 3. This dependency ensures that in the event of failover, the resource manager starts the network resource before starting any data services that depend on the network resource.

    # clresourcegroup create -p Maximum_primaries=m \
    -p Desired_primaries=n \
    scalable-resource-group
    –p Maximum_primaries=m

    Specifies the maximum number of active primary nodes allowed for this resource group. If you do not assign a value to this property, the default is 1.

    –p Desired_primaries=n

    Specifies the desired number of active primary nodes allowed for this resource group. If you do not assign a value to this property, the default is 1.

    scalable-resource-group

    Specifies the scalable resource group.


    Note -  If the value of the Maximum_primaries is equal to the value of the Desired_primaries, and if that number is equal to the number of nodes in the nodes list, then you can substitute the -p Maximum_primaries=m \ -p Desired_primaries=n options with the –S option. For example:
    # clresourcegroup create -S resource-group

  9. Create an application resource in the scalable resource group.

    You can repeat this step to add multiple application resources, such as secure and insecure versions, to the same resource group.

    To set load balancing for the data service, use the two standard resource properties Load_balancing_policy and Load_balancing_weights. See the r_properties (5) man page for a description of these properties. Additionally, see the examples that follow this section.

    # clresource create -g scalable-resource-group \
    -t resource-type \
    -p ORACLE_HOME=oracle-traffic-director-installation-directory \
    -p INSTANCE_HOME=instance-directory \
    -p Resource_dependencies=shared-address[,…] \
    -p Port_list=port-number/protocol[,…] \
    -p Scalable=True \
    resource
    –g scalable-resource-group

    Specifies the name of the scalable resource group into which the resources are to be placed.

    –t resource-type

    Specifies the type of the resource to add.

    –p ORACLE_HOME=oracle-traffic-director-installation-directory

    Specifies the directory where the Oracle Traffic Director software has been installed. This is a per-node setting and if the location is different on each node, each node must be qualified with the node name. For example:

    -p ORACLE_HOME{node1}=oracle-traffic-director-installation-directory-node1 \ 
    -p ORACLE_HOME{node2}=oracle-traffic-director-installation-directory-node2
    –p INSTANCE_HOME=instance-directory

    Specifies the directory where the Oracle Traffic Director instance configuration is located. This is a per-node setting and if the location is different on each node, each node must be qualified with the node name. For example:

    -p INSTANCE_HOME{node1}=instance-directory-node1 \ 
    -p INSTANCE_HOME{node2}=instance-directory-node2
    –p Resource_dependencies=shared-address[,…]

    Specifies a comma-separated list of network resources that identify the shared addresses that the data service uses.

    –p Port_list=port-number/protocol[,…]

    Specifies a comma-separated list of port numbers and protocol to be used, for example, 80/tcp,81/tcp.

    –p Scalable=True

    Specifies a Boolean that is required for scalable services.

    resource

    Specifies the name of the resource to add.

    The resource is created in the enabled state.

  10. Bring the scalable resource group online.
    # clresourcegroup online -eM resource-group
    –eM resource-group

    Specifies the name of the scalable resource group.

Example 2  Creating an Oracle Traffic Director Resource for Use With a Scalable Shared Address

This example creates an Oracle Traffic Director otd-rs resource named otd-rg in a resource group named web-rg, which is configured to run simultaneously on all four nodes of a four-node cluster.

The Oracle Traffic Director instances are configured to listen on port 80 and uses the IP addresses as configured in a SharedAddress resource named sa-rs, which is contained in the resource group sa-rg. The hostname otd-a-sa, is configured in the naming service used by the cluster and any of the clients that will be accessing the server instances.

To create the shared address resource group and resource for this example, do the following:

# clresourcegroup create sa-rg
# clressharedaddress create -g sa-rg -h 
otd-a-sa sa-rs
# clresourcegroup online -eM sa-rg

To create the Oracle Traffic Director resource group and resource, do the following:

# clresourcegroup create -S otd-rg
# clresourcetype register ORCL.otd
# clresource create -g otd-rg -t ORCL.otd
 \
-p ORACLE_HOME=/global/otd/otd-home 
\
-p INSTANCE_HOME{node1}=
/global/otd/otd-1/net-otd-a \
-p INSTANCE_HOME{node2}=
/global/otd/otd-2/net-otd-a \
-p INSTANCE_HOME{node3}=
/global/otd/otd-3/net-otd-a \
-p INSTANCE_HOME{node4}=
/global/otd/otd-4/net-otd-a \
-p Resource_dependencies_offline_restart=otd-gfs-rs
 \
-p Resource_dependencies=sa-rs 
\
-p Port_List=80/tcp 
\
-p Scalable=True \
otd-rs
# clresourcegroup online -eM otd-rg