sap-linuxlab / community.sap_install

Automation for SAP - Collection of Ansible Roles for various SAP software installation
Apache License 2.0
57 stars 57 forks source link

sap_hana_preconfigure: Add Support for RHV/oVirt HANA VMs (lsr/sap-hana-preconfigure issue #64) #14

Open berndfinger opened 2 years ago

berndfinger commented 2 years ago

Copy of https://github.com/linux-system-roles/sap-hana-preconfigure/issues/64#issue-539653501, reported by https://github.com/Klaas-:

Hi, I think we should add support for RHV/oVirt to this role. They should be configured according to the red hat guide: https://access.redhat.com/sites/default/files/attachments/sap_hana_on_rhv_kvm_4.2_resource_guide_1.pdf

If I am not mistaken the only thing missing is the custom tuned profile: sap-hana-kvm-guest (maybe it would be a better idea to get that profile into the tuned packages and just activate it here)

berndfinger commented 2 years ago

Copy of https://github.com/linux-system-roles/sap-hana-preconfigure/issues/64#issuecomment-567383994 (comment by https://github.com/Klaas-):

Something along those lines:

- name: sap hana kvm tuned setup
  block:
    - name: Create sap-hana-kvm-guest tuned profile dir
      file:
        path: /usr/lib/tuned/sap-hana-kvm-guest
        state: directory
        owner: root
        group: root
        mode: '0755'

    - name: Create sap-hana-kvm-guest tuned profile
      copy:
        src: sap-hana-kvm-guest_tuned.conf
        dest: /usr/lib/tuned/sap-hana-kvm-guest/tuned.conf
        owner: root
        group: root
        mode: 0644

    - name: Create sap-hana-kvm-guest tuned profile haltpoll script
      copy:
        src: sap-hana-kvm-guest_haltpoll.sh
        dest: /usr/lib/tuned/sap-hana-kvm-guest/haltpoll.sh
        owner: root
        group: root
        mode: 0744
  when: ansible_system_vendor == 'oVirt'

- name: set tuned profile name
  set_fact:
    hana_tuned_profile: "{{ 'sap-hana-kvm-guest' if ansible_system_vendor == 'oVirt' else 'sap-hana' }}"