1. Overview

After this lab you will have a basic understanding of how to use and customize the predefined ansible roles for installing SAP HANA with Ansible Engine and Ansible Tower.

1.1. Product Versions used in this lab:

Product Version

Red Hat Enterprise Linux

7.4 , 7.6

Ansible Tower

3.4.1

Red Hat Satellite

6.4

1.2. Requirements to access and perform this lab

1.2.1. Base requirements

  • A computer with access to Internet :-)

  • SSH client (for Microsoft Windows users Putty and WinSCP or MobaXterm is recommended)

  • Firefox 17 or higher, or Chromium / Chrome

1.2.2. Server Environment

A full new demo environment is deployed on every request. To make the environment unique a 4 character identifier is assigned to it (i.e. 1e37), this identifier is referred in this documentation as your GUID.

The demo environment consists of the following systems:

Hostname Internal IP External name Description

tower.example.com

192.168.0.10

tower-GUID.rhpds.opentlc.com

Jump host and Ansible Tower host

ic2.example.com

192.168.0.22

ic2-GUID.rhpds.opentlc.com

SAP HANA host

ic1.example.com

192.168.0.21

ic1-GUID.rhpds.opentlc.com

SAP HANA host

sat.example.com

192.168.0.9

sat-GUID.rhpds.opentlc.com

Red Hat Satellite server

1.2.3. Working the Labs

You might have guessed by now this lab is pretty commandline-centric…​ :-)

  • Don’t type everything manually, use copy & paste from the browser when appropriate. But don’t stop to think and understand…​ ;-)

  • All labs where prepared using Vi, but feel free to use mc (function keys can be reached via Esc-<n>) or nano.

In the lab guide commands you are supposed to run are shown with or without the expected output, whatever makes more sense in the context.
The command line can wrap on the web page from time to time. Therefor the output is separated from the command line for better readability by an empty line. Anyway, the line you should actually run should be recognizable by the prompt. :-)

1.2.4. Challenge Labs

You will soon discover that many chapters in this lab guide come with a "Challenge Lab" section. These labs are meant to give you a small task to solve using what you have learned so far. The solution of the task is shown underneath a warning sign.

2. Access to Lab environment

You are running this lab from our preinstalled Laptops.

You should just have to SSH to the bastion host of the lab using the default SSH key in the partner conference laptop home directory. The partner conference laptop user is lab-user and we will create a lab-user on the Ravello based hosts.

So all you need to SSH into your bastion is:

ssh workstation-GUID.rhpds.opentlc.com

3. SAP HANA on RHEL 7 with Ansible

3.1. Introduction to Ansible roles_path

In this chapter you will be introduced into the concept of ansible roles.

An ansible role is a collection of tasks that are parametrized with variables. Compared to programming languages they can be seen as functions, that make playbooks more readable.

The complete description of roles can be found in the Ansible Roles documentation

Red Hat is developing and supporting roles to make system admin tasks easier and reproducable

You will learn how to use these roles in your playbooks e.g. to configure

Find a list of currently supported roles here: https://access.redhat.com/articles/3050101

3.2. Register for download Hana Express

To deploy HANA you need to use your own license of SAP. The fastest and easieast way of getting access is to SAP HANA is to download SAP HANA Express.

HANA Express is a reduced Version of SAP HANA and requires less resources than HANA Platform Edition. It lacks at least the following features:

  • Smart Data Integration (SDI)

  • Smart Data Streaming

  • Sytem Replication (HSR)

  • Dynamic tiering

For a full list see the HANA Express FAQ

For this quickstart guide you need to download the Binary installer method as described in detail on this page: https://www.sap.com/developer/tutorials/hxe-ua-installing-binary.html

As the SAP tutorial only describes the graphical interface which is not feasible for the training server in the cloud, you need to do the following

  1. Register for Hana Express at https://www.sap.com/sap-hana-express

    hana01
  2. Download the platform independant installer (HXEDownloadManager.jar)

    hana02
  3. Copy the Installer to your nfsserver, e.g. from Linux or Mac:

    $ scp HXEDownloadManager.jar workstation-GUID.rhpds.opentlc.com:/export
    HXEDownloadManager.jar                             100%  561KB 971.1KB/s   00:00

    If you use mobaXterm on Windows just login to workstation-GUID.rhpds.opentlc.com and drag the jar file to the dialog box on the left. If you use putty, you can use winscp to upload the files

  4. Login to the jumphost and switch to /export

    [root@workstation ~]# cd /export
    [root@workstation /export]# ls
    HXEDownloadManager.jar
  5. Download Hana express

    [root@workstation /export]#  java -jar HXEDownloadManager.jar -d . linuxx86_64 installer hxe.tgz
    Connecting to download server...
    
    SAP HANA, express edition version: 2.00.036.00.20190223.1
    
    Downloading "Server only installer"...
    hxe.tgz : 100%
    Concatenate download files to ./hxe.tgz...
    ./hxe.tgz created.
    Verify ./hxe.tgz file checksum...
    ./hxe.tgz file checksum is OK.
  6. unpack HANA Express

    [root@workstation /export]# tar xzvf hxe.tgz
    setup_hxe.sh
    HANA_EXPRESS_20/change_key.sh
    HANA_EXPRESS_20/hxe_gc.sh
    HANA_EXPRESS_20/hxe_optimize.sh
    [...]
    [root@workstation /export]# ls -l
    insgesamt 1557052
    drwxr-xr-x. 3 root    root        4096  6. Mai 08:06 HANA_EXPRESS_20
    -rw-r--r--. 1 root    root      574824  6. Mai 07:23 HXEDownloadManager.jar
    -rw-r--r--. 1 root    root  1593773828  6. Mai 07:31 hxe.tgz
    -rwxr-xr-x. 1 3312651 10102      65405 23. Feb 20:27 setup_hxe.sh

3.3. Check that Ansible is installed

  1. Connect to the control node (tower):

    # ssh lab-user@workstation-GUID.rhpds.opentlc.com
    # sudo -i
    # ssh root@tower
  2. Check that Ansible is installed and usable:

    [root@tower ~]# ansible --version
    ansible 2.6.16
      config file = /etc/ansible/ansible.cfg
      configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/lib/python2.7/site-packages/ansible
      executable location = /usr/bin/ansible
      python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

3.4. Check the Prerequisites

Ansible is keeping configuration management simple. Ansible requires no database or running daemons and can run easily on a laptop. On the managed hosts it needs no running agent.

Verify that the managed hosts accept password-less connections with key authentication from tower as user root, e.g.:

[root@tower ~]$ ssh ic2.example.com
[root@ic2 ~]$ exit
[root@tower ~]$ ssh ic1.example.com
[root@ic1 ~]$ exit

To allow user root to execute commands on ic2 and ic1 as root sudo needs to be configured on the managed hosts.

Test that the configuration allows root to run commands using sudo on ic2 and ic1 without a password, e.g.:

[root@tower ~]$ ssh ic2.example.com
[root@ic2 ~]$ sudo cat /etc/shadow
[root@ic2 ~]$ exit
In all subsequent exercises you should work as the user root on the control node tower if not explicitly told differently.

3.5. Configure the inventory

To use the ansible command for host management, you need to provide an inventory file which defines a list of hosts to be managed from the control node. One way to do this is to specify the path to the inventory file with the -i option to the ansible command.

Make sure you are user root on tower. Create a directory for your ansible files:

[root@tower ~]$ mkdir ansible-files

Now create a simple inventory file as ~/ansible-files/inventory with the following content:

[hana]
ic2.example.com
ic1.example.com

3.6. The Ansible Configuration File

The behavior of Ansible can be customized by modifying settings in Ansible’s ini-style configuration file. Ansible will select its configuration file from one of several possible locations on the control node, please refer to the documentation.

The recommended practice is to create an ansible.cfg file in a directory from which you run Ansible commands. This directory would also contain any files used by your Ansible project, such as the inventory and Playbooks.

Make sure your inventory file is used by default when executing commands from the ~/ansible-files/ directory:

  • On tower as user root create the file ~/ansible-files/ansible.cfg with the following content:

    [defaults]
    inventory=/root/ansible-files/inventory
  • Make sure that the environment variable ANSIBLE_INVENTORY is unset

    [root@tower ansible-files]$ unset ANSIBLE_INVENTORY
  • Check with ansible --version, first from ansible’s home directory and then from ~/ansible-files/. You should find when run from ~/ansible-files/ your personal config settings override the main config file in /etc/ansible/ansible.cfg.

  • From ~/ansible-files/ run ansible all --list-hosts.

    [root@tower ansible-files]$ ansible all --list-hosts
      hosts (2):
        ic2.example.com
        ic1.example.com

    Your Ansible inventory was used without providing the -i option. To double-check, run the command again from outside ~/ansible-files/:

    [root@tower ~]$ ansible all --list-hosts
    
     [WARNING]: provided hosts list is empty, only localhost is available. Note that
    the implicit localhost does not match 'all'
    
      hosts (0):
  • Now test with an ad-hoc command that the ansible connection to the hana servers is working:

    [root@tower ansible-files]$ ansible -m ping all
    ic2.example.com | SUCCESS => {
        "changed": false,
        "ping": "pong"
    }
    ic1.example.com | SUCCESS => {
        "changed": false,
        "ping": "pong"
    }

3.7. Install SAP HANA with ansible roles

3.7.1. Check available roles for SAP deployment

On Ansible Galaxy a lot of ready to use roles exist. Red Hat maintaines the linux-system-roles, which are upstream to supported RHEL System Roles.

See the follwoing pages for more details:

For a complete deployment of SAP HANA with ansible in this course, we need the following roles:

These and some other useful roles can be found here:

In this Lab these Roles are preinstalled on your server. Check that the above roles are installed and accessable on tower as user root. Get familiar with these roles and read the documentation of each of the above role and browse the roles itself

[root@tower ansible-files]$ ansible-galaxy list
- linux-system-roles.kdump, (unknown version)
- linux-system-roles.network, (unknown version)
- linux-system-roles.postfix, (unknown version)
- linux-system-roles.selinux, (unknown version)
- linux-system-roles.timesync, (unknown version)
- rhel-system-roles.kdump, (unknown version)
- rhel-system-roles.network, (unknown version)
- rhel-system-roles.postfix, (unknown version)
- rhel-system-roles.selinux, (unknown version)
- rhel-system-roles.timesync, (unknown version)
- linux-system-roles.storage, master
- mk-ansible-roles.subscribe-rhn, master
- mk-ansible-roles.sap_base_settings, master
- mk-ansible-roles.sap_hana_preconfigure, master
- mk-ansible-roles.sap_hana_mediacheck, master
- mk-ansible-roles.sap_hana_hostagent, master
- mk-ansible-roles.sap_hana_deployment, master
If the roles are not installed yet use the follwing command to install them: ansible-galaxy install rolename
Global roles can be installed (as root) to /usr/share/ansible/roles or /etc/ansible/roles using the -p option, per default roles are installed to ${HOME}/.ansible/roles. You might need to set your roles_path in ansible.cfg appropriately

Click on each role above and read the readme on how to use the roles and study some example playbooks.

3.8. Create a playbook using roles to deploy hana

Now write playbook to prepare ic2 for HANA installation. The following preconditions are:

3.8.1. Register system to satellite

The lab environment has a version of Red Hat Enterprise Linux 7.6 base server already installed, but the repositories for HANA installation are not correct. Use the mk-ansible-roles.subscribe-rhn to set the correct repositories. For this use the following variables:

  • Satellite subscription

    satellite_server: sat.example.com
    reg_activation_key: rhel7sap
    reg_organization_id: Default_Organization
    reg_server_insecure: yes
  • Pin the release to RHEL 7.6

    reg_osrelease: 7.6
  • do not remove previously set repositories because they are already set

    repo_reset: false
  • subscribe to the following repositories for 4 years update services

    repositories:
                  - rhel-7-server-e4s-rpms
                  - rhel-sap-hana-for-rhel-7-server-e4s-rpms
                  - rhel-7-server-e4s-optional-rpms
                  - rhel-7-server-e4s-satellite-tools-6.4-rpms
you will find more details on the Update Services for SAP in our Knowledgebase

3.8.2. Configure timeserver

Use the linux-system-roles.timesync to configure your timeserver.
Use the following parameter:

timesync_ntp_servers:
        - hostname: 0.rhel.pool.ntp.org
          iburst: yes
timesync_ntp_provider: chrony
The timeserver module throws a couple errors that are ok to ignore

3.8.3. Networking Setup

Network setup in this lab is already done. In other environments you could use rhel-system-roles.network.

3.8.4. Disk configuration

If you login to ic2 you will realize that the disks are not configured. Use lsblk to identify unconfigured disks. For the configuration of the disks use linux-system-role.storage.
Use the following parameters:

storage_pools:
        - name: hana
          disks:
             /dev/vdb
          volumes:
            - name: shared
              size: "24 GiB"
              mount_point: "/hana/shared"
              fs_type: xfs
              state: present
            - name: data
              size: "24 GiB"
              mount_point: "/hana/data"
              fs_type: xfs
              state: present
            - name: logs
              size: "12 GiB"
              mount_point: "/hana/logs"
              fs_type: xfs
              state: present
            - name: usr_sap
              size: "39 GiB"
              mount_point: "/usr/sap"
              fs_type: xfs
              state: present

3.8.5. SAP base settings

SAP requires a couple of base settings that are described in SAP Note 2369910. The role mk-ansible-roles.sap_base_settings will set these paramters. It can be used without any parameters, but still the following variables can be set:

  • sap_hostname: The hort hostname of the public IP of the SAP server. It defaults to ansible_hostname

  • sap_domain: The DNS Domain of the SAP server. It defaults to ansible_fqdn.

  • sap_ip : The IP address of the SAP server. It defaults to ansible_default_ipv4.address

To make sure the short hostname is set on your system use the following variable definition:

sap_hostname: "{{ ansible_hostname }}"

3.8.6. SAP HANA preconfigure

To do all preconfiguration steps for SAP HANA which are described in the a couple of applicable SAP Notes use mk-ansible-roles.sap_hana_preconfigure. This role has some parameters (see also README of the role), which can be configured. For this lab we need the following to be set:

sap_hana_preconfigure_min_package_check: false
sap_hana_preconfigure_reboot_after_update: true
sap_hana_preconfigure_reboot_timeout: 600

SAP NOTE 238241, defines a lot of kernel parameter options, that can be set, in the variable sap_hana_preconfigure_kernel_parameters. The default is good for the lab, but in other environments you may need to change the default, defined in ${roledir}/mk-ansible-roles.sap_hana_preconfigure

3.8.7. SAP HANA Installation Medium

The SAP Installation media is provided on an NFS Server. The role mk-ansible-roles.sap_hana_mediacheck can be used to mount the installation directory and figure out which version of HANA will be installed. For the lab use the following configuration:

# SAP-Media Check (get unpacked HANA from Mountpoint)
sap_hana_mediacheck_serverpath: "workstation.example.com:/export"
sap_hana_mediacheck_mountpoint: /install
sap_hana_installdir: "{{ sap_hana_mediacheck_mountpoint + '/HANA_EXPRESS_20/DATA_UNITS/HDB_SERVER_LINUX_' + ansible_architecture|upper }}"
The Ansible playbook will fail, if you put the wrong path here.
For other options like unpacking archive from NFS see the role Readme

3.8.8. SAP Hostagent installation

SAP installations will use SAP hostagent. The SAP hostagent is shipped in different formats (RPM, tgz, sar). The role mk-ansible-roles.sap_hana_hostagent creates the user sapadm with groupid sapsys and installs or updates the hostagent from the given path. Use the following variables to configure the hostagent with this role:

# SAP HANA Hostagent
#--------------------
# UID/GID for sapadm:sapsys
sap_uid_sapadm: 30200
sap_gid_sapsys: 30200
sap_hana_hostagent_sapadm_pw_clear: "MyS3cret!"

# Password for hostagent
sap_hana_hostagent_ssl_pw: "MyS3cret!"

# Use the shipped Hostagent
sap_hana_hostagent_archive: "{{ sap_hana_installdir }}/server/HOSTAGENT.TGZ"
sap_hana_hostagent_unarchive_cmd: "tar --strip-components=3 -xzf "
This role should be the last role in a play before running the HANA deployment, because the hostagent should be (re)started after an update or initial install.

3.8.9. SAP HANA Deployment

Finally to install SAP HANA database, use the role mk-ansible-roles.sap_hana_deployment.

This role creates the configuration file for an unattended install of SAP HANA with hdblcm and kicks-off For this role you need to add the instance specific parameters in the according host_vars or group_vars file:

### Define additional variables for SID and instance
hana_sid: HXE
hana_instance_number: 90

pw_user_sapadm_clear: "{{ sap_hana_hostagent_sapadm_pw_clear }}"
sap_uid_sapadm_pw_clear: "{{ sap_hana_hostagent_sapadm_pw_clear }}"
id_user_sapadm: "{{ sap_uid_sapadm }}"
id_group_sapsys: "{{ sap_gid_sapsys }}"
id_group_shm: "30220"

deployment_instance: true

# User magic with instance number
# as we are using just one instance
instances:
  instance01:
    hdblcm_params: "--ignore=check_min_mem,check_platform"
    id_user_sidadm: "{{ 30300 + hana_instance_number|int }}"
    pw_user_sidadm: "Adm12356"
    hana_pw_system_user_clear: "System123"
    hana_components: "client,server"
    hana_system_type: "Master"
    id_group_shm: "{{ id_group_shm }}"
    hana_instance_hostname: "{{ ansible_hostname }}"
    hana_addhosts:
    hana_sid: "{{ hana_sid|upper }}"
    hana_instance_number: "{{ hana_instance_number }}"
    hana_system_usage: custom
There are many cleartext passswords, which is OK for a training environment like this. In production environments these variables should be defined in an ansible vault file.
If you want to install multiple HANA instances on one server you can add more than one instance block here and the installer will loop over these instances.
The variable information should be split to appropriate group_vars and host_vars files, because some information is shared across all servers (group_vars/all) and the whole SAP HANA servers(group_vars/hana), while other is special to the host itself (host_vars/ic2.example.com)

Now create your var files and playbook to run the installation. After the installation has finished, log into ic2 and assume user hxeadm to see if SAP HANA is running. Your output should look similar to this:

[root@ic2 ~]# su - hxeadm
Last login: Fri May 11 18:26:48 EDT 2018
hxeadm@ic2:/usr/sap/HXE/HDB90> HDB info
USER       PID  PPID %CPU    VSZ   RSS COMMAND
hxeadm   11618 11617  1.6 116308  2940 -bash
hxeadm   11680 11618  2.0 113260  1640  \_ /bin/sh /usr/sap/HXE/HDB90/HDB info
hxeadm   11711 11680  0.0 151040  1804      \_ ps fx -U hxeadm -o user,pid,ppid,pcpu,vsz,rss,args
hxeadm    6805     1  0.0  43232  1888 sapstart pf=/hana/shared/HXE/profile/HXE_HDB90_ic2
hxeadm    6814  6805  0.1 225944 31780  \_ /usr/sap/HXE/HDB90/ic2/trace/hdb.sapHXE_HDB90 -d -nw -f /usr/sap/HXE/HDB90/ic2/daemon.ini pf=/usr/sap/HXE/SYS/profile/HXE_HDB90_ic2
hxeadm    6830  6814 53.7 7641816 5200160      \_ hdbnameserver
hxeadm    7149  6814  1.3 1254272 259132      \_ hdbcompileserver
hxeadm    7151  6814 57.3 3253036 2306784      \_ hdbpreprocessor
hxeadm    7194  6814 51.7 7298972 5381920      \_ hdbindexserver -port 39003
hxeadm    7196  6814  3.3 2038712 936348      \_ hdbxsengine -port 39007
hxeadm    8293  6814  1.8 1567760 292932      \_ hdbwebdispatcher
hxeadm    6726     1  0.4 519388 23088 /usr/sap/HXE/HDB90/exe/sapstartsrv pf=/hana/shared/HXE/profile/HXE_HDB90_ic2 -D -u hxeadm

Alternatively you can browse to the HDBLCM web page: https://ic2-GUID.rhpds.opentlc.com:1129/lmsl/HDBLCM/HXE/index.html

Use user hxeadm and the according password to login

3.9. Solution

You need to create the following files:

  1. The ansible.cfg file to read the correct inventory:

    [defaults]
    inventory=/root/ansible-files/inventory
  2. The required playbook: ./install-hana.yml:

    ---
    
    - name: Prepare for Hana Install
      hosts: hana
      become: yes
    
      roles:
                  - mk-ansible-roles.subscribe-rhn
                  - linux-system-roles.timesync
                  - linux-system-roles.storage
                  - mk-ansible-roles.sap_base_settings
                  - mk-ansible-roles.sap_hana_preconfigure
                  - mk-ansible-roles.sap_hana_mediacheck
                  - mk-ansible-roles.sap_hana_hostagent
    
    - name: Install SAP HANA
      hosts: hana
      become: yes
    
      roles:
                  - mk-ansible-roles.sap_hana_deployment
  3. The required group_vars file: ./group_vars/hana

    ---
    # subscribe-rhn
    #----------------
    satellite_server: sat.example.com
    reg_activation_key: rhel7sap
    reg_organization_id: Default_Organization
    reg_server_insecure: yes
    reg_osrelease: 7.6
    repo_reset: false
    repositories:
                  - rhel-7-server-e4s-optional-rpms
                  - rhel-sap-hana-for-rhel-7-server-e4s-rpms
                  - rhel-7-server-e4s-rpms
                  - rhel-7-server-e4s-satellite-tools-6.4-rpms
    
    # rhel-system-role.timeserver
    #-----------------------------
    timesync_ntp_servers:
            - hostname: 0.rhel.pool.ntp.org
              iburst: yes
    timesync_ntp_provider: chrony
    
    
    # linux-system-role.storage
    #--------------------------
    
    storage_pools:
            - name: hana
              disks:
                 /dev/vdb
              volumes:
                - name: shared
                  size: "24 GiB"
                  mount_point: "/hana/shared"
                  fs_type: xfs
                  state: present
                - name: data
                  size: "24 GiB"
                  mount_point: "/hana/data"
                  fs_type: xfs
                  state: present
                - name: logs
                  size: "12 GiB"
                  mount_point: "/hana/logs"
                  fs_type: xfs
                  state: present
                - name: usr_sap
                  size: "39 GiB"
                  mount_point: "/usr/sap"
                  fs_type: xfs
                  state: present
    
    
    # sap-base-settings
    #------------------
    sap_hostname: "{{ ansible_hostname }}"
    
    # sap-hana-preconfigure
    #-----------------------
    sap_hana_preconfigure_min_package_check: false
    sap_hana_preconfigure_reboot_after_update: true
    sap_hana_preconfigure_reboot_timeout: 600
    
    #sap_uid_sapadm: 30200
    #sap_gid_sapsys: 30200
    #sap_uid_sapadm_pw_clear: "MyS3cret!"
    
    # SAP-Media Check (get unpacked HANA from Mountpoint)
    #-----------------------
    sap_hana_mediacheck_serverpath: "workstation:/export"
    sap_hana_mediacheck_mountpoint: /install
    sap_hana_installdir: "{{ sap_hana_mediacheck_mountpoint + '/HANA_EXPRESS_20/DATA_UNITS/HDB_SERVER_LINUX_' + ansible_architecture|upper }}"
    
    # SAP HANA Hostagent
    #--------------------
    # UID/GID for sapadm:sapsys
    sap_uid_sapadm: 30200
    sap_gid_sapsys: 30200
    sap_hana_hostagent_sapadm_pw_clear: "MyS3cret!"
    
    # Password for hostagent
    sap_hana_hostagent_ssl_pw: "MyS3cret!"
    
    # Use the shipped Hostagent
    sap_hana_hostagent_archive: "{{ sap_hana_installdir }}/server/HOSTAGENT.TGZ"
    sap_hana_hostagent_unarchive_cmd: "tar --strip-components=3 -xzf "
    
    
    # sap-hana-deployment
    #---------------------
    ### Define additional variables for SID and instance
    hana_sid: HXE
    hana_instance_number: 90
    
    pw_user_sapadm_clear: "{{ sap_hana_hostagent_sapadm_pw_clear }}"
    sap_uid_sapadm_pw_clear: "{{ sap_hana_hostagent_sapadm_pw_clear }}"
    id_user_sapadm: "{{ sap_uid_sapadm }}"
    id_group_sapsys: "{{ sap_gid_sapsys }}"
    id_group_shm: "30220"
    
    deployment_instance: true
    
    # User magic with instance number
    # as we are using just one instance
    instances:
      instance01:
        hdblcm_params: "--ignore=check_min_mem,check_platform"
        id_user_sidadm: "{{ 30300 + hana_instance_number|int }}"
        pw_user_sidadm: "Adm12356"
        hana_pw_system_user_clear: "System123"
        hana_components: "client,server"
        hana_system_type: "Master"
        id_group_shm: "{{ id_group_shm }}"
        hana_instance_hostname: "{{ ansible_hostname }}"
        hana_addhosts:
        hana_sid: "{{ hana_sid|upper }}"
        hana_instance_number: "{{ hana_instance_number }}"
        hana_system_usage: custom

Now kick off the installation as user root on tower:

[root@tower ansible-files]$ ansible-playbook install-hana.yml
run with -vvv to increase debuglevel to get more information whats happening

You finished your Lab deploying SAP HANA fully automated. You now know the basics and should be able to integrate this with Satellite, Ansible Tower and even CloudForms. To learn more about these tools join us for another ILT training or login to the Partner Portal and look for OPEN trainings

3.10. Bonus Labs

3.10.1. Install and configure Insights

In this Lab the satellite is configured to proxy your insights client.

The role to install insights is already installed in the lab. To use insights do the following:

  1. Create a playbook install-insights.yml to install to configure Insights

    # Playbook installing Insights
    ---
    - hosts: hana
      become: yes
      roles:
      - role: redhatinsights.insights-client
        insights_display_name: "{{ inventory_hostname }}"
        when: ansible_os_family == 'RedHat'
  2. Run the playbook

    # ansible-playbook install-insights.yml
  3. Goto https://sat-GUID.rhpds.opentlc.com, click the insights tab to see the results

4. The End

Congratulations, you finished your labs! We hope you enjoyed your first steps using Ansible as much as we enjoyed creating the labs.