You can automate the deployment of Google Cloud infrastructure by using Cloud Deployment Manager, a service that automates the creation and management of Google Cloud resources.
For select SAP solutions and supporting databases, such as SAP HANA, Google Cloud provides pre-defined Cloud Deployment Manager configuration templates that you can use to deploy Google Cloud infrastructure that meets SAP supportability requirements and best practices.
Google Cloud provides Cloud Deployment Manager configurations for the following SAP solutions:
- SAP NetWeaver on Linux or Windows
- SAP HANA scaleup, scaleout with host-auto failover, and scaleup in a Linux HA cluster.
- SAP ASE on Linux or Windows
- SAP MaxDB on Linux or Windows
- IBM Db2 on Linux, Windows, or in an HA cluster on Linux.
What the templates deploy
All of the Deployment Manager templates that Google Cloud provides for SAP deployments configure or deploy the following elements:
- One or more Compute Engine virtual machines (VMs)
- An OS image that you specify
- One or more standard hard disk (HDD) or solid-state (SSD) Compute Engine persistent disk drives
- Optionally, an Identity and Access Management (IAM) service account that you specify for use by the VMs
- The Google Cloud APIs that are required by the SAP deployment
- Optionally, network tags for each VM instance
- Optionally, a public IP address for each VM instance
For SAP HANA, the Deployment Manager templates also deploy:
- Storage volumes for
- Optionally, the SAP HANA system itself
- For SAP HANA scaleup systems, a Linux high availability cluster
For SAP NetWeaver, the Deployment Manager templates also deploy:
- Storage volumes for
/usr/sap, and a swap volume
- The Google Cloud monitoring agent for SAP NetWeaver
Deployment Manager files for each SAP deployment
Each pre-defined Deployment Manager configuration for SAP contains following set of files:
- A YAML configuration file,
- A Python template file,
deployment-type.py, such as
- A Python schema file,
deployment-type.py.schema, such as
- At least one shell script,
You specify the properties of your Google Cloud resources
template.yaml configuration file.
template.yaml configuration file
template.yaml configuration files that are provided for SAP deployments
conform to the standards defined by Deployment Manager.
The configuration files provided for SAP include the primary resource definition followed by a comment section that contains advanced properties that are less commonly used. The following example is an excerpt from the template.yaml file for SAP HANA:
imports: - path: https://storage.googleapis.com/sapdeploy/dm-templates/sap_hana/sap_hana.py > resources: - name: sap_hana type: https://storage.googleapis.com/sapdeploy/dm-templates/sap_hana/sap_hana.py properties: instanceName: [VM_NAME] instanceType: [MACHINE_TYPE] zone: [ZONE] subnetwork: [SUBNETWORK] linuxImage: family/[IMAGE_FAMILY] linuxImageProject: [IMAGE_PROJECT] sap_hana_deployment_bucket: [MEDIA_BUCKET] sap_hana_sid: [SID] sap_hana_instance_number: [INSTANCE_NUMBER] sap_hana_sidadm_password: [PASSWORD] sap_hana_system_password: [PASSWORD] sap_hana_scaleout_nodes: [NUMBER_OF_WORKER_NODES] # # --- Advanced Options --- # The following advanced options are not usually needed. To use an advanced option, remove # the comment indicator, #, before the parameter name and specify an appropriate value. # # networkTag: [TAG] # Adds network tags to your instance. This is useful if you do routing or define # firewall rules by tags. By default, no tags are added to your VM. Multiple tags # can be assigned by separating them with commas # ...
To use the advanced properties, remove the comment character,
#, and specify a
value for the property.
For more information configuration files, see Deployment Manager Fundamentals.
Deploying multiple resources with one configuration file
You can deploy multiple resources with a single configuration file by adding more resource definitions to the file.
For SAP deployments, copy the
properties: sections of the
pre-defined resource and paste it below to create the new resource definition.
In each resource definition, be sure to specify unique values for the following items:
You start a deployment by issuing the following command:
gcloud deployment-manager deployments create [DEPLOYMENT-NAME] --config [TEMPLATE-NAME].yaml
If you would like to preview the deployment results before actually
deploying any Google Cloud resources, append the
flag to the command.
When you start a deployment, Deployment Manager validates
the specifications in the
template.yaml file against definitions
that are contained in the
file. If validation is successful, Deployment Manager creates
the Google Cloud resources by using the resource definitions in the
When Deployment Manager processing is complete, in the
Cloud Shell, Deployment Manager displays
COMPLETED for each of the resources it creates and passes
control to the shell script.
The shell script configures the deployed resources further and logs its progress in Cloud Logging. An SAP deployment is not complete until the shell scripts complete their processing.
Deployment Manager also creates an entry on the Deployments page in the Cloud Console, where you can find additional details about your deployment.
Advanced customization of the templates
Beyond adding VM definitions or other minor changes in the YAML configuration file, if you are an advanced user, you can customize the Deployment Manager templates that are provided by Google Cloud in other ways, but there are risks in doing so.
If you modify the templates, you assume the responsibility for the modified template, including making sure that it is up to date and that Deployment Manager can process it. You also assume responsibility for ensuring that the Google Cloud infrastructure and SAP systems that the modified templates deploy meet SAP and Google Cloud supportability requirements, including SAP requirements.
Modifications to the Deployment Manager templates also make it more difficult for Google Cloud to support your deployment. The SAP specialists in Google Cloud Support are familiar with the unmodified templates and the configurations that they deploy, but will not be familiar with your unique customizations. If you need support from Google Cloud for a deployment or configuration that uses a customized template, be prepared to explain your customizations and to wait longer for the support case to be resolved.
Before modifying the Deployment Manager templates that are provided by Google Cloud for SAP, make sure that you have an appropriately-skilled technical team available to advise on the changes, evaluate the impact of the changes on the performance of your system, and to help troubleshoot issues that might arise later. If you don't have such a team, implementation partners or Google Cloud Professional Services have specialists that can help.
To make changes, you need to understand:
- The SAP supportability requirements that are defined in the SAP documentation and SAP Notes that apply to your SAP products.
- Deployment Manager and how to work with deployments, configurations, and templates. See the Deployment Manager documentation.
- Depending on the type of change you are making, Python or shell scripting languages.
Types of advanced customization
Modifications that are considered advanced customizations include:
- Custom processing or actions in a post-deployment script. This is the recommended method for including advanced customizations in your deployments.
- The use of operating system types other than the supported versions of Red Hat Enterprise Linux for SAP or SUSE Linux Enterprise Server for SAP.
- Modifications to the backend scripts that are provided as part of the
- The shell scripts (bash or powershell).
- The Python dynamic configuration and schema files.
- For High Availability deployments:
- Customization of Pacemaker configuration settings. If you find a particular function to be missing, please provide feedback on the documentation page.
- Changes to the default template for HANA Scale-out deployment with standby nodes.
Regardless of the type of change you make, make sure that your changes result in an SAP system that is within the support scope that is defined by the SAP product documentation and SAP Notes that are applicable to your system.
Template files that you can customize
Google Cloud recommends that you limit customizations to the
configuration file, although you can modify the other
Deployment Manager files as well, as long as the resulting
SAP system meets SAP supportability requirements.
Which files you need to modify depends on the type of changes you need to make.
To add additional validation checks for property values
that are specific to your environment, you can add the property definitions
deployment-type.py file, you can make changes
- Add additional calculations on the values in the configuration file, such as IP ranges or disk sizes. Note that changing disk sizes, especially for SAP HANA, can result in configuration that does not meet SAP support requirements.
- Add additional VM instance metadata.
- Adjust disk names.
Downloading the template files
To download the files you can use the following commands after you replace the red italic text with the values for the template you need:
wget https://storage.googleapis.com/sapdeploy/dm-templates/template-directory/file-name.py wget https://storage.googleapis.com/sapdeploy/dm-templates/template-directory/file-name.py.schema wget https://storage.googleapis.com/sapdeploy/dm-templates/template-directory/startup.sh wget https://storage.googleapis.com/sapdeploy/dm-templates/template-directory/template.yaml
For example, if you need to download the template files for a SAP HANA scaleup deployment, use the following commands:
wget https://storage.cloud.google.com/sapdeploy/dm-templates/sap_hana/sap_hana.py wget https://storage.cloud.google.com/sapdeploy/dm-templates/sap_hana/sap_hana.py.schema wget https://storage.googleapis.com/sapdeploy/dm-templates/sap_hana/startup.sh wget https://storage.googleapis.com/sapdeploy/dm-templates/sap_hana/template.yaml
Using your modified template files
When you are done modifying the template files, upload them to a
Cloud Storage bucket or a web server and update the URLs in the
template.yaml and other files to the file location.
You can use a post-deployment script to perform additional actions, like triggering installation of your SAP NetWeaver application, monitoring agents, and so forth.
Post-deployment scripts are the recommended way to customize your deployments because they get control only after the Google Cloud infrastructure is configured according to SAP supportability requirements.
To display status messages for post-deployment scripts, you need to code the scripts to write the messages to the logs. For more information, see the Cloud Logging documentation.
The status of post-deployment scripts are not included in the messages that Deployment Manager writes to the Cloud Shell or a local Cloud SDK shell session.