#
set -u
#
#
##############################
#
# call specific setup
# CIBREMOTE - set user@host to define where to run the changes, empty for localhost
# WOW_SIMULATE - set to yes to get an simutate output; set to no to run real updates
#
CIBREMOTE=""
WOW_SIMULATE=no
#
##############################
#
# cluster specific setup
# ALLNODES - set the cluster node names separated by a blank 
# NRNODES - set to number of nodes (should be set automatically)
#
ALLNODES="rx3007 rx3008"
NRNODES="$(echo $ALLNODES | wc -w)"
#
##############################
#
# ipmi specific setup
# IPMIADDRESSES - list of ipmi board adresses for all nodes; list items are seaparated by blanks and must match the oder of the cluster node definition (ALLNODES)
# IPMISETTINGS -  definition of the cluster wide ipmi settings such as ipmi userid and ipmi password
#
IPMIADDRESSES='10.31.17.254 10.31.18.254'
IPMISETTINGS="IPMI_USERID=stonith IPMI_PASSWD=f@nce IPMI_STATUSMODE=ok"
#
#############################
#
# sap resource definition
# GRPID - Define your SAP resource group name here; default is grp_sap_$SAPSID
# SAP_SCORES - Scores to run the entrire sap group on the first, second, ... node; the list items are separated by blanks; the order must match the cluster node definition (ALLNODES)
# IP_LABELS - list of ipnames and ipadresses to be configured as resouces for the group; each list item has the format name,address; list items are separated by blanks
# SAPSID - SAP system id like C11, WAS or WOW (upper case); Is there anybody out there, which could remeber the good old C11 SAP1.1 systems?
# SAPsid - automatically set SAP system id in lower case
# SAP_INSTANCE_DEF - Table with definition of the SAP instances; each row defines the instance type; instance name; profile path and optional parameters which might be needed by more complex resource definitions; 
# SFEX_DEVICE -	defines the path of the sfex devices to be used to add more security to the cluster
# SFEX2_DEVICES - defines the paths of two parallel sfex devices to be used for special cases
# SFEXID - defaults to 1; needs to be set, when you need to have more than one sfex device in different groups
# SFEX_INDEX - defines the sfex index (default to be used 1)
# RAID1_DEVICES - defines the paths of the md devices to be used in the resource group
# RAID_CONFIG - defines the path of the raid configuration file for cluster controlled md devices
# LVM_VOLUMEGROUPS - defines the list of volume groups to be used
# FS_FILESYSTEMS - here document to make the defintion more easy for standard cases
#
SAPSID=NA0
#
DBTYPE=ADA
#
GRPID=grp_sap_$SAPSID
#
SAP_SCORES="1000 0"
#
IP_LABELS="sapna0ci,10.31.17.101 sapna0db,10.31.17.102 sapna0as,10.31.17.103"
#
SAPsid=$(echo $SAPSID|tr [:upper:] [:lower:])
#
### SAP Instances
#
SAP_INSTANCE_DEF=$(cat <<HERE-SAP
# instance-typ instance-name                  profile-path                                                  optional-parameters
ASCS           ${SAPSID}_ASCS00_sapna0as    /usr/sap/${SAPSID}/SYS/profile/START_ASCS00_sapna0as
CI             ${SAPSID}_DVEBMGS02_sapna0ci /usr/sap/${SAPSID}/SYS/profile/START_DVEBMGS02_sapna0ci
HERE-SAP
)
#
### IO stack
#
echo "CHECK: define the correct sfex devices"
SFEX_DEVICE="/dev/disk/by-id/scsi-360a98000486e5337524a4f6a484f5147-part1"
SFEX_INDEX=1
#
RAID1_DEVICES="/dev/md1"
RAID_CONFIG="/clusterconf/$SAPSID/mdadm.conf"
#
LVM_VOLUMEGROUPS="sapvg"
#
FS_FILESYSTEMS=$(cat <<HERE-FS
/dev/sapvg/usrsap /usr/sap    usrsap
/dev/sapvg/sapmnt /sapmnt sapmnt
/dev/sapvg/sapdb /sapdb sapdb
HERE-FS
)
#
echo "OK Settings END"
