Explaining the Architecture of SAP Landscape Management

Objectives

After completing this lesson, you will be able to:

  • Explain the architecture of SAP Landscape Management

Architecture of SAP Landscape Management

A classic SAP landscape has three tiers. A development system is designated for custom-coded SAP elements and customized SAP applications. The quality assurance system is used to verify all changes coming from the development system before it is shipped to the productive system and may contain clients for Integration Testing, User Acceptance Testing and Training. The productive system itself will provide core business processes and hold all live data of the company.

How does this apply to SAP Landscape Management?

Compared to other SAP solutions, SAP Landscape Management doesn’t have a high demand on resources nor will SAP Landscape Management hold any company business data, because it is not necessary as an orchestration and automation tool. But still there is a need to have more than one SAP Landscape Management installed.

The first approach will be the single system installation (1-Tier). While having only one SAP Landscape Management installed, the maintenance of that single system is easy and fast. There is only one NetWeaver JAVA system to keep up to date. All automation is used during normal office hours and planned, or unplanned downtimes of SAP Landscape Management has no effect on business processes. Customization and testing need to take place in the same system, and it must be acknowledged that side effects may occur.

The second approach is a 2-Tier setup. The 2-Tier setup comes in two versions, one to separate customizing and testing from the productively used SAP Landscape Management, and secondly in a variant of using inbuilt synchronization functionality to make SAP Landscape Management highly available.

The 2.1 approach is having a second installment of SAP Landscape Management, which is purely to create customizing and is used for testing. While creating custom operations, hooks or custom processes, the configuration has to be applied to SAP Landscape Management and as you’ll see later in this course it can lead to problems when not setting constraints. If you apply customizing to SAP Landscape Management, it will automatically be available to every other system configured in SAP Landscape Management. Constraints provide a possibility to secure this customizing to be used only for a set of certain systems.

However, constraints must be set by the developer and this is when human error can occur. In a separated SAP Landscape Management, the need to set constraints is simply not given or in other words has no impact on productive SAP Landscape Management automation.

Approach 2.2 is intended to provide a high availability or failover option to SAP Landscape Management. Of course, as SAP Landscape Management is running on SAP NetWeaver JAVA, high availability can be covered by setting up a third party cluster solution or by using database functionality to make the system highly available. These options will require a more complex setup and third party licenses. SAP Landscape Management has an inbuilt synchronization functionality to replicate the configuration to a second installation of SAP Landscape Management. The synchronization setup will take place in the secondary SAP Landscape Management instance, not in the productive instance.

The settings about synchronization options can be found in SetupSettingsSynchronization/Standby. SAP Landscape Management offers several timing options, from daily, weekly, to expert.

In case daily synchronization is too frequent and weekly is too infrequent, the expert will help to set it up the way it fits best. The expert setting uses an input array in the following form:

Year : Month : Day of Month : Day of Week : Hours : Minutes

The format varies among the input parameters. The first parameter, Year, is provided in the format of YYYY. The Month needs to be provided with a value of 0 to 11, while 0 represents January. Days of Month (DoM) can have the value 1 to 31, depending on the month. Days of Week (DoW) will need an input of 1 to 7, while 1 represents Sunday. Hours can be specified with values from 0 to 23. In combination with the input parameter Minutes, value 0 to 59, you are able to set the exact time. Schedules for multiple days of the month or week can be addressed by using a separator, (comma), for example, 2019:10:*:2,4,6:19:0.

SAP Landscape Management offers three different ways to sync. The first and easiest one to use is the direct way. In this method, the secondary SAP Landscape Management will connect to the primary SAP Landscape Management to export the data. You have to specify the URL inside the settings of your secondary SAP Landscape Management.

The second option is called Destination. It’s similar to the direct method but you don’t have to configure the connection details in here. For this method, you have to create a HTTP Destination inside of the NetWeaver Administrator (NWA) of your JAVA Stack where SAP Landscape Management is running. The destination must be named LaMa_Synchronization and should have the necessary information.

Last but not least, the third option is via Upload. This option can be used if both SAP Landscape Management, primary and secondary, can’t reach each other directly. The XML export can be exported and placed to the location specified here. The secondary system will retrieve the file from the location.

For all options you need to set up a password to decrypt the data coming from the production SAP Landscape Management. The password used to create the XML export must match the password provided here. In case of direct syncs, this password is not transferred. Instead it must be configured as well inside the productive SAP Landscape Management to be used as a default encryption password.

Find the configuration here: SetupSettingsEngine

Another option is the Standby Mode. Activating the Standby Mode means the development SAP Landscape Management will receive updates, configuration wise, but is not operational. In case of a planned or unplanned outage of your productive SAP Landscape Management, you can switch off the Standby Mode option to enable the development SAP Landscape Management to become operational again.

While setting up the Standby Mode, certain jobs SAP Landscape Management usually does are disabled. This is mandatory if customers want to use the Standby Mode. If you want to enable one of these services, you will not be able to be in Standby Mode.

But still, to enable one of these jobs will enable your secondary SAP Landscape Management to operate as you wish and will mainly answer the question of:

Can I use my secondary SAP Landscape Management as development and failover instance at once?

Yes, your development SAP Landscape Management can be used as development and failover instance at the same time.

But there are some things to keep in mind:

  • Monitoring data – if you activate the monitoring job both SAP Landscape Management will use the host agent to pull monitoring data. This means a higher load in network traffic, especially in bigger landscapes and can lead to timeouts.

  • The same applies for the Landscape Scanner. The Landscape Scanner can be used to discover your SAP landscape and bring in new SAP systems to SAP Landscape Management.

  • If you’re using our Scheduler, make sure to deactivate the Task Planner job inside the secondary instance. This will disable the possibility to test anything in regards to scheduling.

  • The most dangerous part is to keep track of who is using which SAP Landscape Management. Inside SAP Landscape Management, the engine makes sure that duplicate operations can’t be triggered on the same instance, either host or virtual host. Between two SAP Landscape Management systems this is not handled. Only when Standby Mode is activated and all Jobs are disabled, then the secondary is not operational and explicitly needs to be enabled, if needed.

  • Release Updates for SAP Landscape Management can be tested in your second instance of SAP Landscape Management. In rare cases where you have just updated the development instance as an unplanned event, you will need to switch from the prod-instance to the dev-instance.

Host Agent

The SAP host agent is the entry gate for SAP Landscape Management to execute operations on an OS level. You can configure the SAP host agent on every managed system to enable SAP Landscape Management to start and stop instances and to monitor the status of computer systems. SAP Landscape Management software needs the latest version of SAP host agent 7.21. A validation error is thrown in SAP Landscape Management, if the SAP host agent version is older than 7.21. Installing SAP Adaptive Extention 1.0 adds additional functionalities to the SAP host agent.

Note
  • Host agent upgrade is also possible via the SAP Landscape Management UI (using a host agent release configuration repository) but not yet covered in this course.
  • To find out more please search for "upgrade SAP host agent" in the SAP Landscape Management Help Portal.

The following table shows the SAP host agent executable programs and services:

Executable programs of SAP Host Agent

ServiceDescription
The SAP Host Exec Service

SAP Host Exec is a service or daemon that only runs under privileged user accounts such as root on UNIX or Local System on Windows.

It hosts the life-cycle management processes of the SAP Host Agent itself, such as upgrade and installation.

The SAP Start Srv Service SAP Host Control

SAP Host Control runs within the SAP Host Agent under the sapadm user.

It should not be confused with SAP Start Srv which runs under the <sapsid>adm user in the SAP in the SAP system instance with the instance profile.

The OS System Collector SAP OS Col

SAP OS Col is a stand-alone program that runs in the OS background and runs independently of SAP instances exactly once per monitored host.

It collects data about OS resources including the following:

  • Usage of virtual and physical memory.

  • CPU utilization

  • Utilization of physical disks and file systems.

  • Resource usage of running processes.

It also makes the data available using a segment of the shared memory for various applications and all SAP instances on a host.

The figure, Upgrading the SAP Host Agent - Option I - Overview, provides an overview of process option one when upgrading the SAP Host Agent.

You can perform the upgrade using the following commands:

Commands for the upgrade per OS

OSCommand
Windows#%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe" —upgrade —archive <path to downloaded SAPHOSTAGENT<SP-version>.SAR>

It is recommended that you use the additional parameter, -verify to verify the content of the installation package against the SAP digital signature.

UNIX

If you are logged on as a user with root authorization, the command is as follows: /usr/sap/hostcrtl/exe/saphostexec —upgrade —archive <path to downloaded SAPHOSTAGENT<SP-Version>.SAR>

If you are logged in as a member of the sapsys group, for example sapsid, the command is as follows: /usr/sap/hostcrtl/exe/saphostexecstart —upgrade <path to downloaded SAPHOSTAGENT<SP-Version>.SAR>

It is recommended that you use the additional parameter, -verify to verify the content of the installation package against the SAP digital signature.

IBM Iusr/sap/hostcrtl/exe/saphostexec —upgrade —archive <path to downloaded SAPHOSTAGENT<SP-Version>.SAR>

It is recommended that you use the additional parameter, -verify to verify the content of the installation package against the SAP digital signature.

Once the upgrade is completed successfully, you can check the version of the upgraded host agent using the following commands:

Commands to check the version of the upgraded host per OS

OSCommand
Windows"%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe" -version
UNIX

If you are logged on as a user with root authorization, the command is as follows:/usr/sap/hostctrl/exe/saphostexec -version

If you are logged on as a member of the sapsysgroup, for example <sapsidadm, the command is as follows: /usr/sap/hostctrl/exe/hostexecstart -version

IBM I/usr/sap/hostctrl/exe/saphostexec-version

For IBM I, you can leave the PASE interactive terminal session using function key F3.

The figure, Upgrading the SAP Host Agent - Option II - Overview, provides an overview of second process option for upgrading the SAP host agent. Once the upgrade is completed successfully, you can check the version of the upgraded host agent using the same commands mentioned in Option I.

The figure, Upgrading the SAP Host Agent - Option III - Overview, provides an overview of the third process option for upgrading the SAP Host Agent.

In Option III, the SAP host agent is enabled to check for updates automatically. It gets upgraded if a version of the SAP host agent is found that is higher than the existing one.

Running the saphostexec executable regularly to check a directory, $DIR_NEW or %ProgramFiles%\SAP\hostcrtl\new, you expect to find the latest version of the executable of SAP host agent from the unpacked SAPHOSTAGENT.SAR. The upgrade is only performed if a version of the SAP host agent executable programs is found in the $DIR_NEW directory that is higher than the version of the executable programs that exist in the SAP host agent executable directory.

When executing Option III for upgrading the SAP host agent consider the following tips:

  • Avoid an incomplete upgrade of the SAP Host Agent:

    • Create the .upgrading file in the $DIR_NEW directory, for example, use the command, touch.upgrading

    • Extract SAPHOSTAGENT<SP-version>.SAR to $DIR_New

    • Remove .upgrading from the $DIR_NEW directory

    This will prevent saphostexecs from starting the upgrade during the extraction of SAPHOSTAGENT<SP-version>.SAP.

  • Configure the delayed auto-upgrade of SAP host agent to avoid network bottlenecks:

    • Create a file in $DIR_NEW called .delay

    • Format the file as follows: <Value1> random- <Value2>

      • <Value1> represents the number of minutes after an auto-upgrade is checked

      • <Value2> represents the maximum value of minutes after which the auto-upgrade starts

        For example, 500random500: means the auto-upgrade checks the version of the file contained in $DIR_NEW every 500 minutes and if it finds a newer version it starts the upgrade within the next 500 minutes.

    If all machines start to access a single network share, it could result in a network bottleneck.

    To avoid this kind of problem, for large landscapes you can create the configuration .delay additionally.

For Unix, use the command, ls -ltra, to check if .upgrading exists in the directory, $DIR_NEW. You should see that .upgrading has been created as a hidden file.

You can manually control the SAP host agent using the saphostexec program. Call the program from the command line with the follows:

Command lines to start saphostexec per OS

OSCommand
Unix or IBM I/usr/sap/hostctrl/exe/saphostexec —[OPTION] [pf=<ProfilePath>]
Windows%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe —[OPTION] ] [pf=<ProfilePath>]

<ProfilePath> is the path to the profile file (host profile) of the SAP host agent. By default the profile file is located in the executable directory of the SAP Host Agent.

You can execute hostexecstart with the following command line options:

Command line options of hostexecstart

OptionDescription
-help

Lists all command line options of saphostexec with documentation.

-install [-verify]

Installs the SAP Host Agent.

-upgrade [-verify] [-archive]

Upgrades SAP Host Agent.

Without further parameters you run this option with the saphostexec executable from the extracted SAPHOSTAGENT<PL-target version>.SAR archive.

-uninstall

Uninstalls the SAP Host Agent.

-restart

Starts or restarts the SAP Host Agent.

-stop

Stops a running SAP Host Agent.

-status

Returns the status of the SAP Host Agent.

-version

Returns the version of the SAP Host Agent with detailed information.

The hostexecstart executable allows you to perform some control operations relevant for the lifecycle of the SAP host agent, if you do not have root authorization.

You have to be a member of the group sapsys, for example, <sapsid>adm, to be able to execute the program. You call the program from the command line with the following syntax: /usr/sap/hostctrl/exe/saphostexec —[OPTION] [pf=<ProfilePath>]. Calling saphostexec without any arguments starts the SAP host agent.

You can execute saphostexec with the following command lines:

Command line options of saphostexec

OptionDescription
-help

Lists all command line options of saphostexec with documentation.

-upgrade <path to downloaded SAPHOSTAGENT<SP-version>.SAR>

Upgrades the SAP Host Agent using the path to the downloaded SAPHOSTAGENT<SP-version>.SAR.

-start

Starts SAP Host Agent if it is not running.

-restart

Restarts SAP Host Agent.

-status

Returns the information whether the SAP Host Agent is running or not running.

-version

Returns the version of SAP Host Agent with detailed information.

Host Agent Installation

Installation of SAP Host Agent

You can configure or install the SAP host agent on every managed host to enable SAP Landscape Management by doing the following:

  • Start, stop, and relocate instances.

  • Monitor and detect instances.

  • Clone, copy, and refresh systems.

The installation process occurs as follows:

  • Automatically alongside SAP systems

  • Standalone using SWPM

  • Manually matching own requirements

The automatic upgrade procedure occurs via a shared directory. A manual upgrade is possible as well.

Setup of SAP Landscape Management

The SAP host agent is installed automatically during the installation of all new SAP system instances or instances with SAP Kernel 7.20 or higher. SAP Landscape Management needs the latest version of SAP Host Agent 7.21. There is a validation check in SAP Landscape Management, which runs regularly and shows the SAP host agent version for the managed system. If the SAP host agent version is lower than 7.21, a validation error is thrown:

  • Starting SAP NW 7.1, host agent is installed or started automatically during the installation.
  • SAP Landscape Management needs version 7.20 or higher of SAP host agent.

The following table provides the essential settings for the configuration file: .../hostctrl/exe/host_profile:

Essential settings for the configuration file

ParameterPurpose
Service/admin_users

Allowed users for SAP Host Agent administration.

Service/admin_groups

Allows users for SAP Host Agent administration by the OS user group.

Hostexec/autoupgrade_delay

Delay in minutes to search for new versions available for the SAP Host Agent.

DIR_New

Directory to search for new versions.

SAP Adaptive Extensions

SAP Adaptive Extensions are required in addition to SAP host agent for performing various operations using SAP Landscape Management software.

You install SAP Adaptive Extensions on every managed host to enable SAP Landscape Management to:

  • Perform operations on SAP HANA systems and tenant databases.

  • Discover SAP HANA systems.

  • Provision SAP HANA tenant databases.

  • Monitor SAP HANA systems and tenant databases.

  • Storage libraries for NFS (Network File System) reexport.

If you have a distributed system installed on SAN (Storage Area Network) only, you can use SAP Landscape Management to reexport your SAN storage via local NFS server:

  • SAPACOSPrep libraries to manage virtual hostnames and data storage except for Windows and Linux. Platform libraries to manage virtual hostnames and NFS mounts for Windows and Linux are only shipped with SAP Host Agent.

  • SAPACOSPrep updates.

Other than SAP host agent, SAP Adaptive Extensions are not automatically installed during installation of a new SAP system.

You install SAP Adaptive Extensions on every managed host where at least one of the following applies:

  • SAP HANA is installed.

  • Local NFS reexport is used for SAP systems.

  • The latest SAPACOSPrep updates are required before the next version of the SAP Host Agent is available.

SAP Adaptive Extensions: executable and working directory:

  • SAP Adaptive Extensions files are located in the executable directory of SAP Host Agent:

    OS and executable directory of SAP Host Agent

    OSExecutable directory of SAP Host Agent
    UNIX/usr/sap/hostctrl/exe

    Windows

    %ProgramFiles%\SAP\hostctrl\exe

    IBM i

    /usr/sap/hostctrl/exeObjects in library R3SAP400

  • The working directory of SAP Adaptive Extensions is in the following location:

    OS and working directory of SAP Host Agent

    OSWorking directory of SAP Host Agent
    UNIX/usr/sap/hostctrl/work

    Windows

    %ProgramFiles%\SAP\hostctrl\work

    IBM i

    /usr/sap/hostctrl/work

  • The SAP Adaptive Extensions uses the working directory of the SAP Host Agent.

SAP Adaptive Extensions: Log Files

The following log files are created during the runtime of SAP Adaptive Extension:

Log files created during runtime

Log FileLocationDescription
ASUI.log

Working directory of SAP Host Agent.

Example: /usr/sap/hostctrl/work.

Log files created for operations that are provided by the sapacosprep  executable.
dev_lama_<SID>_<saplocalhost>.log/tmp

Log files created for operations required to:

  • Discover SAP HANA systems.

  • Monitor SAP HANA systems and tenant databases.

dev_lvminfo

Trace directory of the instance. Usually the coordinator node/systemDB.

Example: /usr/sap/<SID>/HDB<instance no><saplocalhost>/trace/

Log files created for operations required to:

  • Perform operations on SAP HANA systems and tenant databases.

  • Provision tenant databases.

All log files will be rotated if the size > 10 MB, previous logfiles will be renamed with the extension old.

Log in to track your progress & complete quizzes