C H A P T E R  2

Setting Up the Development Environment

To develop applications for the Foundation Services, you must set up a development environment for your development host. For information, see the following topics:

For general information about developing applications on the Solaris Operating System, see the Solaris Software Developer Collection.


Introduction to the Development Environment

The development environment for the Foundation Services consists of a development host connected through an installation server to a cluster of nodes. The Foundation Services runs on the nodes of a cluster and does not need to be installed on the development host. Install only the developer packages of the Foundation Services on the development host. This development host together with a cluster for testing your applications is called the development environment. The following figure illustrates the development environment:

FIGURE 2-1   Setting Up the Development Environment

Flow diagram shows how the components development
host and cluster make up the development environment.


The development environment refers to the set-up with which you work during the development phase, when writing and testing applications.


Setting Up the Development Host

The development host must have at least 1 GBit of disk space, with a minimum of 512 MBytes RAM.

Refer to the Netra High Availability Suite 3.0 1/08 Release Notes for the latest information about supported operating systems and software versions.


Setting Up a Foundation Services Cluster

To run applications, you must build them on your development host and deploy them on a cluster that runs the Foundation Services. For information about how to set up a build server and on how to set up a cluster that runs the Foundation Services, see the Netra High Availability Suite 3.0 1/08 Foundation Services Getting Started Guide or the Netra HA Suite installation guides.

To install, compile, and run your applications, see Installing Applications on a Cluster.


Installing Libraries and Header Files

Ensure that the library contents and header files of the Foundation Services are available in the runtime environment of your development host. This includes the CLM header (.h) files and library (.so) files. These files are delivered as follows:

You can write your applications on your development host using the CLM API libraries and header files, but you cannot successfully run your applications on your development host. For highly available cluster-based applications, run your applications on a cluster that is running the Foundation Services.

procedure icon  To Install the Developer Package and Trace Package

  1. Log into the development host as superuser.

  2. Install the packages as follows:

    On the Solaris OS:


    # pkgadd -d /software-distribution-dir/Packages/ 
    SUNWnhas-cmm-libs SUNWnhas-cmm-headers SUNWnhas-common-libs
    

    Where software-distribution-dir is the location of the software distribution.

    On Linux:


    # cd /software-distribution-dir/Packages/
    # rpm -i sun-nhas-safclm-headers-3.0-*.x86_amd64.rpm
    sun-nhas-safclm-libs-3.0-*.x86_amd64.rpm
    sun-nhas-common-libs-3.0-*.x86_amd64.rpm
    sun-nhas-cmm-libs-3.0-*.x86_amd64.rpm
    

    Where software-distribution-dir is the location of the software distribution.

  3. Verify that the libSaClm.so library is available in the /opt/SUNWcgha/lib/ directory (Solaris OS), the /opt/sun/lib directory (32-bit applications on Linux), or the /opt/sun/lib64 directory (64-bit applications on Linux) and that the header files are available in the /opt/SUNWcgha/include/ directory (Solaris OS) or the /opt/sun/include directory (Linux OS).



    Note - The code examples provided in this guide require you to install the library and header files in these default locations.



    The CLM API is provided by the libSaClm.so library. The libSaClm library communicates with the nhcmmd daemon, which is monitored by the Daemon Monitor, nhpmd. For further information on the nhcmmd daemon, see the nhcmmd1M (Solaris) or nhcmmd8 (Linux) man page. For more information on the Daemon Monitor, see the nhpmd1M (Solaris) or nhpmd8(Linux) man page.

  4. To link the libSaClm library to your application, add the /opt/SUNWcgha/lib/ directory (Solaris OS), the /opt/sun/lib directory (32-bit applications on Linux), or the /opt/sun/lib64 directory (64-bit applications on Linux) to the environment variable LD_LIBRARY_PATH.

    The services that these libraries use are only available when you run your applications on the fully installed cluster running the Foundation Services. For more information see Setting Up a Foundation Services Cluster.