Search

Chapter 4. RHEL System Roles for SAP

download PDF

The RHEL System Roles for SAP provide a quick, easy, and consistent method for preparing your local system or any number of remote systems according to applicable SAP notes for SAP software. They include the Ansible roles sap_general_preconfigure, sap_netweaver_preconfigure, and sap_hana_preconfigure and require an Ansible execution system (e.g., Ansible Automation Platform, Ansible Core).

4.1. Installing Ansible Core

Ansible Core is available in the RHEL 9 AppStream repository.

If you already have an Ansible Automation Platform or Ansible Core package installed, you can skip this step and proceed to Installing RHEL System Roles for SAP.

Prerequisites

  • You have system administrator access.

Procedure

  • Install the ansible-core package:

    # dnf install ansible-core

4.2. Installing RHEL System Roles for SAP

RHEL System Roles for SAP is available in the RHEL for SAP Solutions r epository. It requires certain functionality delivered in the RHEL System Roles, which are available in the AppStream repository.

Prerequisites

  • You have system administrator access.
  • You have installed the Ansible Core package or Ansible Automation Platform.

Procedure

  • Install RHEL System Roles for SAP and RHEL System Roles:

    # dnf install rhel-system-roles-sap rhel-system-roles

4.3. System configuration with RHEL System Roles for SAP

4.3.1. Preparing a local system

If the Ansible Engine is installed on the same system on which you want to install the SAP software, perform the steps outlined in this procedure to configure your local managed node.

Prerequisites

  • You have system administrator access.

Procedure

  1. Make a backup of the system if you would like to preserve the original configuration of the server.
  2. Create a file named sap.yml with the following content:

    ---
    
    - hosts: localhost
      vars:
        ansible_connection: local
        sap_general_preconfigure_max_hostname_length: 64
        sap_general_preconfigure_reboot_ok: false
        sap_general_preconfigure_fail_if_reboot_required: false
        sap_hana_preconfigure_reboot_ok: false
        sap_hana_preconfigure_fail_if_reboot_required: false
        sap_hana_preconfigure_update: true
      roles:
        - sap_general_preconfigure
        - sap_netweaver_preconfigure
        - sap_hana_preconfigure
    Important

    The correct indentation and the use of spaces instead of tabs is essential for YAML files.

    Note
    • The line sap_general_preconfigure_max_hostname_length: 64 is only required if your hostname (hostname -s) is longer than 13 characters and if you are not using this system for an SAP ABAP Platform instance. Without this line, the role sap_general_preconfigure will fail its hostname check because a hostname with more than 13 characters is not allowed for an SAP ABAP Platform instance as per SAP note 611361.
    • The line sap_netweaver_preconfigure is used to perform specific installation and configuration steps for an SAP ABAP Platform. It can be removed or commented out for an SAP HANA database only system.
    • The line sap_hana_preconfigure is used to perform specific installation and configuration steps for an SAP HANA database. It can be removed or commented out for an SAP ABAP Platform only system.
  3. Run the sap.yml Ansible playbook:

    # ansible-playbook sap.yml -e 'ansible_python_interpreter=/usr/libexec/platform-python'

    This will configure this system according to the applicable SAP notes for SAP ABAP Platform and/or SAP HANA on RHEL 9.

  4. After the ansible-playbook command has finished successfully, reboot the system:

    # reboot

4.3.2. Preparing one or more remote systems

If the Ansible Engine is installed on the same system on which you want to install the SAP software, perform the steps outlined in this procedure to configure your local managed node.

Prerequisites

  • You have system administrator access.

Procedure

  1. Make a backup of the remote systems if you would like to preserve the original configuration of the server.
  2. Create an inventory file or modify file /etc/ansible/hosts to contain the name of a group of hosts and each system which you intend to configure (=managed node) in a separate line (example for three hosts in a host group named sap_hosts):

    [sap_hosts]
    host01
    host02
    host03
  3. Verify that you can log in to all three hosts using ssh without a password. Example:

    # ssh host01 uname -a
    # ssh host02 hostname
    # ssh host03 echo test
  4. Create a YAML file named sap.yml with the following content:

    ---
    
    - hosts: sap_hosts
      vars:
        sap_general_preconfigure_max_hostname_length: 64
        sap_general_preconfigure_reboot_ok: false
        sap_general_preconfigure_fail_if_reboot_required: false
        sap_hana_preconfigure_reboot_ok: true
        sap_hana_preconfigure_fail_if_reboot_required: false
        sap_hana_preconfigure_update: true
      roles:
        - sap_general_preconfigure
        - sap_netweaver_preconfigure
        - sap_hana_preconfigure
    Note
    • The line sap_general_preconfigure_max_hostname_length: 64 is only required if your hostname (hostname -s) is longer than 13 characters and if you are not using this system for an SAP ABAP Platform instance. Without this line, the role sap_general_preconfigure will fail its hostname check because a hostname with more than 13 characters is not allowed for an SAP ABAP Platform instance as per SAP note 611361.
    • The line sap_netweaver_preconfigure is used to perform specific installation and configuration steps for an SAP ABAP Platform. It can be removed or commented out for an SAP HANA database only system.
    • The line sap_hana_preconfigure is used to perform specific installation and configuration steps for an SAP HANA database. It can be removed or commented out for an SAP ABAP Platform only system.
  5. Run the sap.yml Ansible playbook:

    # ansible-playbook sap.yml

    This will configure all systems that are part of host group sap_hosts according to the applicable SAP notes for SAP ABAP Platform and/or SAP HANA on RHEL 9. Finally, if necessary, the systems are rebooted.

Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.