Skip to content

Commit

Permalink
Merge pull request #907 from SUSE/feat/hana_extra_parameters
Browse files Browse the repository at this point in the history
allow to add any extra parameters to the HANA installation
  • Loading branch information
yeoldegrove authored Jul 18, 2023
2 parents d7a9284 + 6e75b99 commit 2023510
Show file tree
Hide file tree
Showing 20 changed files with 186 additions and 64 deletions.
1 change: 1 addition & 0 deletions .codespell.ignore.words
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
msdos
aas
2 changes: 1 addition & 1 deletion aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 13 additions & 4 deletions aws/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 14 additions & 4 deletions aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <<EOF
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 = {
ignore = "check_min_mem",
install_execution_mode = "optimized"
}
EOF
}

variable "scenario_type" {
Expand Down
2 changes: 1 addition & 1 deletion azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module "common_variables" {
hana_cluster_vip = var.hana_ha_enabled ? 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
Expand Down
17 changes: 13 additions & 4 deletions azure/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,19 @@ hana_inst_master = "//YOUR_STORAGE_ACCOUNT_NAME.file.core.windows.net/sapdata/sa
# 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"
#}

# Each host IP address (sequential order). If it's not set the addresses will be auto generated from the provided vnet address range
#hana_ips = ["10.74.1.11", "10.74.1.12"]
Expand Down
18 changes: 14 additions & 4 deletions azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,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 = <<EOF
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 = {
ignore = "check_min_mem",
install_execution_mode = "optimized"
}
EOF
}

variable "scenario_type" {
Expand Down
2 changes: 1 addition & 1 deletion gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,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
Expand Down
17 changes: 13 additions & 4 deletions gcp/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,19 @@ hana_count = "2"
# 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"
#}

# Select HANA cluster fencing mechanism. 'native' by default
# Find more information in `doc/fencing.md` documentation page
Expand Down
18 changes: 14 additions & 4 deletions gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <<EOF
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 = {
ignore = "check_min_mem",
install_execution_mode = "optimized"
}
EOF
}

variable "scenario_type" {
Expand Down
16 changes: 13 additions & 3 deletions generic_modules/common_variables/hana_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,19 @@ variable "hana_ha_enabled" {
type = bool
}

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
variable "hana_extra_parameters" {
type = map(any)
description = <<EOF
This map allows to add any extra parameters to the HANA installation.
Have a look at the Parameter Reference:
https://help.sap.com/docs/SAP_HANA_PLATFORM/2c1988d620e04368aa4103bf26f17727/c16432a77b6144dcb75aace2b4fcacff.html
hana_extra_parameters = {
ignore = "check_min_mem,check_version",
install_execution_mode = "optimized"
}
EOF
}

variable "hana_cluster_fencing_mechanism" {
Expand Down
4 changes: 2 additions & 2 deletions generic_modules/common_variables/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ output "configuration" {
cluster_vip = var.hana_cluster_vip
cluster_vip_secondary = var.hana_cluster_vip_secondary
ha_enabled = var.hana_ha_enabled
ignore_min_mem_check = var.hana_ignore_min_mem_check
extra_parameters = var.hana_extra_parameters
fencing_mechanism = var.hana_cluster_fencing_mechanism
sbd_storage_type = var.hana_sbd_storage_type
scale_out_enabled = var.hana_scale_out_enabled
Expand Down Expand Up @@ -158,7 +158,7 @@ hana_client_extract_dir: ${var.hana_client_extract_dir}
hana_cluster_vip_mechanism: ${var.hana_cluster_vip_mechanism}
hana_cluster_vip: ${var.hana_cluster_vip}
hana_cluster_vip_secondary: ${var.hana_cluster_vip_secondary}
hana_ignore_min_mem_check: ${var.hana_ignore_min_mem_check}
hana_extra_parameters: {${join(", ", formatlist("'%s': '%s'", keys(var.hana_extra_parameters), values(var.hana_extra_parameters), ), )}}
hana_scale_out_enabled: ${var.hana_scale_out_enabled}
hana_scale_out_shared_storage_type: ${var.hana_scale_out_shared_storage_type}
hana_scale_out_addhosts: {${join(", ", formatlist("'%s': '%s'", keys(var.hana_scale_out_addhosts), values(var.hana_scale_out_addhosts), ), )}}
Expand Down
2 changes: 1 addition & 1 deletion libvirt/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,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
Expand Down
19 changes: 14 additions & 5 deletions libvirt/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,23 @@ hana_inst_master = "url-to-your-nfs-share:/sapdata/sap_inst_media/51053381"
# Enable system replication and HA cluster
#hana_ha_enabled = true

# 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"
#}

# 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"]
Expand Down
18 changes: 14 additions & 4 deletions libvirt/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <<EOF
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 = {
ignore = "check_min_mem",
install_execution_mode = "optimized"
}
EOF
}

variable "scenario_type" {
Expand Down
2 changes: 1 addition & 1 deletion openstack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,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
Expand Down
17 changes: 13 additions & 4 deletions openstack/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,19 @@ hana_cluster_vip_secondary = "10.0.0.13"
# 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"
#}

# Select HANA cluster fencing mechanism. 'native' by default
# Find more information in `doc/fencing.md` documentation page
Expand Down
18 changes: 14 additions & 4 deletions openstack/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <<EOF
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 = {
ignore = "check_min_mem",
install_execution_mode = "optimized"
}
EOF
}

variable "scenario_type" {
Expand Down
28 changes: 15 additions & 13 deletions pillar_examples/automatic/hana/hana.sls
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ hana:
{% endif %}
system_user_password: {{ grains['hana_master_password'] }}
sapadm_password: {{ grains['hana_master_password'] }}
{% if grains['hana_ignore_min_mem_check'] or grains['hana_scale_out_enabled'] %}
extra_parameters:
{% if grains['hana_ignore_min_mem_check'] %}
ignore: check_min_mem
{% endif %}
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'] }}
Expand Down Expand Up @@ -125,15 +125,15 @@ hana:
{% endif %}
system_user_password: {{ grains['hana_master_password'] }}
sapadm_password: {{ grains['hana_master_password'] }}
{% if grains['hana_ignore_min_mem_check'] or grains['hana_scale_out_enabled'] %}
extra_parameters:
{% if grains['hana_ignore_min_mem_check'] %}
ignore: check_min_mem
{% endif %}
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'] }}
Expand Down Expand Up @@ -171,10 +171,12 @@ hana:
{% endif %}
system_user_password: {{ grains['hana_cost_optimized_master_password'] }}
sapadm_password: {{ grains['hana_cost_optimized_master_password'] }}
{% if grains['hana_ignore_min_mem_check'] %}
extra_parameters:
ignore: check_min_mem
{% endif %}
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.get('monitoring_enabled', False) %}
exporter:
exposition_port: 9669
Expand Down
Loading

0 comments on commit 2023510

Please sign in to comment.