< Previous | Next > | |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide |
Developing an Agent: OverviewBefore creating the agent, some considerations and planning are required, especially regarding the application for which the agent is created. Applications ConsiderationsThe 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: 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. Each instance of an application must be capable of being stopped by a defined procedure. Other instances of the application must not be affected. The application must be capable of being stopped cleanly, by forcible means if necessary. 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. 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. 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. The application must be host-independent within a cluster; that is, there are no licensing requirements or host name dependencies that prevent successful failover. The application must run properly with other applications in the cluster. Creating an Agent: HighlightsThe 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 DefinitionCreate 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 AgentDecide 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 PointsThe procedures and guidelines for creating the entry points are described in Implementing Entry Points Using C++ and Implementing Entry Points Using Scripts.
Test the AgentTest 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 |