mk-ansible-roles / saphana-preconfigure

Configures a RHEL system for HANA installation according to SAP Notes
Apache License 2.0
6 stars 3 forks source link

saphana-preconfigure

THIS ROLE IS DEPRECATED AND WILL BE DELETED IN 12.2022
use _community.sapinstall collection instead

This role git@github.com:mk-ansible-roles/saphana-preconfigure.git. This role configures a RHEL 6.7 or 7.x 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 and properly registered. It needs access to the software repositories required to install SAP HANA (see also: 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:

Click here to achieve a personal developer edition of RHEL for SAP solutions. Please register as a developer and download the developer edition.

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: https://access.redhat.com/solutions/2479121

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

Configuration for SAP-Media-Check

The saphana preconfigure role has implemented a couple of different ways to access the sap installation media. At the end, the unpacked installation media has to be available at hana_installdir.

The scope of this check is to make sure that the HANA installation files are available on the host. Normally you have your own setup to do this, e.g. automounter or local copy. It figures out the HANA version you provided to make installation decsions based on this information. So you need to define the path to your HANA installation directory here:

If you want the media-check to mount the installation directory ready and unpacked from an nfs share define the follwoing variables:

If you provide the downloaded rar files on an NFS share and you want to unpack the rar files locally define the following variables:

If you do not have an unrar package you can also provide a path to the unrar command in the variable unrar_cmd. I prefer putting it on the NFS-Share where my archives live, which is mounted to /tmp/install. So define the variable similar to this:

When you unpack your installation archives like this, it is save to define hana_install dir like this

Further Variables to prepare the HANA deployment

The variable definitions can be in the playbook or can also be made in an according groups_var or host_vars file

Example Playbook

Here is an example playbook that installs a complete server

---
- 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

          # disk-init role variables
          disks:
                  /dev/vdc: vg00
                  /dev/vdb: vg00
          logvols:
                  hana_shared:
                          size: 24G
                          vol: vg00
                          mountpoint: /hana/shared
                  hana_data:
                          size: 24G
                          vol: vg00
                          mountpoint: /hana/data
                  hana_logs:
                          size: 12G
                          vol: vg00
                          mountpoint: /hana/logs
                  usr_sap:
                          size: 49G
                          vol: vg00
                          mountpoint: /usr/sap

          # rhel-system-roles.timesync variables
          ntp_servers:
                  - hostname: 0.rhel.pool.ntp.org
                    iburst: yes
                  - hostname: 1.rhel.pool.ntp.org
                    iburst: yes
                  - hostname: 2.rhel.pool.ntp.org
                    iburst: yes
                  - hostname: 3.rhel.pool.ntp.org
                    iburst: yes

          # SAP Precoonfigure role

          # SAP-Media Check
          install_nfs: "mynfsserver:/installi-export"
          installroot: /install
          hana_installdir: "{{ installroot + '/HANA2SPS02' }}"

          hana_pw_hostagent_ssl: "MyS3cret!"
          id_user_sapadm: "20202"
          id_group_shm: "20202"
          id_group_sapsys: "20202"
          pw_user_sapadm_clear: "MyS3cret!"

  roles:
          - { role: mk-ansible-roles.subscribe-rhn }
          - { role: mk-ansible-roles.disk-init }
          - { role: linux-system-roles.timesync }
          - { role: mk-ansible-roles.saphana-preconfigure }
          - { role: mk-ansible-roles.saphana-deploy }
          - { role: mk-ansible-roles.saphana-hsr }

License

Apache License Version 2.0, January 2004

Author Information

Markus Koch

Please leave comments in the github repo issue list