Writing Custom Agents

The following explains how to write a custom agent for applications that do not yet have an agent.

  1. Check whether the application can be made highly available on Sun Cluster software.
    "Developing New Data Services" in the Sun Cluster Data Services Developer's Guide lists everything you need to verify your application's cluster readiness.
    Most of the applications can be integrated with Sun Cluster software right out of the box. Sometimes you might have to enhance the application to be able to integrate it with Sun Cluster software.
  2. Once the application is ready for integration, choose whether to use Sun Cluster Agent Builder to generate an agent for you or use the Generic Data Service agent to make your application highly available.
    1* Sun Cluster Agent Builder not only generates the code for you, but it also generates the makefiles to compile the code and builds a nice Solaris package. Then, you can you can easily install this generated package by using the pkgadd utility. Sun Cluster Agent Builder can generate agent source code in C programming language or ksh commands.
    Sun Cluster Agent Builder and the API library is available as a package, SUNWscdsdev, which you can download to your desktop. Download the SUNWscdsdev package from the Sun Download Center and follow the instructions in the Developer's Guide to generate and compile an agent for the Sun Cluster software. You can also get the agent builder when you install the Solaris Cluster Express software.
    1* The Generic Data Service (GDS), as the name suggests, is a generic agent available by default when you install Solaris Cluster Express. GDS takes, as input, scripts that start, stop, validate, and probe an application. Instead of writing a separate agent for your application, you just write scripts to start, stop, validate, and probe your application, and supply these scripts as extension properties to the GDS resource at the time of creation.
    1* Consider using the GDS coding template, which is a set of additonal functions with a methodology on how to customize the template. It enables you to write custom agents for even complex applications, while being able to focus on the real application specific needs. The template has already the common code to interact with GDS and the cluster framework, which is based on several engineers expierience and feedback.
    For further details, refer to the follow documents:
    Sun Cluster Data Services Developer's Guide
    Sun Cluster Concepts Guide
     Information about writing agents for Sun Cluster software is also available in:
Sun&trade Cluster 3 Programming: Integrating Applications into the SunPlex™ Environment (Solaris Series) (Paperback)

 by Joseph Bianco (Author), Peter Lees (Author), Kevin Rabito (Author)
 # ISBN-10: 0130479756
 # ISBN-13: 978-0130479754

  1. To test the agent, the Sun Cluster software must be installed and configured. A single-node cluster can be configured to test an agent. The Sun Cluster 3.2 software and the Sun Cluster agents can be downloaded from the Solaris Cluster download site.
last modified by admin on 2009/10/26 12:08
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.