C H A P T E R 3 |
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 for the version of the Solaris OS in use at your site.
The development environment for the Foundation Servicesconsists of a development host connected through an installation server to a cluster of nodes. The Netra HA Suite software 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 setup 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 how to set up a cluster that runs the Netra HA Suite software, see the Netra High Availability Suite 3.0 1/08 Foundation Services Getting Started Guide.
To install, compile, and run your applications, see Chapter 4.
On the Solaris OS, these files are in the SUNWnhas-cmm-libs and SUNWnhas-cmm-headers developer packages. You can install these packages on your development host without having to install a running Netra HA Suite CMM. The SUNWnhas-cmm-libs and SUNWnhas-cmm-headers developer packages require that the SUNWnhas-common-libs package is present.
On Linux, these files are in the sun-nhas-cmm-headers-3.0-*.x86_amd64.rpm and sun-nhas-cmm-libs-3.0-*.x86_amd64.rpm developer packages, which can be installed on your development host without having to install a running Netra HA Suite CMM. These developer packages require that the sun-nhas-common-libs-3.0-*.x86_amd64.rpm package is present.
You can write your applications on your development host using the CMM 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-cmm-headers-3.0-*.x86_amd64.rpm sun-nhas-cmm-libs-3.0-*.x86_amd64.rpm sun-nhas-common-libs-3.0-*.x86_amd64.rpm |
Where software-distribution-dir is the location of the software distribution.
Verify that the libcgha_cmm.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 OS) 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 CMM API is provided by the libcgha_cmm.so library. The libcgha_cmm library communicates with the nhcmmd daemon, which is monitored by the Daemon Monitor, nhpmd. For further information on the nhcmmd daemon, see the nhcmmd(1M) man page. For more information on the Daemon Monitor, see the nhpmd(1M) man page.
To link the libcgha_cmm library to your application, add the /opt/SUNWcgha/lib/ directory (Solaris OS), the /opt/sun/lib directory (32-bit applications on Linux OS), 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 Netra HA Suite Cluster.
Copyright © 2008, Sun Microsystems, Inc. All rights reserved.