martedì 6 luglio 2010

Oracle - Manage third party application using Oracle 11r2 RAC Clusterware - VIP, CFT Monitor & Beta 48 Agent


1. ADD VIP RESOURCE TYPE

Resource type creation (object used to organize re source with similar configuration).
Create this object using root user.
/u01/app/grid/bin/crsctl add type app.appvip.type -basetype ora.cluster_vip_net1.type
Command line explanation.
Name
Value
Explanation
crsctl add type
app.appvip.type
Name of new type
basetype
ora.cluster_vip_net1.type
Default definitions collector for a creation of a New VIP Resource Type.

2. ADD VIP

Create a Virtual IP Address used to manage communications of the applications i need to manage with Hight Availablility . This resource would be the father resource, the others follow it during the server switch.
Before creating the resource set the new ip address in the hosts file
Create this object using oracle user.
/u01/app/grid/bin//crsctl add resource app.appvip -type app.appvip.type
-attr "RESTART_ATTEMPTS=2,
START_TIMEOUT=100,STOP_TIMEOUT=100,CHECK_INTERVAL=10,
USR_ORA_VIP=xxx.xxx.xxx.xxx,
START_DEPENDENCIES=hard(ora.net1.network)pullup(ora.net1.network),
STOP_DEPENDENCIES=hard(ora.net1.network)"
Command line explanation.
Name
Value
Explanation
crsctl add resource
app.appvip
Name of the new resourse
Type
app.appvip.type
Default definitions collector for a creation of a New VIP Resource.
RESTART_ATTEMPTS
2
Oracle Clusterware try to start 2 time the re source
START_TIMEOUT
100
Oracle Clusterware wait 100 seconds for the end of the action script before fail the start operation .
STOP_TIMEOUT
100
Oracle Clusterware wait 100 seconds for the end of the action script before fail the stop operation .
CHECK_INTERVAL
10
Oracle Clusteware check every 10 seconds if the application is working.
USR_ORA_VIP
xxx.xxx.xxx.xxx
Virtual IP Address
START_DEPENDENCIES
ora.net1.network)pullup(ora.net1.network)
Resource has an hard start dependencies (indicated re source nust be active before new re source can start) and pullup (new resource start autmotcly when the indicated resource start) with the eth1 system board.
STOP_DEPENDENCIES
hard(ora.net1.network)
Resource has an hard start dependencies (new resource stopped when indicated resource stop) with the eth1 system board

Give re source ownersheep to the root user. Make this operation using user root.
/u01/app/grid/bin/crsctl setperm resource app.appvip –o root
Command line explanation.
Nome
Valore
Descrizione del Valore
crsctl setperm resource
app.appvip
Resource name
-o
Root
The user root become the owner
Give reading and execution permission to the user oracle. Make this operation using user root.
/u01/app/grid/bin/crsctl setperm resource app.appvip –u user:oragrp:r-x
Command line explanation.
Nome
Valore
Descrizione del Valore
crsctl setperm resource
app.appvip
Resource name
-u
user:oragrp:r-x
Update of the ACL living reading and execution permission to the user oracle.

3. ACTION SCRIPT

Put the action script in the folder $CRSHOME/crs/public living them permission 755.
The used action script for are at the end of this document.

4. ADD REOUSRCE BETA48

Creation of the re source managing the Hight Availability of the application Beta 48. Make this operation using user root.
/u01/app/grid/bin/crsctl add resource appBeta48 -type cluster_resource
-attr "ACTION_SCRIPT=/u01/app/grid/crs/public/ASBeta48.scr, PLACEMENT='restricted',
SERVER_POOLS=Generic,CHECK_INTERVAL='30',RESTART_ATTEMPTS='2',
START_DEPENDENCIES='hard(app.appvip) pullup(app.appvip)',
,STOP_DEPENDENCIES='hard(app.appvip)', STOP_TIMEOUT='30' "

Command line explanation.
Nome
Valore
Descrizione del Valore
crsctl add resource
appBeta48
Resource name
Type
Cluster_resource
Default definitions collector for a creation of a New Resource. This type is able to manage the re location of the application thrue the Cluster nodes .
ACTION_SCRIPT
=/u01/app/grid/crs/public/ASBeta48.scr
Oracle Clusterware run this script using the parameters start (to start the application), stop (to stop the application), clean (to force stop the application) e check (tho check the state of the application).Oracle Clusterware need the return code 0 if the command has a positive end 1 if the command has a negative end.
PLACEMENT
Restricted
The application can run only in the server of the SERVER POOLS
SERVER_POOLS
Generic
The application can run only in the server indicated in this server pools. This is a default one containing al the server managed by Oracle Clusterware.
CHECK_INTERVAL
30
Oracle Clusteware check every 30 seconds if the application is working. It use the action script with the parameter check.
RESTART_ATTEMPTS
2
Oracle Clusterware try to start 2 time the re source
START_DEPENDENCIES
'hard(app.appvip) pullup(app.appvip)
Resource has an hard start dependencies (indicated re source nust be active before new re source can start) and pullup (new resource start autmotcly when the indicated resource start) with the resource app.appvip.
STOP_DEPENDENCIES
'hard(app.appvip)'
Resource has an hard start dependencies (new resource stopped when indicated resource stop) with the resource app.appvip.
STOP_TIMEOUT
30
Oracle Clusterware wait 30 seconds the end of the action script before declare the failure of the stop operation.
Give reading and execution permission to the user oracle. Make this operation using user root.
/u01/app/grid/bin/crsctl setperm resource appBeta48 –u user:oracle:r-x
Command line explanation.
Nome
Valore
Descrizione del Valore
crsctl setperm resource
appBeta48
Resource name
-u
user:oracle:r-x
Update of the ACL living reading and execution permission to the user oracle.