Skip to content

Commit

Permalink
v1.2.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI User committed Nov 13, 2024
1 parent 916f4f1 commit 2b39962
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 91 deletions.
52 changes: 19 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ Notes:
- The list of EXISTING Subnets is available here: https://cloud.ibm.com/vpc-ext/network/subnets.
- Each Subnet must have Internet access throught a Public Gateway.

In order to track the events specific to the resources deployed by this solution, the [IBM Cloud Activity Tracker](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-getting-started#gs_ov) to be used should be specified. IBM Cloud Activity Tracker service collects and stores audit records for API calls made to resources that run in the IBM Cloud. It can be used to monitor the activity of your IBM Cloud account, investigate abnormal activity and critical actions, and comply with regulatory audit requirements. In addition, you can be alerted on actions as they happen.

## Contents:

- [1.1 Installation media](#11-installation-media)
Expand Down Expand Up @@ -96,6 +94,9 @@ For example, in case of deploying a HANA VM, using the default value for VSI pro
- 1 volume x 50 GB for `/usr/sap` (volume group: `<sid>_usr_sap_vg`, logical volume: `<sid>_usr_sap_lv`)
- 1 volume x 10 GB for a 2 GB SWAP logical volume (volume group: `<sid>_swap_vg`, logical volume: `<sid>_swap_lv`)

SAP APPs VSI Disks:
- 1 disk with 10 IOPS / GB - SWAP (the size depends on the OS profile used, for `bx2-4x16` the size will be 48 GB)

## 1.4 VPC Configuration

The Security Rules inherited from BASTION deployment are the following:
Expand Down Expand Up @@ -142,12 +143,6 @@ DB_PROFILE | The instance profile used for the HANA VSI. The list of certified p
APP_PROFILE | The profile used for the APP VSI. A list of profiles is available [here](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles).<br> For more information about supported OS and IBM Gen 2 Virtual Server Instances (VSI), check [SAP Note 2927211: SAP Applications on IBM Virtual Private Cloud](https://launchpad.support.sap.com/#/notes/2927211)<br/> Default value: APP_PROFILE = "bx2-4x16".
[DB/APP]_IMAGE | The OS image used for the HANA/APP VSI. You must use the Red Hat Enterprise Linux 8 for SAP HANA (amd64) image for all VMs as this image contains the required SAP and HA subscriptions. A list of images is available [here](https://cloud.ibm.com/docs/vpc?topic=vpc-about-images) <br/> Default value: "ibm-redhat-8-6-amd64-sap-hana-5"

**Activity Tracker input parameters:**

Parameter | Description
----------|------------
ATR_NAME | The name of the EXISTING Activity Tracker instance, in the same region chosen for SAP system deployment. The list of available Activity Tracker is available [here](https://cloud.ibm.com/observe/activitytracker)

**SAP input parameters:**

Parameter | Description | Requirements
Expand Down Expand Up @@ -219,8 +214,8 @@ HANA DB | 2.0 SPS07 rev73 | 51057281.ZIP

OS version | Image | Role
-----------|-----------|-----------
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-5 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-9 | DB/APP
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-6 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-10 | DB/APP

---
S/4HANA 2022
Expand All @@ -241,8 +236,8 @@ HANA DB | 2.0 SPS07 rev73 | 51057281.ZIP

OS version | Image | Role
-----------|-----------|-----------
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-5 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-9 | DB/APP
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-6 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-10 | DB/APP

---
S/4HANA 2021
Expand All @@ -263,8 +258,8 @@ HANA DB | 2.0 SPS07 rev73 | 51057281.ZIP

OS version | Image | Role
-----------|-----------|-----------
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-5 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-9 | DB/APP
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-6 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-10 | DB/APP

---
S/4HANA 2020
Expand All @@ -279,14 +274,14 @@ SAP IGS | 7.81 PL 3 | igsexe_3-70005417.sar
SAP IGS HELPER | PL 17 | igshelper_17-10010245.sar
SAP HOST AGENT | 7.22 SP61 | SAPHOSTAGENT61_61-80004822.SAR
HANA CLIENT | 2.17 | IMDB_CLIENT20_017_22-80002082.SAR
HANA DB | 2.0 SPS05 rev59.05 | 51056441.ZIP
HANA DB | 2.0 SPS07 rev73 | 51057281.ZIP

**OS images validated for this solution:**

OS version | Image | Role
-----------|-----------|-----------
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-4 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-7 | DB/APP
Red Hat Enterprise Linux 8.6 for SAP HANA (amd64) | ibm-redhat-8-6-amd64-sap-hana-6 | DB/APP
Red Hat Enterprise Linux 8.4 for SAP HANA (amd64) | ibm-redhat-8-4-amd64-sap-hana-10 | DB/APP

**Terraform version used to validate this solution:**

Expand Down Expand Up @@ -459,15 +454,14 @@ DB_HOSTNAME_2 = "hanadb-2"
# Default value: "hanadb-2"
# When the default value is used, the virtual hostname will automatically be changed based on <HANA_SID> to "hanadb-<hana_sid>-2"


DB_PROFILE = "mx2-16x128"
# The instance profile used for the HANA VSI. The list of certified profiles for HANA VSIs: https://cloud.ibm.com/docs/sap?topic=sap-hana-iaas-offerings-profiles-intel-vs-vpc
# Details about all x86 instance profiles: https://cloud.ibm.com/docs/vpc?topic=vpc-profiles).
# For more information about supported DB/OS and IBM Gen 2 Virtual Server Instances (VSI), check [SAP Note 2927211: SAP Applications on IBM Virtual Private Cloud](https://launchpad.support.sap.com/#/notes/2927211)
# Default value: "mx2-16x128"

DB_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-5"
# OS image for DB VSI. Supported OS images for DB VSIs: ibm-redhat-8-6-amd64-sap-hana-5, ibm-redhat-8-4-amd64-sap-hana-9
DB_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-6"
# OS image for DB VSI. OS images validated for DB VSIs: ibm-redhat-8-6-amd64-sap-hana-6, ibm-redhat-8-4-amd64-sap-hana-10
# The list of available VPC Operating Systems supported by SAP: SAP note '2927211 - SAP Applications on IBM Virtual Private Cloud (VPC) Infrastructure environment' https://launchpad.support.sap.com/#/notes/2927211; The list of all available OS images: https://cloud.ibm.com/docs/vpc?topic=vpc-about-images
# Example: DB_IMAGE = "ibm-redhat-8-4-amd64-sap-hana-9"

Expand All @@ -488,19 +482,11 @@ APP_HOSTNAME_2 = "sapapp-2"
APP_PROFILE = "bx2-4x16"
# The APP VSI profile. Supported profiles: bx2-4x16. The list of available profiles: https://cloud.ibm.com/docs/vpc?topic=vpc-profiles&interface=ui

APP_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-5"
# OS image for SAP APP VSI. Supported OS images for APP VSIs: ibm-redhat-8-6-amd64-sap-hana-5, ibm-redhat-8-4-amd64-sap-hana-9.
APP_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-6"
# OS image for SAP APP VSI. OS images validated for APP VSIs: ibm-redhat-8-6-amd64-sap-hana-6, ibm-redhat-8-4-amd64-sap-hana-10.
# The list of available VPC Operating Systems supported by SAP: SAP note '2927211 - SAP Applications on IBM Virtual Private Cloud (VPC) Infrastructure environment' https://launchpad.support.sap.com/#/notes/2927211; The list of all available OS images: https://cloud.ibm.com/docs/vpc?topic=vpc-about-images
# Example: APP_IMAGE = "ibm-redhat-8-4-amd64-sap-hana-9"

##########################################################
# Activity Tracker variables:
##########################################################

ATR_NAME = "Activity-Tracker-SAP-eu-de"
# The name of the EXISTING Activity Tracker instance, in the same region chosen for SAP system deployment.
# Example: ATR_NAME="Activity-Tracker-SAP-eu-de"

##########################################################
# S/4HANA version
##########################################################
Expand Down Expand Up @@ -530,17 +516,17 @@ HANA_COMPONENTS = "server"
# SAP HANA Components. Default: server. Supported values: all, client, es, ets, lcapps, server, smartda, streaming, rdsync, xs, studio, afl, sca, sop, eml, rme, rtl, trp
# Example: HANA_COMPONENTS = "server"

KIT_SAPHANA_FILE = "/storage/HANADB/51057281.ZIP"
KIT_SAPHANA_FILE = "/storage/HANADB/SP07/Rev73/51057281.ZIP"
# SAP HANA Installation kit path
# Validated SAP HANA versions for S/4HANA 2023 on Red Hat 8: HANA 2.0 SP 7 Rev 73, kit file: 51057281.ZIP
# Validated SAP HANA versions for S/4HANA 2022, 2021, 2020 on Red Hat 8: HANA 2.0 SP 5 Rev 57, kit file: 51056441.ZIP
# Example for Red Hat 8: KIT_SAPHANA_FILE = "/storage/HANADB/51056441.ZIP"
# Example for Red Hat 8: KIT_SAPHANA_FILE = "/storage/HANADB/SP07/Rev73/51057281.ZIP"

##########################################################
# SAP system configuration
##########################################################

SAP_SID = "DEV"
SAP_SID = "S4A"
# SAP System ID
# Obs. This will be used also as identification number across different HA name resources. Duplicates are not allowed.

Expand Down
12 changes: 12 additions & 0 deletions ansible/hdbpacemaker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- hosts: hdb_iphost1,hdb_iphost2
gather_facts: true
pre_tasks:
- name: Import playbook variables
include_vars: "{{ item }}"
loop:
- "saphana-vars.yml"
- "hainfra-vars.yml"
roles:
- hdbpacemakercfg
...
42 changes: 42 additions & 0 deletions ansible/roles/hdbpacemakercfg/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# https://access.redhat.com/solutions/7029705

- name: Include OS specific variables
include_vars: "{{ ansible_distribution }}.yml"

- name: Check the prerequisites
include_tasks: "systemd_use_prerequisites.yml"

- name: Check if pacemaker.service.d directory exists
stat:
path: "/etc/systemd/system/pacemaker.service.d"
register: pacemaker_service_d_status
when: use_systemd == true

- name: Create a directory for pacemaker in systemd
file:
path: "/etc/systemd/system/pacemaker.service.d"
state: directory
mode: 0755
when: use_systemd == true and not pacemaker_service_d_status.stat.exists

# The name of the service used in Jinja file can be found by running the command: systemd-cgls -u SAP.slice

- name: Check if pacemaker.conf file exists
stat:
path: "/etc/systemd/system/pacemaker.service.d/{{ hana_sysno }}-pacemaker.conf"
register: pacemaker_conf_status
when: use_systemd == true

- name: Generate the pacemaker file
template:
src: pacemaker.j2
dest: "/etc/systemd/system/pacemaker.service.d/{{ hana_sysno }}-pacemaker.conf"
mode: 0644
when: use_systemd == true and not pacemaker_conf_status.stat.exists

- name: Activate the file
systemd:
daemon_reload: yes
when: use_systemd == true
...
49 changes: 49 additions & 0 deletions ansible/roles/hdbpacemakercfg/tasks/systemd_use_prerequisites.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
- name: Check if HANA DB is installed
stat:
path: "/hana/shared/{{ hana_sid|upper }}/exe/linuxx86_64/hdb"
register: hdb_install_status

- name: Check if systemd usage is allowed for this OS major version
set_fact:
os_vers_ok: true
when: hdb_install_status.stat.exists and (ansible_distribution_major_version | int >= os_release_min | int)

- name: Run the command to get systemd version
shell: systemctl --version | grep systemd
register: systemd_info
changed_when: False
when: hdb_install_status.stat.exists and os_vers_ok is defined

- name: Extract systemd version
set_fact:
systemd_vers: "{{ systemd_info.stdout.split(' ')[1] | int }}"
when: systemd_info is defined

- name: Check if systemd usage is allowed for this systemd version
set_fact:
systemd_vers_ok: true
when: >-
systemd_vers is defined and (systemd_vers | int >= systemd_vers_min)
- name: Run the command to get SAP HANA SP
shell: su - {{ hana_sid | lower }}adm -c "HDB version | grep 'version:'"
register: hdb_versinfo
changed_when: False
when: systemd_vers_ok is defined

- name: Extract HANA SP
set_fact:
hana_sp: "{{ ((hdb_versinfo.stdout.split('.')[2])[:2]) | int }}"
when: hdb_versinfo is defined

- name: Check if systemd usage is allowed for this SAP HANA SP
set_fact:
hana_vers_ok: true
when: hana_sp is defined and (hana_sp | int >= hana_sp_min | int)

- name: Set variable for systemd usage
set_fact:
use_systemd: true
when: hana_vers_ok is defined
...
4 changes: 4 additions & 0 deletions ansible/roles/hdbpacemakercfg/templates/pacemaker.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Unit]
Description=Pacemaker needs the SAP HANA instance service
Wants=SAP{{ hana_sid | upper }}_{{ hana_sysno }}.service
After=SAP{{ hana_sid | upper }}_{{ hana_sysno }}.service
5 changes: 5 additions & 0 deletions ansible/roles/hdbpacemakercfg/vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
os_release_min: 8
systemd_vers_min: 239
hana_sp_min: 7
...
5 changes: 5 additions & 0 deletions ansible/roles/hdbpacemakercfg/vars/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
os_release_min: 15
systemd_vers_min: 234
hana_sp_min: 7
...
2 changes: 1 addition & 1 deletion ansible/roles/saphanainst/templates/hanaconfig.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ root_password=
sapadm_password=

# Register the SAP HANA System with systemd ( Default: y )
use_systemd=n
# use_systemd=n

# Directory containing a storage configuration
storage_cfg=
Expand Down
3 changes: 3 additions & 0 deletions ansible/sap-s4hana-ha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
- name: hdbclusterprimary.yml
ansible.builtin.import_playbook: hdbclusterprimary.yml

- name: hdbpacemaker.yml
ansible.builtin.import_playbook: hdbpacemaker.yml

- name: s4pasinst.yml
ansible.builtin.import_playbook: s4pasinst.yml

Expand Down
27 changes: 9 additions & 18 deletions input.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,16 @@ DB_HOSTNAME_2 = "hanadb-2"
# Default value: "hanadb-2"
# When the default value is used, the virtual hostname will automatically be changed based on <HANA_SID> to "hanadb-<hana_sid>-2"


DB_PROFILE = "mx2-16x128"
# The instance profile used for the HANA VSI. The list of certified profiles for HANA VSIs: https://cloud.ibm.com/docs/sap?topic=sap-hana-iaas-offerings-profiles-intel-vs-vpc
# Details about all x86 instance profiles: https://cloud.ibm.com/docs/vpc?topic=vpc-profiles).
# For more information about supported DB/OS and IBM Gen 2 Virtual Server Instances (VSI), check [SAP Note 2927211: SAP Applications on IBM Virtual Private Cloud](https://launchpad.support.sap.com/#/notes/2927211)
# Default value: "mx2-16x128"

DB_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-5"
# OS image for DB VSI. Supported OS images for DB VSIs: ibm-redhat-8-6-amd64-sap-hana-5, ibm-redhat-8-4-amd64-sap-hana-9
DB_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-6"
# OS image for DB VSI. OS images validated for DB VSIs: ibm-redhat-8-6-amd64-sap-hana-6, ibm-redhat-8-4-amd64-sap-hana-10
# The list of available VPC Operating Systems supported by SAP: SAP note '2927211 - SAP Applications on IBM Virtual Private Cloud (VPC) Infrastructure environment' https://launchpad.support.sap.com/#/notes/2927211; The list of all available OS images: https://cloud.ibm.com/docs/vpc?topic=vpc-about-images
# Example: DB_IMAGE = "ibm-redhat-8-4-amd64-sap-hana-9"
# Example: DB_IMAGE = "ibm-redhat-8-4-amd64-sap-hana-10"

##########################################################
# SAP APP VSI variables:
Expand All @@ -129,18 +128,10 @@ APP_HOSTNAME_2 = "sapapp-2"
APP_PROFILE = "bx2-4x16"
# The APP VSI profile. Supported profiles: bx2-4x16. The list of available profiles: https://cloud.ibm.com/docs/vpc?topic=vpc-profiles&interface=ui

APP_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-5"
# OS image for SAP APP VSI. Supported OS images for APP VSIs: ibm-redhat-8-6-amd64-sap-hana-5, ibm-redhat-8-4-amd64-sap-hana-9.
APP_IMAGE = "ibm-redhat-8-6-amd64-sap-hana-6"
# OS image for SAP APP VSI. OS images validated for APP VSIs: ibm-redhat-8-6-amd64-sap-hana-6, ibm-redhat-8-4-amd64-sap-hana-10.
# The list of available VPC Operating Systems supported by SAP: SAP note '2927211 - SAP Applications on IBM Virtual Private Cloud (VPC) Infrastructure environment' https://launchpad.support.sap.com/#/notes/2927211; The list of all available OS images: https://cloud.ibm.com/docs/vpc?topic=vpc-about-images
# Example: APP_IMAGE = "ibm-redhat-8-4-amd64-sap-hana-9"

##########################################################
# Activity Tracker variables:
##########################################################

ATR_NAME = ""
# The name of the EXISTING Activity Tracker instance, in the same region chosen for SAP system deployment.
# Example: ATR_NAME="Activity-Tracker-SAP-eu-de"
# Example: APP_IMAGE = "ibm-redhat-8-4-amd64-sap-hana-10"

##########################################################
# S/4HANA version
Expand Down Expand Up @@ -171,17 +162,17 @@ HANA_COMPONENTS = "server"
# SAP HANA Components. Default: server. Supported values: all, client, es, ets, lcapps, server, smartda, streaming, rdsync, xs, studio, afl, sca, sop, eml, rme, rtl, trp
# Example: HANA_COMPONENTS = "server"

KIT_SAPHANA_FILE = "/storage/HANADB/51057281.ZIP"
KIT_SAPHANA_FILE = "/storage/HANADB/SP07/Rev73/51057281.ZIP"
# SAP HANA Installation kit path
# Validated SAP HANA versions for S/4HANA 2023 on Red Hat 8: HANA 2.0 SP 7 Rev 73, kit file: 51057281.ZIP
# Validated SAP HANA versions for S/4HANA 2022, 2021, 2020 on Red Hat 8: HANA 2.0 SP 5 Rev 57, kit file: 51056441.ZIP
# Example for Red Hat 8: KIT_SAPHANA_FILE = "/storage/HANADB/51056441.ZIP"
# Example for Red Hat 8: KIT_SAPHANA_FILE = "/storage/HANADB/SP07/Rev73/51057281.ZIP"

##########################################################
# SAP system configuration
##########################################################

SAP_SID = "DEV"
SAP_SID = "S4A"
# SAP System ID
# Obs. This will be used also as identification number across different HA name resources. Duplicates are not allowed.

Expand Down
Loading

0 comments on commit 2b39962

Please sign in to comment.