Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  Generic Data Services Using the SunPlex Agent Builder to Create a Service Using GDS Create a Service Using GDS in the SunPlex Agent Builder  Previous   Contents   Next 
   
 

Output From SunPlex Agent Builder

The SunPlex Agent Builder generates three driving scripts and a configuration file based on input you provide during package creation. The configuration file specify the names of the resource group and resource type.

The driving scripts are:

  • Start script: Used to configure the resources and start the application under RGM control.

  • Stop script: Used to stop the application and take down resources and resource groups.

  • Remove script: Used to remove the resources and resource groups created by the start script.

These driving scripts have the same interface and behavior as the utility scripts generated by the SunPlex Agent Builder for non-GDS-based agents. The scripts are packaged in a Solaris-installable package that can be reused across multiple clusters.

You can customize the configuration file to provide your own names for resource groups or other parameters that are normally given as inputs to the scrgadm command. If you do not customize the scripts, the SunPlex Agent Builder provides reasonable defaults for the scrgadm parameters.

Using the Standard Sun Cluster Administration Commands to Create a Service Using GDS

In this section we describe how these parameters can actually be input to the GDS. The GDS is used and administered using the existing Sun Cluster administration commands such as scrgadm and scswitch.

Then there is no need to enter the lower level administration commands shown in this section if the driving scripts provide adequate functionality. However, you can do so if you need to have finer control over the GDS-based resource. These are the commands actually executed by the driving scripts.

ProcedureHow to Use Sun Cluster Administration Commands to Create a Highly Available Service Using GDS

  1. Register the resource type SUNW.gds

    # scrgadm -a -t SUNW.gds
  2. Create the resource group containing the LogicalHostname resource and the failover service itself.

    # scrgadm -a -g haapp_rg
  3. Create the resource for the LogicalHostname resource.

    # scrgadm -a -L -g haapp_rs -l hhead
  4. Create the resource for the failover service itself.

    # scrgadm -a -j haapp_rs -g haapp_rg -t SUNW.gds \
             -y Scalable=false -y Start_timeout=120 \
             -y Stop_timeout=120 -x Probe_timeout=120 \
             -y Port_list="2222/tcp" \
             -x Start_command="/export/ha/appctl/start" \
             -x Stop_command="/export/ha/appctl/stop" \    
             -x Probe_command="/export/app/bin/probe" \
             -x Child_mon_level=0 -y Network_resources_used=hhead \
             -x Failover_enabled=true -x Stop_signal=9
  5. Bring the resource group haapp_rg online.

    # scswitch -Z -g haapp_rg

ProcedureStandard Sun Cluster Administration Commands to Create a Scalable Service Using GDS

  1. Register the resource type SUNW.gds.

    # scrgadm -a -t SUNW.gds
  2. Create the resource group for the SharedAddress resource.
    # scrgadm -a -g sa_rg

  3. Create the SharedAddress resource on sa_rg.

    # scrgadm -a -S -g sa_rg -l hhead
  4. Create the resource group for the scalable service.

    # scrgadm -a -g app_rg -y Maximum_primaries=2 \
          -y Desired_primaries=2 -y RG_dependencies=sa_rg
  5. Create the resource group for the scalable service itself.

    # scrgadm -a -j app_rs -g app_rg -t SUNW.gds \
           -y Scalable=true -y Start_timeout=120 \ 
           -y Stop_timeout=120 -x Probe_timeout=120 \
           -y Port_list="2222/tcp" \
           -x Start_command="/export/app/bin/start" \
           -x Stop_command="/export/app/bin/stop" \
           -x Probe_command="/export/app/bin/probe" \
           -x Child_mon_level=0 -y Network_resource_used=hhead \
           -x Failover_enabled=true -x Stop_signal=9 
  6. Bring the resource group containing the network resources online.

     # scswitch -Z -g sa_rg
  7. Bring the resource group app_rg online.

    # scswitch -Z -g app_rg

Command-Line Interface to the SunPlex Agent Builder

The SunPlex Agent Builder has a command-line interface that has equivalent functionality to the GUI interface. This interface consists of the commands scdscreate(1HA) and scdsconfig(1HA). The following section performs the same function as the GUI-based procedure Creating a Service That Uses GDS With the Command-Line Version of Agent Builder but uses the non-GUI interface.

ProcedureCreating a Service That Uses GDS With the Command-Line Version of Agent Builder

  1. Create the service.

    For a failover service, use:

    # scdscreate -g -V NET -T app -d /export/wdir

    For a scalable service, use:

    # scdscreate -g -s -V NET -T app -d /export/wdir

    Note - The -d parameters are optional. If it is not specified, the working directory defaults to the current directory.


  2. Configure the service.
    # scdsconfig -s "/export/app/bin/start' -t "/export/app/bin/stop" \
    -m "/export/app/bin/probe" -d /export/wdir


    Note - Only the start command is required. All other parameters are optional.


  3. Install the completed package on all nodes of the cluster.
    # cd /export/wdir/NETapp/pkg 
    # pkgadd -d . NETapp

  4. The following files will be installed during the pkgadd:
    /opt/NETapp 
    /opt/NETapp/README.app 
    /opt/NETapp/man 
    /opt/NETapp/man/man1m 
    /opt/NETapp/man/man1m/removeapp.1m 
    /opt/NETapp/man/man1m/startapp.1m 
    /opt/NETapp/man/man1m/stopapp.1m 
    /opt/NETapp/man/man1m/app_config.1m 
    /opt/NETapp/util 
    /opt/NETapp/util/removeapp 
    /opt/NETapp/util/startapp 
    /opt/NETapp/util/stopapp 
    /opt/NETapp/util/app_config


    Note - The man pages and script names will correspond to the Application Name you entered above preceded by the script name; for example, startapp.


    To view the man pages, you need to specify the path to the man page. For example, to view the startapp man pages, use:

    # man -M /opt/NETapp/man startapp
  5. On one node of the cluster, configure the resources and start the application.
    # /opt/NETapp/util/startapp -h <logichostname> -p <port and protocol list>

    The arguments to the start script will vary according to the type of resource: failover or scalable. Check the customized man page or run the start script without any argument to get a usage statement.

    # /opt/NETapp/util/startapp 
     The resource name of LogicalHostname or SharedAddress must be specified. 
     For failover services: 
     Usage: startapp -h <logical host name> 
              -p <port and protocol list> 
              [-n <ipmpgroup/adapter list>] 
     For scalable services: 
     Usage: startapp  
              -h <shared address name> 
              -p <port and protocol list> 
              [-l <load balancing policy>]  
              [-n <ipmpgroup/adapter list>] 
              [-w <load balancing weights>] 
 
 
 
  Previous   Contents   Next