Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Data Services Developer's Guide Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

## Setting Up the Development Environment for Writing a Data Service

Before you begin to develop your data service, you must install the Oracle Solaris Cluster development IPS package (`ha-cluster/developer/api`) to have access to the Oracle Solaris Cluster header and library files. Although this package is already installed on all cluster nodes, you typically develop your data service on a separate, noncluster development machine, rather than on a cluster node. In this typical case, you must use the `pkg install` command to install the `ha-cluster/developer/api` IPS package on your development machine.

When compiling and linking your code, you must set particular options to identify the header and library files.

Note - You cannot mix compatibility-mode compiled C++ code and standard-mode compiled C++ code in the Oracle Solaris Operating System and Oracle Solaris Cluster products. Consequently, if you intend to create a C++ based data service for use on Oracle Solaris Cluster software, you must use the standard mode to compile that data service.

When you have finished development (on a noncluster node), you can transfer the completed data service to a cluster for testing.

The procedures in this section describe how to complete the following tasks:

- Install the Oracle Solaris Cluster development IPS package (`ha-cluster/developer/api`) and set the correct compiler and linker options.

- Transfer the data service to a cluster.

## How to Set Up the Development Environment

This procedure describes how to install the `ha-cluster/developer/api` IPS package and set the compiler and linker options for data service development.

1. Assume the `root` role that provides `solaris.cluster.modify` RBAC authorization.
2. Ensure that the `solaris` and `ha-cluster` publishers are valid.

       # pkg publisher
       PUBLISHER                           TYPE     STATUS   URI
       solaris                             origin   online   solaris-repository
       ha-cluster                          origin   online   ha-cluster-repository

   For information about setting the `solaris` publisher, see Set the Publisher Origin to the File Repository URI in Copying and Creating Oracle Solaris 11.1 Package Repositories.

3. Install the `ha-cluster/developer/api` package in the current directory.

       # pkg install ha-cluster/developer/api

4. Verify that the package installed successfully.

       phys-schost% pkg info ha-cluster/developer/api

   Installation is successful if output shows that `State` is `Installed`.

5. In the `makefile`, specify compiler and linker options that identify the include and library files for your data service code.

   Specify the `-I` option to identify the Oracle Solaris 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 in the cluster.

       # Makefile for sample data service
       ...

       -I /usr/cluster/include

       -L /usr/cluster/lib

       -R /usr/cluster/lib
       ...

### Transferring a Data Service to a Cluster

When you have completed the data service on a development machine, you must transfer the data service to a cluster for testing. To reduce the chance of error during the transfer, combine the data service code and the RTR file into a package. Then, install the package on the Oracle Solaris hosts on which you want to run the service.

Note - Agent Builder creates a System V Revision 4 (SVR4) package automatically.

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |