Skip to content

hunter86bg/sap-hana-preconfigure

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sap-hana-preconfigure

This role configures a RHEL 7.x or RHEL 8 system according to the SAP notes so that SAP HANA is installable

Requirements

To use this role your system needs to be installed with at least the RHEL core packges. It is strongly recommended that you have run the following roles before this:

  • 'linux-system-roles.timesync'
  • 'linux-system-roles.sap-base-settings' (for RHEL 7.x)
  • 'linux-system-roles.sap-preconfigure' (for RHEL 8.x)

It needs to be properly registered and have at least the following RedHat repositories accessable (see also example playbook):

for RHEL 7.x:

  • RHEL Base Repository
  • RHEL SAP HANA Repository

for RHEL 8.x:

  • Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
  • Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
  • Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions (RPMs)

For details see the Red Hat knowledge base article: How to subscribe SAP HANA systems to the Update Services for SAP Solutions) You can use the subscribe-rhn role to automate this process

To install HANA on Red Hat Enterprise Linux 6 or 7 you need some additional packages which come in a special repository. To get this repository you need to have one of the following products:

To achieve a personal developer edition of RHEL for SAP solutions, please register as a developer and download the developer edition.

  • Registration Link : Here you can either register a new personal account or link it to an already existing personal Red Hat Network account.
  • Download Link: Here you can download the Installation DVD for RHEL with your previously registered account

NOTE: This is a regular RHEL installation DVD as RHEL for SAP Solutions is no additional product but only a special bundling. The subscription grants you access to the additional packages through our content delivery network(CDN) after installation.

For supported RHEL releases click here

It is also important that your disks are setup according to the SAP storage requirements for SAP HANA. This BLOG is also quite helpful when sizing HANA systems. You can use the disk-init role to automate this process

If you want to use this system in production make sure time service is configured correctly. You can use rhel-system-roles to automate this

Role Variables

HANA Major and minor version

These variables are used in all sap-hana roles so that they are only prefixed with sap-hana. If you use sap-hana-mediacheck role these variables are read in automatically. The variable is used in the checks for SAP Note 2235581.

sap_hana_version: "2"
sap_hana_sps: "0"

HANA validated OS check

If you want to make sure that this role stops, if this verison of RHEL is not yet validated for HANA set the following variable to no (Used in SAP Note 2235581 check):

sap_hana_preconfigure_no_strict_version_check: "yes"

HANA kernel parameters

SAP Note 238241 defines kernel parameters that all Linux systems need to set. The parameters recomendation is defined as default. If you need to add or change parameters for your system copy these parameters and change the default values

sap_hana_preconfigure_kernel_parameters:
    - { name: net.core.somaxconn, value: 4096 }
    - { name: net.ipv4.tcp_max_syn_backlog, value: 8192}
    - { name: net.ipv4.ip_local_port_range, value: "40000 61000" }
    - { name: net.ipv4.tcp_timestamps, value: 1 }
    - { name: net.ipv4.tcp_tw_recycle, value: 1 }
    - { name: net.ipv4.tcp_slow_start_after_idle, value: 0 }
    - { name: net.ipv4.tcp_syn_retries, value: 8 }
     # Not sure about these .... they were in the old script and not set in tuned
    - { name: kernel.shmmni, value: 65536 }
    - { name: kernel.msgmni, value: 32768 }
    - { name: kernel.sysrq, value: 1 }

Here are some additional possible tuning parameters you may want to add. See SAP Note 238241 for details:

    # The following parameter do not work if communicates with hosts behind NAT firewall
    - { name: net.ipv4.tcp_tw_reuse, value: 1 }
    # Tune these for low latency system replication
    - { net.ipv4.tcp_wmem, value: ? }
    - { net.ipv4.tcp_rmem, value: ? }

Reboot behaviour after update

The installation.yaml tasks install and update the system to with the current patches. If you want to reboot the system after updating if required after patching set the following default value to yes:

sap_hana_preconfigure_reboot_after_update: false

Example Playbook

Here is an example playbook that prepares a server for hana installation.

---
- hosts: hana
  remote_user: root

  vars:
      # subscribe-rhn role variables
      reg_activation_key: myregistration
      reg_organization_id: 123456

      repositories:
          - rhel-7-server-rpms
          - rhel-sap-hana-for-rhel-7-server-rpms

          # If you want to use 4 years update services, use:
          #       - rhel-7-server-e4s-rpms
          #       - rhel-sap-hana-for-rhel-7-server-e4s-rpms

          # If you want to use 2 years extend updates, use:
          #       - rhel-7-server-eus-rpms
          #       - rhel-sap-hana-for-rhel-7-server-eus-rpms


          # rhel-system-roles.timesync variables

  roles:
        - { role: mk-ansible-roles.subscribe-rhn }
        - { role: linux-system-roles.sap-base-settings }
        - { role: linux-system-roles.sap-hana-preconfigure }

Here is a simple playbook:

---
    - hosts: all
      roles:
         - role: sap-preconfigure
         - role: sap-hana-preconfigure

Contribution

Please read the developer guidelines if you want to contribute

License

GNU General Public License v3.0

Author Information

Markus Koch, Thomas Bludau, Bernd Finger, Than Ngo

Please leave comments in the github repo issue list

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published