Before beginning data service development, you must have installed the Sun Cluster development package (SUNWscdev) to have access to the Sun Cluster header and library files. Although this package is already installed on all cluster nodes, typically, you do development on a separate, non-cluster development machine, not on a cluster node. In this typical case, you must use pkgadd(1M) to install the SUNWscdev package on your development machine.
When compiling and linking your code, you must set particular options to identify the header and library files. When you have finished development (on a non-cluster node) you can transfer the completed data service to a cluster for running and testing.
Be certain you are using a development version of Solaris 5.8 or higher.
Use the procedures in this section to:
Install the Sun Cluster development package (SUNWscdev) and set the appropriate compiler and linker options
Transfer the data service to a cluster
This procedure describes how to install the SUNWscdev package and set the compiler and linker options for data service development.
Change directory to the appropriate CD-ROM directory.
Install the SUNWscdev package in the current directory.
pkgadd -d . SUNWscdev
In the makefile, specify compiler and linker options to identify the include and library files for your data service code.
Specify the -I option to identify the Sun Cluster header files, the -L option to specify the compile-time library search path on the development system, and the -R option to specify the library search path to the runtime linker on the cluster.
# Makefile for sample data service ... -I /usr/cluster/include -L /usr/cluster/lib -R /usr/cluster/lib ...
When you have completed development of a data service on a development machine, you must transfer it to a cluster for testing. To reduce the chance of error, the best way to accomplish this transfer is to package together the data service code and the RTR file and then install the package on all nodes of the cluster.
Whether you use pkgadd or some other way to install the data service, you must put the data service on all cluster nodes. Agent Builder automatically packages together the RTR file and data service code.