Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / SAP Automation
SUSE Linux Enterprise Server for SAP Applications 15 SP6

SAP Automation

SUSE® Linux Enterprise Server for SAP Applications · SUSE® Linux Enterprise High Availability

Publication Date: November 14, 2024

This article offers some automation solutions for SAP administrators. With Salt formulas, it helps to efficiently configure High Availability and SAP systems. The solutions that is described here works from SUSE® Linux Enterprise Server 12 SP3 and beyond. All packages are available in the SLES for SAP module.

Note
Note: About official SUSE support

The referenced Salt formulas install and configure SAP software (SAP HANA, SAP NetWeaver, and SAP S/4HANA) on SUSE Linux Enterprise Server for SAP Applications including advanced configurations like SAP HANA System Replication setup and configure the High Availability cluster. The Salt formulas are part of SUSE® Linux Enterprise Server for SAP Applications, provided via the official repositories and are fully supported by SUSE.

SUSE works in the overall project on additional parts that cover infrastructure aspects (like machines, network, disk formats, mount points) that need to be performed with SUSE Manager, AutoYaST, or Terraform and are not shipped as part of SUSE Linux Enterprise Server for SAP Applications. These parts of the project available via SUSE GitHub repositories are published as-is and supported by the open source community. For more information, see https://github.com/SUSE/ha-sap-terraform-deployments.

1 Conceptual overview

Starting from the idea of modernizing and simplifying SAP HANA and SAP NetWeaver deployments, SUSE engineering worked on rewriting the deployment wizards in Salt. Salt is a configuration management system that is also supported by SUSE Manager and SUSE® Linux Enterprise Server for any sort of automation.

The major motivation was to improve and simplify the installation of SAP HANA on SUSE Linux Enterprise Server.

The following sections contain a brief overview of available formulas. Each section contains also a link to the upstream GitHub project. There you can find additional documentation on how to use and apply the formulas.

2 Terminology

Python

A scripting language. It interacts with lower-layer utilities such as crm shell and several SAP commands, including SAP HANA management tools.

Salt (also SaltStack)

A configuration infrastructure management system written in Python. Due to its modular approach, it is often referred as SaltStack. Salt has as a client/server architecture. The server (also called the Salt Master) acts as a central control unit for the Salt clients. The other supported setup option is called masterless.

Salt grains

Static data about Salt clients. Grains contain information about the operating system that is running, the CPU architecture in use, and much more. Grains can also be set to assign values to Salt clients.

Salt formulas

Formulas are pre-written Salt States.

For more information about Salt, refer to the upstream documentation at https://docs.saltstack.com.

Salt Master

Manages the infrastructure and the Salt clients within it. It can execute commands remotely on Salt clients and manage their state. The Salt Master captures grains sent from Salt clients and decide what to do with this information.

Salt client (sometimes minion)

A server or machine often controlled by the Salt Master. Its main purpose is to execute commands sent from the Salt Master, report data back, and send information about itself.

Salt state

YAML text file to maintain consistency across your environment. Salt states can be executed.

Terraform

An infrastructure as code software tool. It deploys the required infrastructure in cloud or virtual environments and AutoYaST for on-premises deployments.

3 SAP HANA automated deployment

Use the Salt formula saphanabootstrap-formula for bootstrapping and managing SAP HANA platform and system replication.

The Salt formula takes care of the following

  • Installs SAP HANA.

  • Configures system replication.

  • Preconfigures the High Availability cluster requirements.

  • Configures the SAP HANA Prometheus exporter

The Salt formula can be used in these scenarios:

Scenarios for saphanabootstrap-formula
  • SAP HANA single instance automated deployment.

  • Two SAP HANA instances on system replication setup.

  • Two SAP HANA instances on system replication and cluster scale-up performance-optimized configuration.

  • Two SAP HANA instances on system replication setup, cluster scale-up cost-optimized configuration, and extra SAP HANA installation on a secondary host.

  • Cloud Service Provides (Azure, AWS, and GCP) automated adjustments for each provider as best-practice.

Example 1: Installation
zypper install saphanabootstrap-formula

The following links provide best practices:

4 SAP NetWeaver automated configuration

Use the Salt formula sapnwbootstrap-formula for bootstrapping and managing the SAP NetWeaver platform.

Note
Note

The formula works only with SAP HANA as database.

SAP NetWeaver components
  • ASCS instance

  • ERS instance

  • PAS instance

  • AAS instance

  • Database instance (this adds the required users, tables, views, etc. to the current Hana database)

The Salt formula can be used in these scenarios:

Scenarios for sapnwbootstrap-formula
  • Enqueue replication server version 1

  • Enqueue replication server version 2

Example 2: Installation
zypper install sapnwbootstrap-formula

5 High Availability cluster automated configuration

Use the Salt formula habootstrap-formula for bootstrapping and managing a high availability cluster with the crm shell.

Properties for habootstrap-formula
  • Creates and configures the High Availability cluster (Pacemaker, Corosync, SBD, and resource agents).

  • Run on-premises and Cloud-service providers (Azure, GCP, AWS).

  • Azure, AWS, and GCP automated adjustments for each provider best-practices.

6 High available NFS storage

Use the Salt formulas drbd-formula and habootstrap-formula to create a highly available NFS storage cluster.

Use the formula drbd-formula for setting up and managing DRBD devices with the command drbdadm. Find more information in https://documentation.suse.com/sle-ha-15/html/SLE-HA-all/cha-ha-drbd.html.

Use the Salt formula habootstrap-formula for bootstrapping and managing a high availability cluster with the crm shell.

Example 3: Installation
zypper install drbd-formula habootstrap-formula

7 Using Salt formulas

Salt formulas can be applied in two ways:

The following procedure is written in a general way to make it fit for all use cases. You need some knowledge about Salt and how to customize it to your needs.

Procedure 1: Applying Salt formulas

The following procedure demonstrates how to create a pillar structure for a system with SAP HANA, SAP NetWeaver, and with DRBD. This setup is based on SUSE Linux Enterprise Server for SAP Applications.

  1. Install salt-minion package including dependencies using the zypper install salt-minion command.

    To install the package on SUSE Linux Enterprise 12, you must enable the Advanced System Management Module.

  2. Make the correct version of SAP media available on a share, as it is required for running the formulas that install the SAP software. Ensure that the directories and files have correct permissions.

  3. Install the Salt formulas using the sudo zypper in saphanabootstrap-formula sapnwbootstrap-formula drbd-formula habootstrap-formula command.

  4. Create the pillar files structure.

    The pillar files work as configuration files for the Salt formulas and are intended as user input. To use the files, create a top.sls file which references other files you want to apply.

    1. Create the directory /srv/pillar and its subdirectories hana, netweaver, and drbd:

      # mkdir --parents /srv/pillar/{hana,netweaver,drbd}

      The directory names match with the names in the top.sls file (see next step).

    2. Create the file /srv/pillar/top.sls with the following content:

      base:
          'hana01,hana02':
              - hana.hana
              - hana.cluster
      
          'netweaver01,netweaver02':
              - netweaver.netweaver
              - netweaver.cluster
      
          'drbd01,drbd02':
              - drbd.drbd
              - drbd.cluster
  5. Copy example pillar files to the appropriate directories:

    > sudo cp /usr/share/salt-formulas/metadata/hana/pillar.example /srv/pillar/hana/hana.sls
    > sudo cp /usr/share/salt-formulas/states/netweaver/pillar.example /srv/pillar/netweaver/netweaver.sls
    > sudo cp /usr/share/salt-formulas/metadata/drbd/pillar.example /srv/pillar/drdb/drdb.sls
    > sudo cp /usr/share/salt-formulas/metadata/cluster/pillar.example /srv/pillar/hana
    > sudo cp /usr/share/salt-formulas/metadata/cluster/pillar.example /srv/pillar/netweaver
    > sudo cp /usr/share/salt-formulas/metadata/cluster/pillar.example /srv/pillar/drdb
  6. Modify the content of the pillar files for each Salt formula, according to the configuration you need.

    Notice that, in this example, we have three different cluster.sls files. Each might have different HA cluster requirements.

  7. Create the file /srv/salt/top.sls with the following content:

    base:
        'hana01,hana02':
            - hana
            - cluster
    
        'netweaver01,netweaver02':
            - netweaver
            - cluster
    
        'drbd01,drbd02':
            - drbd
            - cluster

    In the above example, folder part is removed, as we are pointing to the formulas with their names.

  8. Before proceeding to the next step, perform an environment check to ensure that all the required users and groups exist and configured correctly.

  9. Execute Salt using the commands below. Keep in mind that these are example commands: Salt supports more options.

    • If you use a Salt Master with Salt clients, run:

      # salt '*' state.highstate
    • If you use only a Salt client, run:

      # salt --local state.highstate

    The command shows the result (green for everything is fine, red for errors).

8 For more information

Find some more general information in the following list:

The open source repositories of the deployment automation can be found at the following GitHub repositories, including the Terraform scripts. All scripts provided in the repositories are as-is and are not supported as part of SUSE Linux Enterprise Server for SAP Applications.

SAP HANA deployment automation

https://github.com/SUSE/saphanabootstrap-formula

SAP NetWeaver automated configuration

https://github.com/SUSE/sapnwbootstrap-formula

High Availability cluster automated configuration

https://github.com/SUSE/habootstrap-formula

High Availability cluster automated configuration (DRBD)

https://github.com/SUSE/drbd-formula

High Availability cluster automated configuration (Salt)

https://github.com/SUSE/habootstrap-formula

9 Legal notice

Copyright© 2006– 2024 SUSE LLC and contributors. All rights reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled GNU Free Documentation License.

For SUSE trademarks, see https://www.suse.com/company/legal/. All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.

All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.