Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Agent Developer's Guide   

Developing an Agent: Overview

Before creating the agent, some considerations and planning are required, especially regarding the application for which the agent is created.

Applications Considerations

The application for which a VCS agent is developed must be capable of being controlled by the agent and be able to operate in a cluster environment. The following criteria describe an application that can successfully operate in a cluster:

    Checkmark  The application must be capable of being started by a specific command or set of commands. Specific commands must be available to start the application's external resources such as file systems and IP addresses.

    Checkmark  Each instance of an application must be capable of being stopped by a defined procedure. Other instances of the application must not be affected.

    Checkmark  The application must be capable of being stopped cleanly, by forcible means if necessary.

    Checkmark  Each instance of an application must be capable of being monitored. Monitoring can be simple or in-depth. Monitoring an application becomes more effective when the monitoring test resembles the actual activity of the application's user.

    Checkmark  The application must be capable of storing data on shared disks rather than locally or in memory, and each cluster system must be capable of accessing the data and all information required to run the application.

    Checkmark  The application must be crash-tolerant, that is, it must be capable of being run on a system that crashes and of being started on a failover node in a known state. This typically means that data is regularly written to shared storage rather than stored in memory.

    Checkmark  The application must be host-independent within a cluster; that is, there are no licensing requirements or host name dependencies that prevent successful failover.

    Checkmark  The application must run properly with other applications in the cluster.

Creating an Agent: Highlights

The steps to create and implement an agent are described by example in Building a Custom VCS Agent. Highlights of those steps are described here.

Create the Resource Type Definition

Create a file containing the resource type definition. Name the file ResourceTypeTypes.cf. This file is referenced as an "include" statement in the VCS configuration file, main.cf. See Resource Type Definitions.

Decide to Use C++ or Scripts to Implement the Agent

Decide whether to implement the agent entry points using C++ code, scripts, or a combination of the two. There are advantages and disadvantages implementing entry points in either method. Refer to Agent Entry Points and review the description of Using C++ or Script Entry Points.

Create the Entry Points

The procedures and guidelines for creating the entry points are described in Implementing Entry Points Using C++ and Implementing Entry Points Using Scripts.

  • Use the sample files in $VCS_HOME/src/agent/Sample to create a C++ agent or agent using entry points written in C++ and scripts. Build the agent binary. Place it in the directory $VCS_HOME/bin/resource_type.
  • Use the ScriptAgent to build an agent using only script entry points.
  • Install script entry point files in the directory $VCS_HOME/bin/resource_type.

Test the Agent

Test the agent by defining the resource type in a VCS configuration. See Testing VCS Agents.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Agent Developer's Guide  
VERITAS Software Corporation
www.veritas.com