Sie sind auf Seite 1von 22

Veritas Cluster Server 6.

0 for UNIX:
Example Application Configurations
Example 1: Clustering Applications

Lesson objectives

Topic

Objectives

Application 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.

Application service
overview
After completing this topic, you
will be able to describe how
application services work in a high
availability environment.

Application service overview

Web
server

Application

Storage

Network
IP address
NIC

10.10.21.198

S1

File system
Volume
Disk group

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

VCS agents for


managing
applications

After completing this topic, you


will be able to describe how
agents manage applications in a
VCS environment.

VCS agents for managing applications


Zone
Bundled and database

Shipped with VCS


Application

Application and
Partner

Custom

IP
NIC

Symantec-developed agents
Independent software vendor (ISV) agents
Quarterly updates
Available from sort.symantec.com

Developed in-house or by Symantec Consulting


Services

Ldom

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.
Process
IP
NIC
HAD

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

onlin
eoffline
monitor

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.

Entry points are often implemented as Perl or shell


scripts and are easily customized.
Agents can also be implemented as compiled
executable files.

clean

How agents work


In-memory configuration

vxdg t import webdatadg

types.cf
type Diskgroup(
. . .
static str ArgList[] =
{ DiskGroup . . .}
. . .
)
main.cf
DiskGroup webdg (
DiskGroup = webdatadg
)

webdg
DiskGroup agent
online
offline
monitor
clean

online
$1 webdg
$2 webdatadg

HAD

hares -online webdg -sys s1

The Application
agent
After completing this topic, you
will be able to configure 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

Clean

Takes the application offline or


kills all processes specified for
the application

Application resource definition


Required attributes
StartProgram

Executable file to start application

StopProgram

Executable file to stop application

Plus one or more of the following:


MonitorProgra
m

Executable file to monitor application

MonitorProcess List of processes to be monitored


es
Optional attributes
PidFiles
List of files containing the process IDs to be
CleanProgram monitored
Executable file that forcibly kills the application
and performs cleanup tasks
User

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

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 }
)

IMF support and


prevention of
concurrency violation

After completing this topic, you


will be able to configure IMF for
preventing concurrency violations
with Application resources.

IMF-related attributes
Type Attributes Defaults:
IMF
Mode

MonitorFreq

default)
RegisterRetryLimit

online and offline monitoring


runs monitor entry point every 1 minute
(MonitorInterval = 60 seconds by
3

IMFRegList
MonitorProgram

MonitorProcesses, User, PidFiles,

LevelTwoMonitorFreq

Supported configurations

MonitorProgra
m

MonitorProces
ses

PidFiles

IMF Mode

n/a

Online only (2)

Online, Offline
(3)

Online, Offline
(3)

None (0)

None (0)

None (0)

None (0)

Prevention of concurrency violation (PCV)


configuration
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)

main.cf snippet
Application myappd (
StartProgram = "/usr/bin/myappd start"
StopProgram = "/usr/bin/myappd stop"
MonitorProcesses = { " myappd " }
)

StartProgram example
myappd

Limitations of PCV
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

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 Developers Guide
Veritas Cluster Server: Install and Configure Course
www.symantec.com

End of Presentation

Das könnte Ihnen auch gefallen