Skip to content

Latest commit

 

History

History
117 lines (93 loc) · 8.55 KB

File metadata and controls

117 lines (93 loc) · 8.55 KB

Terraform for SAP NW HA for Google Cloud

This template follows the documented steps https://cloud.google.com/solutions/sap/docs/netweaver-ha-config-sles and https://cloud.google.com/solutions/sap/docs/netweaver-ha-config-rhel and deploys GCP and Pacemaker resources up to the installation of SAP's central services.

Set up Terraform

Install Terraform on the machine you would like to use to deploy from by following https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/gcp-get-started#install-terraform

How to deploy

  1. Download .tf file into an empty directory curl https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/sap_nw_ha/terraform/sap_nw_ha.tf -o sap_nw_ha.tf

  2. Fill in mandatory variables and if the desired optional variable in the .tf file.

  3. Deploy

  4. Run terraform init (only needed once)

  5. Run terraform plan to see what is going to be deployed. Verify if names, zones, sizes, etc. are as desired.

  6. Run terrafom apply to deploy the resources

  7. Run terrafom destroy to remove the resources

  8. Continue installation of SAP software and setup of remaining cluster resources as per documentation at https://cloud.google.com/solutions/sap/docs/netweaver-ha-config-sles or https://cloud.google.com/solutions/sap/docs/netweaver-ha-config-rhel

Additional information

For additional information see https://www.terraform.io/docs/index.html and https://cloud.google.com/docs/terraform

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
custom_primary_metadata Optional - default is empty. Custom metadata to be added to the primary VM. map(string) {} no
custom_secondary_metadata Optional - default is empty. Custom metadata to be added to the secondary VM. map(string) {} no
ers_backend_svc_name Name of ERS backend service string "" no
ers_forw_rule_name Name of ERS forwarding rule string "" no
ers_hc_name Name of ERS health check string "" no
ers_hc_port Port of ERS health check string "" no
ers_inst_group_name Name of ERS instance group string "" no
ers_vip_address Address of ERS virtual IP string "" no
ers_vip_name Name of ERS virtual IP string "" no
hc_firewall_rule_name Name of firewall rule for the health check string "" no
hc_network_tag Network tag for the health check firewall rule list(string) [] no
linux_image Linux image name string n/a yes
linux_image_project Linux image project string n/a yes
machine_type Machine type for the instances string n/a yes
network Network for the instances string n/a yes
network_tags Network tags to apply to the instances list(string) [] no
nfs_path NFS path for shared file system, e.g. 10.163.58.114:/ssd string n/a yes
pacemaker_cluster_name Name of Pacemaker cluster. string "" no
post_deployment_script Specifies the location of a script to run after the deployment is complete.
The script should be hosted on a web server or in a GCS bucket. The URL should
begin with http:// https:// or gs://. Note that this script will be executed
on all VM's that the template creates. If you only want to run it on the master
instance you will need to add a check at the top of your script.
string "" no
primary_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
primary_startup_url DO NOT USE string `"curl -s https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform/sap_nw_ha/nw_ha_startup_scs.sh bash -s https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform"`
project_id Project id where the instances will be created string n/a yes
public_ip Create an ephemeral public ip for the instances bool false no
sap_deployment_debug Debug log level for deployment bool false no
sap_ers_instance_number ERS instance number string "10" no
sap_nw_abap Is this a Netweaver ABAP installation. Set 'false' for NW Java. Dual stack is not supported by this script. bool true no
sap_primary_instance Name of first instance (initial SCS location) string n/a yes
sap_primary_zone Zone where the first instance will be created string n/a yes
sap_scs_instance_number SCS instance number string "00" no
sap_secondary_instance Name of second instance (initial ERS location) string n/a yes
sap_secondary_zone Zone where the second instance will be created string n/a yes
sap_sid SAP System ID string n/a yes
scs_backend_svc_name Name of SCS backend service string "" no
scs_forw_rule_name Name of SCS forwarding rule string "" no
scs_hc_name Name of SCS health check string "" no
scs_hc_port Port of SCS health check string "" no
scs_inst_group_name Name of SCS instance group string "" no
scs_vip_address Address of SCS virtual IP string "" no
scs_vip_name Name of SCS virtual IP string "" no
secondary_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
secondary_startup_url DO NOT USE string `"curl -s https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform/sap_nw_ha/nw_ha_startup_ers.sh bash -s https://storage.googleapis.com/cloudsapdeploy/terraform/latest/terraform"`
service_account Service account that will be used as the service account on the created instance.
Leave this blank to use the project default service account
string "" no
subnetwork Subnetwork for the instances string n/a yes
swap_size Size in GB of swap volume number 8 no
usr_sap_size Size of /usr/sap in GB number 8 no

Outputs

Name Description
ers_instance ERS instance
nw_forwarding_rules Forwarding rules
nw_hc Health Checks
nw_hc_firewall Firewall rule for the Health Checks
nw_instance_groups NW Instance Groups
nw_regional_backend_services Backend Services
nw_vips NW virtual IPs
scs_instance SCS instance

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.