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.
Supported SAP solutions
Google Cloud provides Cloud Deployment Manager configurations for the following SAP solutions:
- SAP NetWeaver
- SAP HANA
- SAP ASE
- SAP MaxDB
- IBM Db2
- On Linux
- On Linux in an HA cluster on Linux
- On Windows
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:
resources: - name: sap_hana type: https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/sap_hana/sap_hana.py # # By default, this configuration file uses the latest release of the deployment # scripts for SAP on Google Cloud. To fix your deployments to a specific release # of the scripts, comment out the type property above and uncomment the type property below. # # type: https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/202103111102/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.
You can control which version of the Deployment Manager
template that your SAP deployments use by specifying a version timestamp on
type property in the YAML configuration file.
By default, when you download a new
type property specifies
latest as the version, which
means that your deployments always use the latest available version of
the Deployment Manager templates.
In the comments that follow the
type property is an alternative
property specification that includes the timestamp of the latest
available version at the time you downloaded the
resources: - name: sap_hana type: https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/sap_hana/sap_hana.py # # By default, this configuration file uses the latest release of the deployment # scripts for SAP on Google Cloud. To fix your deployments to a specific release # of the scripts, comment out the type property above and uncomment the type property below. # # type: https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/202103111102/dm-templates/sap_hana/sap_hana.py # properties: ...
If you need all of your deployments to use the same template
version, replace the
type property specification that includes
type property specification that includes the timestamp. For
resources: - name: sap_hana type: https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/202103111102/dm-templates/sap_hana/sap_hana.py properties: ...
When a timestamp is specified, all deployments use the version of the Deployment Manager template that corresponds to the specified timestamp.
You can see which template version Deployment Manager used for
an SAP deployment in the Google Cloud Console by clicking the name of
the deployment on the Deployments page
and then clicking Expanded config VIEW under Deployment properties.
The timestamp of the version appears after
startup-script in the
as shown in the following example:
metadata: items: - key: startup-script value: curl -s https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/202103111102/dm-templates/sap_hana/startup.sh | bash -s https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/202103111102/dm-templates
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 Cloud Customer Care 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/cloudsapdeploy/deploymentmanager/latest/dm-templates/template-directory/file-name.py wget https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/template-directory/file-name.py.schema wget https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/template-directory/startup.sh wget https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/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/cloudsapdeploy/deploymentmanager/latest/dm-templates/sap_hana/sap_hana.py wget https://storage.cloud.google.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/sap_hana/sap_hana.py.schema wget https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/dm-templates/sap_hana/startup.sh wget https://storage.googleapis.com/cloudsapdeploy/deploymentmanager/latest/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.
Deployment Script Troubleshooting
If you have any issues with your deployment, do not delete the deployment. Submit a case to Google Support and provide the following information:
- The URL of the documentation page that you were following to deploy the system.
- The name that you gave to the deployment. You can view all of the deployments in your GCP project on the Deployment Manager Deployments page.
- The date and time when the deployment was created. You can find the creation date and time in the Deployment properties section after clicking on the name of your deployment on the Deployments page.
- The names of the VMs that were to be deployed during deployment.
- A copy of the
template.yamlfile that was used.
- A copy of the
/var/log/messagesfile from the deployed VMs, if it is available.
- If you are creating your VMs from images that are stored in a Google Cloud
project that is not managed by Google Cloud, provide the following information:
- The name of the source project that contains the image.
- The name of the project in which you are deploying your SAP system.
- The name of the service account that your deployment is using.
If a service account is not specified in your
template.yamlfile, the deployment is using the default Compute Engine service account.
- Which zones you are deploying your SAP systems into.