The SunPlex Agent Builder also incorporates a command-line interface that provides the same functionality that the graphical user interface provides. This interface consists of the commands scdscreate and scdsconfig. See the scdscreate(1HA) and scdsconfig(1HA) man pages.
This section describes how to perform the same set of steps shown in Using SunPlex Agent Builder to Create a Service That Uses the GDS by using the command-line interface.
Become superuser or assume an equivalent role.
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 |
The -d parameter is optional. If you do not specify this parameter, the current directory becomes the working directory.
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 Property Variables.
Only the start command is required. All other parameters are optional.
Install the completed package on all nodes of the cluster.
# 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 |
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 |
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] |