sap lvm customer instances
Post on 22-Jan-2018
111 Views
Preview:
TRANSCRIPT
• This is the first in a series of presenta/ons dedicated to SAP Landscape Virtualiza/on Management (LVM)
• This document provides a quick overview of how you can customize LVM to operate custom instances
• This document describes how this can be achieved in a UNIX environment but can be easily adapted for the Windows plaKorm
• The document is aimed at system administrators responsible for configuring and opera/ng SAP LVM
Introduc5on
Overview • SAP LVM can manage SAP instances and databases using the
SAP Host Agent
• SAP LVM can be extended to manage custom instances such as SAP Replica/on Server (SRS) via the SAP Host Agent
• Custom instances are managed using SAP Host Agent registered scripts
Generic Opera5ons • For each custom instance type that you want to manage within
SAP LVM you create a set of generic opera/ons as follows: Ø Detect Ø Monitor
Ø Start/Stop Ø Validate Ø ATach/Detach Ø Getproper/es
Generic Opera5on Scripts • The generic opera/ons are defined in configura/on files stored in the
exe/pera/ons.d subdirectory of the host agent file system on the managed host
• Each generic opera/on configura/on file must use the following naming conven/on o Detect – acc_<custominstance-‐type>_list o Monitor – acc_<custominstance-‐type>_monitor o Start/Stop – acc_<custominstance-‐type>_start/stop o Validate – acc_<custominstance-‐type>_validate o ATach/Detach – acc_<custominstance-‐type>_aTach/detach o Getproper/es – acc_<custominstance-‐type>_getproper/es
• To operate a custom instance the minimum requirement is to configure the detect, monitor and start/stop opera/ons
Example for SRS -‐ Overview • Each configura/on file should reference an opera/ng system script that
performs the corresponding opera/on • Posi/ve responses are reported to SAP LVM by echoing a string star/ng with
[RESULT] • Nega/ve responses are reported to SAP LVM by echoing a string star/ng
with [ERROR] • Responses returned by the opera/ng system scripts are visible in the SAP
LVM log • For this example we will configure the following files:
1 Detect – acc_SRS_list.conf 2 Monitor – acc_SRS_monitor.conf 3 Start – acc_SRS_start.conf 4 Stop – acc_SRS_stp.conf
Example for SRS -‐ Configura5on
File Content
acc_SRS_list.conf Name: acc_SRS_list Command: /sap/Scripts/Custom_Instance_SRS_Detect.ksh Workdir: $[DIR_HOME:#sapparam] Username: sapadm ResultConverter: hook
acc_SRS_monitor.conf Name: acc_SRS_monitor Command: /sap/Scripts/Custom_Instance_SRS_Monitor.ksh Workdir: $[DIR_HOME:#sapparam] Username: sapadm ResultConverter: flat
acc_SRS_start.conf Name: acc_SRS_start Command: /sap/Scripts/Custom_Instance_SRS_Operate.ksh START Workdir: $[DIR_HOME:#sapparam] Username: sapadm ResultConverter: hook
acc_SRS_stop.conf Name: acc_SRS_stop Command: /sap/Scripts/Custom_Instance_SRS_Operate.ksh STOP Workdir: $[DIR_HOME:#sapparam] Username: sapadm ResultConverter: hook
Example for SRS -‐ Scrip5ng
File Sample Coding (perform any site specific checks beforehand)
Custom_Instance_SRS_Detect.ksh
echo "[RESULT]: SAP Replication Server host detected” echo "service_name="${SID}"_REP;service_caption=SAP Replication Server;system_sid="${SID}
Custom_Instance_SRS_Monitor.ksh
/usr/sap/hostctrl/exe/saphostctrl -function GetDatabaseStatus -dbname ${SID}_REP -dbtype syb >> /tmp/log STATUS_DB=`grep "Database Status" /tmp/log | awk '{print $3}'` STATUS_RS=`grep "Replication" /tmp/log | awk '{print $10}'` STATUS_DR=`grep "Agent" /tmp/log | awk '{print $10}'` echo "service_name="${SID}"_REP;service_status="${STATUS_DB} echo "process_name=DRA;process_description=DR Agent;process_status="${STATUS_DR} echo "process_name=SRS;process_description=Replication Server;process_status="${STATUS_RS}
Custom_Instance_SRS_Operate.ksh OPERATION=$1 case $OPERATION in START) echo "[RESULT]: Start operation request detected" host_oper="StartDatabase";; STOP) echo "[RESULT]: Stop operation request detected" host_oper="StopDatabase";; esac /usr/sap/hostctrl/exe/saphostctrl -function ${host_oper} -dbname ${SID}_REP -dbtype syb
top related