hejia0105 发表于 2012-02-21 11:29

Sun Cluster 3.2 注册资源 (APP为例)

资源类型文件 company.App:
RESOURCE_TYPE = "APP";
VENDOR_ID = company;
RT_DESCRIPTION = "APP server for Sun Cluster";

RT_VERSION ="1.0";
API_VERSION = 2;       
FAILOVER = TRUE;

RT_BASEDIR=/opt/companyAPP/bin;
PKGLIST = companyAPP;

START                           =       APP_svc_start.ksh;
STOP                            =       APP_svc_stop.ksh;

VALIDATE                        =       APP_validate.ksh;
UPDATE                        =       APP_update.ksh;

MONITOR_START                   =       APP_mon_start.ksh;
MONITOR_STOP                  =       APP_mon_stop.ksh;
MONITOR_CHECK                   =       APP_mon_check.ksh;
{
        PROPERTY = Start_timeout;
        MIN = 60;
        DEFAULT = 300;
}
{
        PROPERTY = Stop_timeout;
        MIN = 60;
        DEFAULT = 1800;
}
{
        PROPERTY = Validate_timeout;
        MIN = 60;
        DEFAULT = 300;
}
{
      PROPERTY = Update_timeout;
        MIN = 60;
      DEFAULT = 300;
}
{
        PROPERTY = Monitor_Start_timeout;
        MIN = 60;
        DEFAULT = 300;
}
{
        PROPERTY = Monitor_Stop_timeout;
        MIN = 60;
        DEFAULT = 1800;
}
{
        PROPERTY = Monitor_Check_timeout;
        MIN = 60;
        DEFAULT = 300;
}
{
      PROPERTY = FailOver_Mode;
      DEFAULT = SOFT;
      TUNABLE = ANYTIME;
}
{
      PROPERTY = Network_resources_used;
      TUNABLE = WHEN_DISABLED;
        DEFAULT = "";
}
{
        PROPERTY = Thorough_Probe_Interval;
        MAX = 3600;
        DEFAULT = 60;
        TUNABLE = ANYTIME;
}
{
        PROPERTY = Retry_Count;
        MAX = 10;
        DEFAULT = 2;
        TUNABLE = ANYTIME;
}
{
        PROPERTY = Retry_Interval;
        MAX = 3600;
        DEFAULT = 360;
        TUNABLE = ANYTIME;
}

{
        PROPERTY = Port_list;
        DEFAULT = ;
        TUNABLE = AT_CREATION;
}

{
      PROPERTY = Scalable;
        DEFAULT=false;
      TUNABLE = AT_CREATION;
}

{
      PROPERTY = Load_balancing_policy;
      DEFAULT = LB_WEIGHTED;
      TUNABLE = AT_CREATION;
}

{
      PROPERTY = Load_balancing_weights;
      DEFAULT = "";
      TUNABLE = ANYTIME;
}

#
# Extension Properties
#

# Not to be edited by end user

{
        PROPERTY = Confdir_list;
        EXTENSION;
        STRINGARRAY;
        DEFAULT = "";
        TUNABLE = AT_CREATION;
        DESCRIPTION = "The Configuration Directory Path(s)";
}

# These two control the restarting of the fault monitor itself
# (not the server daemon) by PMF.
{
        PROPERTY = Monitor_retry_count;
        EXTENSION;
        INT;
        DEFAULT = 4;
        TUNABLE = ANYTIME;
        DESCRIPTION = "Number of PMF restarts allowed for the fault monitor";
}

{
        PROPERTY = Monitor_retry_interval;
        EXTENSION;
        INT;
        DEFAULT = 2;
        TUNABLE = ANYTIME;
        DESCRIPTION = "Time window (minutes) for fault monitor restarts";
}

# Time out value for the probe
{
        PROPERTY = Probe_timeout;
        EXTENSION;
        INT;
        MIN = 2;
        DEFAULT = 60;
        TUNABLE = ANYTIME;
        DESCRIPTION = "Time out value for the probe (seconds)";
}

# Child process monitoring level for PMF (-C option of pmfadm)
# Default of -1 means: Do NOT use the -C option to PMFADM
# A value of 0-> indicates the level of child process monitoring
# by PMF that is desired.
{
        PROPERTY = Child_mon_level;
        EXTENSION;
        INT;
        DEFAULT = -1;
        TUNABLE = ANYTIME;
        DESCRIPTION = "Child monitoring level for PMF";
}
# User added code -- BEGIN vvvvvvvvvvvvvvv
# User added code -- END   ^^^^^^^^^^^^^^^

hejia0105 发表于 2012-02-21 14:14

#:下面操作在主备机上都做
mkdir -p /opt/APP
mkdir /opt/APP/bin
mkdir /opt/APP/etc
cpcompany.App /opt/APP/etc
#下面的APP/目录下包含APP的启动停止,监控脚本
#包括:START                           =       APP_svc_start.ksh;
#STOP                            =       APP_svc_stop.ksh;
#VALIDATE                        =       APP_validate.ksh;
#UPDATE                        =       APP_update.ksh;
#MONITOR_START                   =       APP_mon_start.ksh;
#MONITOR_STOP                  =       APP_mon_stop.ksh;
#MONITOR_CHECK                   =       APP_mon_check.ksh;

cp APP/* /opt/APP/bin

rm /opt/APP/bin/company.App

chmod a+x /opt/APP/bin/*
        ln -s /opt/APP/etc/ company.App /usr/cluster/lib/rgm/rtreg/company.App
       

#下面操作只在主机上操作
scrgadm -a -t company.App
scrgadm -a -j app_rs -g oss_rg -t company.App -y Scalable=false -y \
Resource_dependencies_offline_restart=sybase_rs

页: [1]
查看完整版本: Sun Cluster 3.2 注册资源 (APP为例)