Veritas Cluster Server 6.0 for UNIX: Example Application Configurations
Example 1: Clustering Applications
Topic ObjectivesApplication service overview
Describe how application services work in an HA environment.
VCS agents for managing applications
Describe how agents manage applications in a VCS environment.
The Application agent Configure the Application agent.
IMF support Configure IMF for preventing concurrency violations with Application resources.
Lesson objectives
After completing this topic, you will be able to describe how application services work in a high availability environment.
Application service overview
Application service overview
Storage
File systemVolume
Disk groupNetwork
10.10.21.198IP address NIC
ApplicationWeb
server
S1
Application requirements
• Start and stop procedures• Clean up capability after operational failures• Automated monitoring facility• Data storage on external shared disks• Restart capability after sudden failures• Support for multiple servers designated as potential hosts:– No license issues tied to individual servers– No host name dependencies
After completing this topic, you will be able to describe how agents manage applications in a VCS environment.
VCS agents for managing applications
VCS agents for managing applications
Bundled and database
Application andPartner
Custom Developed in-house or by Symantec Consulting Services
– Symantec-developed agents– Independent software vendor (ISV) agents – Quarterly updates– Available from sort.symantec.com
Shipped with VCS IP
NICApplication
Zone Ldom
HAD
Key properties of VCS agents• Only one agent daemon runs on a system for each configured resource
type.• An agent runs a single operation on a resource at one time.• Agents can perform operations on multiple resources of the same type in
parallel.• If there are no resources of a particular type anywhere in the cluster, the
agent for that type is not started.• A resource cannot be managed without an agent.
NICIP
Process
HAD
VCS agent functions
• Start a specified program.
• Stop the specified program.
• Monitor the program.
• Clean up after a fault.
Some agents have multilevel monitoring functions.– Basic-level monitoring, which checks the process table for applicable
processes– Second-level monitoring, which simulates client access to the
application
The VCS agent framework
• Agents consist of:– An agent binary file, which contains all necessary
functions within a single binary
or
– An agent binary and a collection of scripts that correspond to agent functions not included in the binary
• Agent functions are referred to as entry points.• Most agents include the online, offline, monitor, and
clean entry points.
onlineoffline
monitor
clean
– Entry points are often implemented as Perl or shell scripts and are easily customized.
– Agents can also be implemented as compiled executable files.
How agents work
$1 webdg$2 webdatadg
DiskGroup webdg ( DiskGroup = webdatadg)
main.cf
hares -online webdg -sys s1
vxdg –t import webdatadg
onlineoffline
monitorclean
type Diskgroup( . . . static str ArgList[] = { DiskGroup . . .}. . .)
types.cf webdg
In-memory configuration
DiskGroup agent
online
HAD
After completing this topic, you will be able to configure the application agent.
The Application agent
The Application agent
• Simplifies managing applications with multiple processes • Enables second-level monitoring• Is easily customized by creating scripts that the agent uses within its
entry points
Entry Point Function
Online Brings an application online
Offline Takes an application offline
Monitor Monitors the status of the application
CleanTakes the application offline or kills all processes specified for the application
Application resource definition
Optional attributesCleanProgram Executable file that forcibly kills the application and
performs cleanup tasksUser UNIX account used as the execute environment for entry
points (the default is root)EnvFile Environment file sourced before running entry points
UseSUDash Runs su – user before running entry points
Required attributesStartProgram Executable file to start applicationStopProgram Executable file to stop applicationPlus one or more of the following:MonitorProgram Executable file to monitor applicationMonitorProcesses List of processes to be monitoredPidFiles List of files containing the process IDs to be monitored
Application resource configuration
Configuration prerequisites– Ensure the application has start and stop programs.– Determine which processes can be used to monitor the application
main.cf
Application payroll_app (StartProgram = “/etc/init.d/payroll start”StopProgram = “/etc/init.d/payroll stop”PidFiles = { “/paydata/payroll.pid” }MonitorProcesses = { “paydebit payvendor” }
)
After completing this topic, you will be able to configure IMF for preventing concurrency violations with Application resources.
IMF support and prevention of concurrency violation
• Type Attributes Defaults:– IMF
• Mode 3 online and offline monitoring• MonitorFreq 1 runs monitor entry point every 1 minute
(MonitorInterval = 60 seconds by default)• RegisterRetryLimit 3
– IMFRegList MonitorProcesses, User, PidFiles, MonitorProgram
– LevelTwoMonitorFreq 0
IMF-related attributes
Supported configurations
MonitorProgram MonitorProcesses PidFiles IMF Mode
n n n n/a
n n Y Online only (2)
n Y n Online, Offline (3)
n Y Y Online, Offline (3)
Y n n None (0)
Y n Y None (0)
Y Y n None (0)
Y Y Y None (0)
• Is enabled by the ProPCV service group attribute (default = 0)• Is supported for Application agent only• Requires IMF enabled and Mode set to 3 (online and offline
monitoring)
Prevention of concurrency violation (PCV) configuration
main.cf snippet
Application myappd ( StartProgram = "/usr/bin/myappd start" StopProgram = "/usr/bin/myappd stop" MonitorProcesses = { " myappd " })
StartProgram example
myappd
• Is only supported for failover service groups• Works only with MonitorProcesses attribute specified• Is not supported if StartProgram refers to a wrapper-type script
Requires exact match between path and arguments in MonitorProcesses attribute and process table
• MonitorProgram and PidFiles attributes cannot can be specified
Limitations of PCV
Lesson summary
• Key points – VCS provides a variety of agents to manage all types of applications.– The Application agent is easily configurable for basic management of an
application.• Reference materials– Veritas Cluster Server Bundled Agents Reference Guide– Veritas Cluster Server Agent Developer’s Guide– Veritas Cluster Server: Install and Configure Course– www.symantec.com
End of Presentation