From 4a4abd60cbc277d58d863b7a46ccc1d6f283e0fe Mon Sep 17 00:00:00 2001 From: Eike Waldt Date: Mon, 12 Jun 2023 07:49:36 +0200 Subject: [PATCH 1/5] allow to add any extra parameters to the HANA installation (deprecates hana_ignore_min_mem_check) --- aws/main.tf | 2 +- aws/terraform.tfvars.example | 17 ++++++++++---- aws/variables.tf | 18 +++++++++++---- azure/main.tf | 2 +- azure/terraform.tfvars.example | 17 ++++++++++---- azure/variables.tf | 18 +++++++++++---- gcp/main.tf | 2 +- gcp/terraform.tfvars.example | 17 ++++++++++---- gcp/variables.tf | 18 +++++++++++---- .../common_variables/hana_variables.tf | 16 +++++++++++--- generic_modules/common_variables/outputs.tf | 4 ++-- libvirt/main.tf | 2 +- libvirt/terraform.tfvars.example | 19 +++++++++++----- libvirt/variables.tf | 18 +++++++++++---- openstack/main.tf | 2 +- openstack/terraform.tfvars.example | 17 ++++++++++---- openstack/variables.tf | 18 +++++++++++---- pillar_examples/automatic/hana/hana.sls | 22 ++++++++++--------- 18 files changed, 168 insertions(+), 61 deletions(-) diff --git a/aws/main.tf b/aws/main.tf index ad7f45016..fe3fc159e 100644 --- a/aws/main.tf +++ b/aws/main.tf @@ -118,7 +118,7 @@ module "common_variables" { hana_cluster_vip = local.hana_cluster_vip hana_cluster_vip_secondary = var.hana_active_active ? local.hana_cluster_vip_secondary : "" hana_ha_enabled = var.hana_ha_enabled - hana_ignore_min_mem_check = var.hana_ignore_min_mem_check + hana_extra_parameters = var.hana_extra_parameters hana_cluster_fencing_mechanism = var.hana_cluster_fencing_mechanism hana_sbd_storage_type = var.sbd_storage_type hana_scale_out_enabled = var.hana_scale_out_enabled diff --git a/aws/terraform.tfvars.example b/aws/terraform.tfvars.example index 28b1e7624..dafc42bce 100644 --- a/aws/terraform.tfvars.example +++ b/aws/terraform.tfvars.example @@ -227,10 +227,19 @@ cluster_ssh_key = "salt://sshkeys/cluster.id_rsa" # Enable system replication and HA cluster #hana_ha_enabled = true -# Disable minimal memory checks for HANA. Useful to deploy development clusters. -# Low memory usage can cause a failed deployment. Be aware that this option does -# not work with any memory size and will most likely fail with less than 16 GiB -#hana_ignore_min_mem_check = false +# This map allows to add any extra parameters to the HANA installation (inside the installation configfile). +# For more details about the parameters, have a look at the Parameter Reference, e.g. +# https://help.sap.com/docs/SAP_HANA_PLATFORM/2c1988d620e04368aa4103bf26f17727/c16432a77b6144dcb75aace2b4fcacff.html +# Some examples: +#hana_extra_parameters = { +# # needed for HANA 2.0 >= SPS07 as +# # the local secure store component (LSS) can only be installed in optimized installation mode. +# install_execution_mode = "optimized", +# # Disable minimal memory checks for HANA. Useful to deploy development clusters. +# # Low memory usage can cause a failed deployment. Be aware that this option does +# # not work with any memory size and will most likely fail with less than 16 GiB +# ignore = "check_min_mem" +#} # The next variables define how the HANA installation software is obtained. # The installation software must be located in a AWS S3 bucket diff --git a/aws/variables.tf b/aws/variables.tf index e0d842a26..95e80e45f 100644 --- a/aws/variables.tf +++ b/aws/variables.tf @@ -531,10 +531,20 @@ variable "hana_cluster_vip_secondary" { } } -variable "hana_ignore_min_mem_check" { - description = "Disable the min mem check imposed by hana allowing it to run with under 24 GiB" - type = bool - default = false +variable "hana_extra_parameters" { + type = map(any) + default = {} + description = <= SPS07 as +# # the local secure store component (LSS) can only be installed in optimized installation mode. +# install_execution_mode = "optimized", +# # Disable minimal memory checks for HANA. Useful to deploy development clusters. +# # Low memory usage can cause a failed deployment. Be aware that this option does +# # not work with any memory size and will most likely fail with less than 16 GiB +# ignore = "check_min_mem" +#} # Select HANA cluster fencing mechanism. 'native' by default # Find more information in `doc/fencing.md` documentation page diff --git a/gcp/variables.tf b/gcp/variables.tf index 672e6094b..7e4a3a249 100644 --- a/gcp/variables.tf +++ b/gcp/variables.tf @@ -473,10 +473,20 @@ variable "hana_cluster_vip_secondary" { } } -variable "hana_ignore_min_mem_check" { - description = "Disable the min mem check imposed by hana allowing it to run with under 24 GiB" - type = bool - default = false +variable "hana_extra_parameters" { + type = map(any) + default = {} + description = <= SPS07 as +# # the local secure store component (LSS) can only be installed in optimized installation mode. +# install_execution_mode = "optimized", +# # Disable minimal memory checks for HANA. Useful to deploy development clusters. +# # Low memory usage can cause a failed deployment. Be aware that this option does +# # not work with any memory size and will most likely fail with less than 16 GiB +# ignore = "check_min_mem" +#} + # Select SBD as fencing mechanism for the HANA cluster #hana_cluster_fencing_mechanism = "sbd" -# Disable minimal memory checks for HANA. Useful to deploy development clusters. -# Low memory usage can cause a failed deployment. Be aware that this option does -# not work with any memory size and will most likely fail with less than 16 GiB -#hana_ignore_min_mem_check = false - # More configuration about the HANA machines # Set the IP addresses for the HANA machines. Leave this commented to get an autogenerated addresses #hana_ips = ["192.168.XXX.Y", "192.168.XXX.Y+1"] diff --git a/libvirt/variables.tf b/libvirt/variables.tf index 675187086..ee9e371fa 100644 --- a/libvirt/variables.tf +++ b/libvirt/variables.tf @@ -418,10 +418,20 @@ variable "hana_cluster_vip_secondary" { } } -variable "hana_ignore_min_mem_check" { - description = "Disable the min mem check imposed by hana allowing it to run with under 24 GiB" - type = bool - default = false +variable "hana_extra_parameters" { + type = map(any) + default = {} + description = <= SPS07 as +# # the local secure store component (LSS) can only be installed in optimized installation mode. +# install_execution_mode = "optimized", +# # Disable minimal memory checks for HANA. Useful to deploy development clusters. +# # Low memory usage can cause a failed deployment. Be aware that this option does +# # not work with any memory size and will most likely fail with less than 16 GiB +# ignore = "check_min_mem" +#} # Select HANA cluster fencing mechanism. 'native' by default # Find more information in `doc/fencing.md` documentation page diff --git a/openstack/variables.tf b/openstack/variables.tf index ef231cdbc..d932843c7 100644 --- a/openstack/variables.tf +++ b/openstack/variables.tf @@ -477,10 +477,20 @@ variable "hana_fstype" { default = "xfs" } -variable "hana_ignore_min_mem_check" { - description = "Disable the min mem check imposed by hana allowing it to run with under 24 GiB" - type = bool - default = false +variable "hana_extra_parameters" { + type = map(any) + default = {} + description = < Date: Tue, 11 Jul 2023 12:01:22 +0200 Subject: [PATCH 2/5] make sure to add Local Secure Store user passwords fixes installation problems on HANA 2.0 SPS07 --- pillar_examples/automatic/hana/hana.sls | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pillar_examples/automatic/hana/hana.sls b/pillar_examples/automatic/hana/hana.sls index ba66126f4..2e8e66912 100644 --- a/pillar_examples/automatic/hana/hana.sls +++ b/pillar_examples/automatic/hana/hana.sls @@ -76,15 +76,15 @@ hana: {% endif %} system_user_password: {{ grains['hana_master_password'] }} sapadm_password: {{ grains['hana_master_password'] }} - {% if grains['hana_extra_parameters'] or grains['hana_scale_out_enabled'] %} extra_parameters: + lss_user_password: {{ grains['hana_master_password'] }} + lss_backup_password: {{ grains['hana_master_password'] }} {% for key, val in grains['hana_extra_parameters'].items() %} {{ key }}: {{ val }} {% endfor %} {% if grains['hana_scale_out_enabled'] %} addhosts: {{ addhosts.site1 }} {% endif %} - {% endif %} {%- if grains.get('ha_enabled') %} primary: name: {{ grains['hana_primary_site'] }} @@ -125,15 +125,15 @@ hana: {% endif %} system_user_password: {{ grains['hana_master_password'] }} sapadm_password: {{ grains['hana_master_password'] }} - {% if grains['hana_extra_parameters'] or grains['hana_scale_out_enabled'] %} extra_parameters: + lss_user_password: {{ grains['hana_master_password'] }} + lss_backup_password: {{ grains['hana_master_password'] }} {% for key, val in grains['hana_extra_parameters'].items() %} {{ key }}: {{ val }} {% endfor %} {% if grains['hana_scale_out_enabled'] %} addhosts: {{ addhosts.site2 }} {% endif %} - {% endif %} {%- if grains.get('ha_enabled') %} secondary: name: {{ grains['hana_secondary_site'] }} @@ -171,12 +171,12 @@ hana: {% endif %} system_user_password: {{ grains['hana_cost_optimized_master_password'] }} sapadm_password: {{ grains['hana_cost_optimized_master_password'] }} - {% if grains['hana_extra_parameters'] %} extra_parameters: + lss_user_password: {{ grains['hana_master_password'] }} + lss_backup_password: {{ grains['hana_master_password'] }} {% for key, val in grains['hana_extra_parameters'].items() %} {{ key }}: {{ val }} {% endfor %} - {% endif %} {% if grains.get('monitoring_enabled', False) %} exporter: exposition_port: 9669 From 52b330d03522165e6e4f5595920166c03a679e2f Mon Sep 17 00:00:00 2001 From: Eike Waldt Date: Tue, 18 Jul 2023 09:55:51 +0200 Subject: [PATCH 3/5] ci: add more codespell ignore --- .codespell.ignore.words | 1 + 1 file changed, 1 insertion(+) diff --git a/.codespell.ignore.words b/.codespell.ignore.words index b822b7971..e0af130a6 100644 --- a/.codespell.ignore.words +++ b/.codespell.ignore.words @@ -1 +1,2 @@ msdos +aas From 057d9ea3e54c0cc85bb049bcd900146e3b838af1 Mon Sep 17 00:00:00 2001 From: Eike Waldt Date: Tue, 18 Jul 2023 09:56:19 +0200 Subject: [PATCH 4/5] make sure salt-shaptools states and modules are found workaround for SLES12 --- salt/provision.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/salt/provision.sh b/salt/provision.sh index c96c10e5e..318287f27 100644 --- a/salt/provision.sh +++ b/salt/provision.sh @@ -158,6 +158,19 @@ predeploy () { deploy () { # Execute SAP and HA installation with the salt formulas if [[ $(get_grain role) =~ .*_node ]]; then + # make sure salt-shaptools states and modules are found + # workaround for SLES12 + source /etc/os-release + if [[ $VERSION_ID =~ ^12\.? ]]; then + sleep 10 + salt-call --local \ + --log-level=info \ + --log-file=/var/log/salt-deployment-sync.log \ + --log-file-level=info \ + --retcode-passthrough \ + $(salt_color_flag) \ + saltutil.sync_all + fi # shellcheck disable=SC2046 salt-call --local \ --log-level=$(get_grain provisioning_log_level) \ From 6e75b99c24882e16455d3696d788386218bea5e8 Mon Sep 17 00:00:00 2001 From: Eike Waldt Date: Tue, 18 Jul 2023 09:59:07 +0200 Subject: [PATCH 5/5] ci: silence shellcheck --- salt/provision.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/provision.sh b/salt/provision.sh index 318287f27..73794c0d2 100644 --- a/salt/provision.sh +++ b/salt/provision.sh @@ -163,6 +163,7 @@ deploy () { source /etc/os-release if [[ $VERSION_ID =~ ^12\.? ]]; then sleep 10 + # shellcheck disable=SC2046 salt-call --local \ --log-level=info \ --log-file=/var/log/salt-deployment-sync.log \