Skip to content

Latest commit

 

History

History
98 lines (77 loc) · 7.38 KB

File metadata and controls

98 lines (77 loc) · 7.38 KB

terraform-google-sap for SAP HANA Scaleout

This template follows the documented steps https://cloud.google.com/solutions/sap/docs/sap-hana-ha-scaleout-tf-deployment-guide and deploys an SAP HANA scale-out system that includes the SAP HANA host auto-failover fault-recovery solution.

Usage

Basic usage of this module is as follows:

module "hana_scaleout" {
  source  = "terraform-google-modules/sap/google//modules/sap_hana_scaleout"
  version = "~> 1.1"

  project_id          = "PROJECT_ID"          # example: my-project-x
  zone                = "ZONE"                # example: us-east1-b
  machine_type        = "MACHINE_TYPE"        # example: n1-highmem-32
  subnetwork          = "SUBNETWORK"          # example: default
  linux_image         = "LINUX_IMAGE"         # example: rhel-8-4-sap-ha
  linux_image_project = "LINUX_IMAGE_PROJECT" # example: rhel-sap-cloud
  instance_name       = "VM_NAME"             # example: hana-instance
  sap_hana_sid        = "SID"                 # example: ABC, Must conform to [a-zA-Z][a-zA-Z0-9]{2}
  sap_hana_shared_nfs = "HANA_SHARED_NFS"     # example: 10.10.10.10:/shared
  sap_hana_backup_nfs = "HANA_BACKUP_NFS"     # example: 10.10.10.10:/backup
}

Functional example is included in the examples directory.

Inputs

Name Description Type Default Required
can_ip_forward Whether sending and receiving of packets with non-matching source or destination IPs is allowed. bool true no
instance_name Hostname of the GCE instance. string n/a yes
linux_image Linux image name to use. string n/a yes
linux_image_project The project which the Linux image belongs to. string n/a yes
machine_type Machine type for the instances. string n/a yes
network_tags OPTIONAL - Network tags can be associated to your instance on deployment. This can be used for firewalling or routing purposes. list(string) [] no
post_deployment_script OPTIONAL - gs:// or https:// location of a script to execute on the created VM's post deployment. string "" no
primary_startup_url Startup script to be executed when the VM boots, should not be overridden. string `"curl -s BUILD.TERRA_SH_URL/sap_hana_scaleout/startup.sh bash -s BUILD.TERRA_SH_URL"`
project_id Project id where the instances will be created. string n/a yes
public_ip OPTIONAL - Defines whether a public IP address should be added to your VM. By default this is set to Yes. Note that if you set this to No without appropriate network nat and tags in place, there will be no route to the internet and thus the installation will fail. bool true no
reservation_name Use a reservation specified by RESERVATION_NAME.
By default ANY_RESERVATION is used when this variable is empty.
In order for a reservation to be used it must be created with the
"Select specific reservation" selected (specificReservationRequired set to true)
Be sure to create your reservation with the correct Min CPU Platform for the
following instance types:
n1-highmem-32 : Intel Broadwell
n1-highmem-64 : Intel Broadwell
n1-highmem-96 : Intel Skylake
n1-megamem-96 : Intel Skylake
m1-megamem-96 : Intel Skylake
All other instance types can have automatic Min CPU Platform"
string "" no
sap_deployment_debug OPTIONAL - If this value is set to true, the deployment will generates verbose deployment logs. Only turn this setting on if a Google support engineer asks you to enable debugging. bool false no
sap_hana_backup_nfs Google Filestore share for /hanabackup string n/a yes
sap_hana_deployment_bucket The GCS bucket containing the SAP HANA media. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. string "" no
sap_hana_instance_number The SAP instance number. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. number 0 no
sap_hana_shared_nfs Google Filestore share for /hana/shared string n/a yes
sap_hana_sid The SAP HANA SID. SID must adhere to SAP standard (Three letters or numbers and start with a letter) string n/a yes
sap_hana_sidadm_password The linux sidadm login password. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. Minimum requirement is 8 characters. string "" no
sap_hana_sidadm_password_secret The secret key used to retrieve the linux sidadm login from Secret Manager (https://cloud.google.com/secret-manager). The Secret Manager password will overwrite the clear text password from sap_hana_sidadm_password if both are set. string "" no
sap_hana_sidadm_uid The Linux UID of the adm user. By default this is set to 900 to avoid conflicting with other OS users. number 900 no
sap_hana_standby_nodes Number of standby nodes to create. number 1 no
sap_hana_system_password The SAP HANA SYSTEM password. If this is not defined, the GCE instance will be provisioned without SAP HANA installed. Minimum requirement is 8 characters with at least 1 number. string "" no
sap_hana_system_password_secret The secret key used to retrieve the SAP HANA SYSTEM login from Secret Manager (https://cloud.google.com/secret-manager). The Secret Manager password will overwrite the clear text password from sap_hana_system_password if both are set. string "" no
sap_hana_worker_nodes Number of worker nodes to create.
This is in addition to the primary node.
number 1 no
secondary_startup_url DO NOT USE string `"curl -s BUILD.TERRA_SH_URL/sap_hana_scaleout/startup_secondary.sh bash -s BUILD.TERRA_SH_URL"`
service_account OPTIONAL - Ability to define a custom service account instead of using the default project service account. string "" no
subnetwork The sub network to deploy the instance in. string n/a yes
zone Zone where the instances will be created. string n/a yes

Outputs

Name Description
hana_scaleout_standby_self_links List of self-links for the hana scaleout standbys created
hana_scaleout_worker_self_links List of self-links for the hana scaleout workers created
sap_hana_primary_self_link Self-link for the primary SAP HANA Scalout instance created.

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Security Disclosures

Please see our security disclosure process.