C H A P T E R 2 |
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.
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:
The development environment refers to the set-up with which you work during the development phase, when writing and testing applications.
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.
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.
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:
On the Solaris OS, these files are in the SUNWnhas-safclm-libs and SUNWnhas-safclm-headers developer packages, which can be installed on your development host without having to install a running Foundation Services CLM. The SUNWnhas-safclm-libs and SUNWnhas-safclm-headers developer packages require that the SUNWnhas-common-libs and SUNWnhas-cmm-libs packages are present.
On Linux, these files are in the sun-nhas-safclm-headers-3.0-*.x86_amd64.rpm and sun-nhas-safclm-libs-3.0-*.x86_amd64.rpm developer packages, which can be installed on your development host without having to install a running Foundation Services CMM. These developer packages require that the sun-nhas-common-libs-3.0-*.x86_amd64.rpm and sun-nhas-cmm-libs-3.0-*.x86_amd64.rpm packages are present.
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.
Install the packages as follows:
# 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.
# 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.
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.
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.
Copyright © 2008, Sun Microsystems, Inc. All rights reserved.