Sun Cluster Data Services Developer's Guide for Solaris OS

Creating and Configuring the Scripts

How to Start SunPlex Agent Builder and Create the Scripts
  1. Become superuser or assume an equivalent role.

  2. Start the SunPlex Agent Builder.


    # /usr/cluster/bin/scdsbuilder
    
  3. The SunPlex Agent Builder Create screen appears.

    Dialog box titled SunPlex Agent Builder that shows the main Agent Builder Create screen
  4. Type the Vendor Name.

  5. Type the Application Name.


    Note –

    The combination of Vendor and Application Name cannot contain more than nine characters. It is used as the name of the package for the scripts.


  6. Go to the working directory.

    You can use the Browse pull-down menu to select the directory rather than typing the path.

  7. Select whether the data service is scalable or failover.

    You do not need to select Network Aware since that is the default when you create the GDS.

  8. Select GDS.

  9. (Optional) Change the RT Version from the default value that is shown.


    Note –

    You cannot use the following characters in the RT Version field: blank, tab, slash (/), backslash (\), asterisk (*), question mark (?), comma (,), semicolon (;), left square bracket ([), or right square bracket (]).


  10. Click Create.

    Agent Builder creates the scripts. Results of the creation of the service are displayed in the Output Log window.

    Dialog box that shows the Create screen after information has been entered

    Create is grayed out. You can now configure the scripts.

  11. Click Next.

    The Configuration screen appears.

How to Configure the Scripts

After creating the scripts, you need to configure the new service.

  1. Type the location of the start command or click Browse to locate the start command.

    You can specify property variables. Property variables are described in Property Variables.

  2. (Optional) Type the stop command or click Browse to locate the stop command.

    You can specify property variables. Property variables are described in Property Variables.

  3. (Optional) Type the probe command or click Browse to locate the probe command.

    You can specify property variables. Property variables are described in Property Variables.

  4. (Optional) Specify the timeout values for the start, stop, and probe commands.

  5. Click Configure.

    Agent Builder starts to configure the scripts.


    Note –

    Agent Builder concatenates the Vendor Name and the Application Name to create the package name.


    A package for scripts is created and placed in the following directory:


    working-dir/vendor_nameapplication/pkg
    

    For example, /export/wdir/NETapp/pkg.

  6. As superuser, install the completed package on all nodes of the cluster.


    # cd /export/wdir/NETapp/pkg
    # pkgadd -d . NETapp
    

  7. The following files are installed by 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 correspond to the Application Name that you entered previously 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(1M) man page, type:


    # man -M /opt/NETapp/man startapp
    
  8. On one node of the cluster, configure the resources and start the application.


    # /opt/NETapp/util/startapp -h logicalhostname -p port_and_protocol_list
    

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


    # /opt/NETapp/util/startapp
     The resource name of LogicalHostname or SharedAddress must be
     specified. For failover services:
     Usage: startapp -h logicalhostname
              -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]