Sun Cluster Data Services Developer's Guide for Solaris OS

Command-Line Interface for Agent Builder

Agent Builder incorporates a command-line interface that provides the same functionality that the GUI provides. This interface consists of the commands scdscreate and scdsconfig. See the scdscreate(1HA) and scdsconfig(1HA) man pages.

ProcedureHow to Use the Command-Line Version of Agent Builder to Create a Service That Uses GDS

This section describes how to use the command-line interface to perform the same set of steps shown in Using Agent Builder to Create a Service That Uses the GDS.

Steps
  1. Become superuser or assume an equivalent role.

  2. Create the service.

    • For a failover service, type:


      # scdscreate -g -V NET -T app -d /export/wdir
      
    • For a scalable service, type:


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

    Note –

    The -d argument is optional. If you do not specify this argument, the current directory becomes the working directory.


  3. Configure the service.


    # scdsconfig -s "/export/app/bin/start" -t "/export/app/bin/stop" \
    -m "/export/app/bin/probe" -d /export/wdir
    

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


    Note –

    Only the start command is required. All other options and arguments are optional.


  4. On each node of the cluster, install the completed package.

    • For the Solaris 10 OS in a zones environment, as global administrator in the global zone, type the following commands:


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

      The package that you specified is added to the global zone, provided that the contents of the package do not affect any area of the global zone that is shared with a non-global zone.

      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
    • For any other version of the Solaris OS or the Solaris 10 OS in a non-zones environment, type the following commands:


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

      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 typed previously on the Create screen, preceded by the script name (for example, startapp).


  5. 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.


    Note –

    To determine the command line that you need to type, check the customized man page or run the startapp script without any arguments to display a usage statement.

    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
    

    To display a usage statement, type:


    # /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]