diff --git a/README.md b/README.md index efbcab7..3d0fbc6 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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: `_usr_sap_vg`, logical volume: `_usr_sap_lv`) - 1 volume x 10 GB for a 2 GB SWAP logical volume (volume group: `_swap_vg`, logical volume: `_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: @@ -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).
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)
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)
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 @@ -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 @@ -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 @@ -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 @@ -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:** @@ -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 to "hanadb--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" @@ -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 ########################################################## @@ -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. diff --git a/ansible/hdbpacemaker.yml b/ansible/hdbpacemaker.yml new file mode 100644 index 0000000..077b361 --- /dev/null +++ b/ansible/hdbpacemaker.yml @@ -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 +... diff --git a/ansible/roles/hdbpacemakercfg/tasks/main.yml b/ansible/roles/hdbpacemakercfg/tasks/main.yml new file mode 100644 index 0000000..032ba73 --- /dev/null +++ b/ansible/roles/hdbpacemakercfg/tasks/main.yml @@ -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 +... diff --git a/ansible/roles/hdbpacemakercfg/tasks/systemd_use_prerequisites.yml b/ansible/roles/hdbpacemakercfg/tasks/systemd_use_prerequisites.yml new file mode 100644 index 0000000..474ed8c --- /dev/null +++ b/ansible/roles/hdbpacemakercfg/tasks/systemd_use_prerequisites.yml @@ -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 +... diff --git a/ansible/roles/hdbpacemakercfg/templates/pacemaker.j2 b/ansible/roles/hdbpacemakercfg/templates/pacemaker.j2 new file mode 100644 index 0000000..9b6961a --- /dev/null +++ b/ansible/roles/hdbpacemakercfg/templates/pacemaker.j2 @@ -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 diff --git a/ansible/roles/hdbpacemakercfg/vars/RedHat.yml b/ansible/roles/hdbpacemakercfg/vars/RedHat.yml new file mode 100644 index 0000000..c8bd580 --- /dev/null +++ b/ansible/roles/hdbpacemakercfg/vars/RedHat.yml @@ -0,0 +1,5 @@ +--- +os_release_min: 8 +systemd_vers_min: 239 +hana_sp_min: 7 +... diff --git a/ansible/roles/hdbpacemakercfg/vars/Suse.yml b/ansible/roles/hdbpacemakercfg/vars/Suse.yml new file mode 100644 index 0000000..226a0a7 --- /dev/null +++ b/ansible/roles/hdbpacemakercfg/vars/Suse.yml @@ -0,0 +1,5 @@ +--- +os_release_min: 15 +systemd_vers_min: 234 +hana_sp_min: 7 +... diff --git a/ansible/roles/saphanainst/templates/hanaconfig.cfg b/ansible/roles/saphanainst/templates/hanaconfig.cfg index d4852f7..e22da26 100644 --- a/ansible/roles/saphanainst/templates/hanaconfig.cfg +++ b/ansible/roles/saphanainst/templates/hanaconfig.cfg @@ -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= diff --git a/ansible/sap-s4hana-ha.yml b/ansible/sap-s4hana-ha.yml index 12a2ac2..83e93b9 100644 --- a/ansible/sap-s4hana-ha.yml +++ b/ansible/sap-s4hana-ha.yml @@ -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 diff --git a/input.auto.tfvars b/input.auto.tfvars index 863790f..abfd25a 100644 --- a/input.auto.tfvars +++ b/input.auto.tfvars @@ -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 to "hanadb--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: @@ -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 @@ -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. diff --git a/variables.tf b/variables.tf index e8a1da1..79085dc 100644 --- a/variables.tf +++ b/variables.tf @@ -47,8 +47,8 @@ variable "REGION" { type = string description = "The cloud region where to deploy the solution. The regions and zones for VPC are available here: https://cloud.ibm.com/docs/containers?topic=containers-regions-and-zones#zones-vpc. Supported locations in IBM Cloud Schematics: https://cloud.ibm.com/docs/schematics?topic=schematics-locations." validation { - condition = contains(["au-syd", "jp-osa", "jp-tok", "eu-de", "eu-gb", "ca-tor", "us-south", "us-east", "br-sao"], var.REGION ) - error_message = "The REGION must be one of: au-syd, jp-osa, jp-tok, eu-de, eu-gb, ca-tor, us-south, us-east, br-sao." + condition = contains(["eu-de", "eu-gb", "us-south", "us-east", "ca-tor", "au-syd", "jp-osa", "jp-tok", "eu-es", "br-sao"], var.REGION ) + error_message = "The REGION must be one of: eu-de, eu-gb, us-south, us-east, ca-tor, au-syd, jp-osa, jp-tok, eu-es, br-sao." } } @@ -65,7 +65,7 @@ variable "ZONE_1" { type = string description = "Availability zone for DB_HOSTNAME_1 and APP_HOSTNAME_1 VSIs, in the same VPC. Supported zones: https://cloud.ibm.com/docs/containers?topic=containers-regions-and-zones#zones-vpc" validation { - condition = length(regexall("^(eu-de|eu-gb|us-south|us-east)-(1|2|3)$", var.ZONE_1)) > 0 + condition = length(regexall("^(eu-de|eu-gb|us-south|us-east|ca-tor|au-syd|jp-osa|jp-tok|eu-es|br-sao)-(1|2|3)$", var.ZONE_1)) > 0 error_message = "The ZONE is not valid." } } @@ -83,7 +83,7 @@ variable "ZONE_2" { type = string description = "Availability zone for DB_HOSTNAME_2 and APP_HOSTNAME_2 VSIs, in the same VPC. Supported zones: https://cloud.ibm.com/docs/containers?topic=containers-regions-and-zones#zones-vpc. If the same value as for ZONE_1 is used, and the value for SUBNET_1 is the same with the value for SUBNET_2, the deployment will be done in a single zone. If the values for ZONE_1, SUBNET_1 are different than the ones for ZONE_2, SUBNET_2 then an SAP Multizone deployment will be done." validation { - condition = length(regexall("^(eu-de|eu-gb|us-south|us-east)-(1|2|3)$", var.ZONE_2)) > 0 + condition = length(regexall("^(eu-de|eu-gb|us-south|us-east|ca-tor|au-syd|jp-osa|jp-tok|eu-es|br-sao)-(1|2|3)$", var.ZONE_2)) > 0 error_message = "The ZONE is not valid." } } @@ -110,7 +110,7 @@ variable "DOMAIN_NAME" { type = string description = "The Domain Name used for DNS and ALB. Duplicates are not allowed. The list with DNS resources can be found here: https://cloud.ibm.com/resources." nullable = false - default = "example.com" + default = "ha.mzexample.com" validation { condition = length(var.DOMAIN_NAME) > 2 && length (regex("^[a-z]*||^[0-9]*||\\.||\\-", var.DOMAIN_NAME)) > 0 && length (regex("[\\.]", var.DOMAIN_NAME)) > 0 && length (regexall("[\\&]|[\\%]|[\\!]|[\\@]|[\\#]|[\\*]|[\\^]", var.DOMAIN_NAME)) == 0 error_message = "The DOMAIN_NAME variable should not be empty and must contain at least one \".\" as a separator and no special chars are allowed." @@ -189,7 +189,7 @@ variable "DB_PROFILE" { variable "DB_IMAGE" { type = string description = "The OS image for the HANA 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." - default = "ibm-redhat-8-6-amd64-sap-hana-5" + default = "ibm-redhat-8-6-amd64-sap-hana-6" } variable "DB_HOSTNAME_1" { @@ -230,7 +230,7 @@ variable "APP_PROFILE" { variable "APP_IMAGE" { type = string description = "The OS image for the 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." - default = "ibm-redhat-8-6-amd64-sap-hana-5" + default = "ibm-redhat-8-6-amd64-sap-hana-6" } variable "APP_HOSTNAME_1" { @@ -371,16 +371,6 @@ variable "USRSAP_TRANS" { default = 80 } -############################################################## -# The variables used in Activity Tracker service. -############################################################## - -variable "ATR_NAME" { - type = string - description = "The name of the EXISTING Activity Tracker instance, in the same region as HANA VSI. The list of available Activity Tracker is available here: https://cloud.ibm.com/observe/activitytracker" - default = "" -} - ############################################################## # The variables and data sources used in SAP Ansible Modules. ############################################################## @@ -489,7 +479,7 @@ variable "HANA_COMPONENTS" { variable "KIT_SAPHANA_FILE" { type = string description = "Path to SAP HANA ZIP file, as downloaded from SAP Support Portal." - default = "/storage/HANADB/51057281.ZIP" + default = "/storage/HANADB/SP07/Rev73/51057281.ZIP" } variable "SAP_SID" { @@ -584,25 +574,4 @@ variable "KIT_S4HANA_EXPORT" { type = string description = "Path to S/4HANA Installation Export dir. The archives downloaded from SAP Support Portal should be present in this path." default = "/storage/S4HANA/2023" -} - -locals { - ATR_ENABLE = true -} - -resource "null_resource" "check_atr_name" { - count = local.ATR_ENABLE == true ? 1 : 0 - lifecycle { - precondition { - condition = var.ATR_NAME != "" && var.ATR_NAME != null - error_message = "The name of an EXISTENT Activity Tracker in the same region must be specified." - } - } -} - -data "ibm_resource_instance" "activity_tracker" { - count = local.ATR_ENABLE == true ? 1 : 0 - name = var.ATR_NAME - location = var.REGION - service = "logdnaat" } \ No newline at end of file