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.
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
-
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
-
Fill in mandatory variables and if the desired optional variable in the .tf file.
-
Deploy
-
Run
terraform init
(only needed once) -
Run
terraform plan
to see what is going to be deployed. Verify if names, zones, sizes, etc. are as desired. -
Run
terrafom apply
to deploy the resources -
Run
terrafom destroy
to remove the resources -
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
For additional information see https://www.terraform.io/docs/index.html and https://cloud.google.com/docs/terraform
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 |
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 |
These sections describe requirements for using this module.
The following dependencies must be available:
- Terraform v0.13
- Terraform Provider for GCP plugin v4.0
Refer to the contribution guidelines for information on contributing to this module.
Please see our security disclosure process.