This deployment guide shows you how to deploy and connect to a Compute Engine virtual machine (VM) that is ready for the installation of SAP MaxDB on a Windows Server operating system.
The instructions in this guide use Cloud Deployment Manager to deploy and configure the VM, the Windows Server operating system, and the required disk volumes for SAP MaxDB.
For details on planning your deployment, see the SAP MaxDB Planning Guide.
If you do not already have a Google Cloud project with billing enabled, you must create one before you can deploy a VM for your SAP MaxDB installation.
To create a project:
Sign in to your Google Account.
If you don't already have one, sign up for a new account.
In the Cloud Console, on the project selector page, select or create a Google Cloud project.
Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.
gcloud command environment
These instructions use
Cloud Shell to enter
gcloud commands that deploy or configure
your Google Cloud resources. Cloud Shell is accessed through the
Cloud Console in your browser.
Cloud Shell runs on a VM that Google Cloud provisions each time
you start Cloud Shell. The first time you use Cloud Shell,
Google Cloud also creates a persistent
$HOME directory for you,
which is restored each time you open Cloud Shell.
The provisioned VM includes the latest
which provides the
gcloud command-line interface. Therefore, the
commands that you use in Cloud Shell are the same as
those you would use in a locally installed instance of the Cloud SDK.
If you have the Cloud SDK installed, you can issue the
commands that are used in these instructions from your local machine. However,
with a locally installed Cloud SDK you must always make sure that you
are using the latest version of the Cloud SDK.
Whether you use Cloud Shell or Cloud SDK, you can
can set and change the properties of your
gcloud command environment and save
them as a configuration. Configurations are collections of key-value pairs
that influence the behavior of the
Some basic actions you can take with a configuration in Cloud Shell include:
Initialize a configuration with
Check the settings of your current gcloud configuration with
gcloud config list.
Change the Google Cloud project you are working in with
gcloud config set project [PROJECT_ID]where
[PROJECT_ID]represents your Google Cloud project.
Set a default region with
gcloud config set compute/region [REGION]where
[REGION]represents a Google Cloud region.
Set a default zone with
gcloud config set compute/zone [ZONE]where
[ZONE]represents a Google Cloud zone.
Create a new configuration with
gcloud config configurations create [NAME]where
[NAME]represents the name for the configuration.
For more information about working with configurations, see Managing Cloud SDK configurations.
Creating a network
For security purposes, create a new network. You can control who has access by adding firewall rules or by using another access control method.
If your project has a default VPC network, don't use it. Instead, create your own VPC network so that the only firewall rules in effect are those that you create explicitly.
During deployment, VM instances typically require access to the internet to download Google's monitoring agent. If you are using one of the SAP-certified Linux images that are available from Google Cloud, the VM instance also requires access to the internet in order to register the license and to access OS vendor repositories. A configuration with a NAT gateway and with VM network tags supports this access, even if the target VMs do not have external IPs.
To set up networking:
Go to Cloud Shell.
To create a new network in the custom subnetworks mode, run:
gcloud compute networks create [YOUR_NETWORK_NAME] --subnet-mode custom
[YOUR_NETWORK_NAME]is the name of the new network. The network name can contain only lowercase characters, digits, and the dash character (-).
--subnet-mode customto avoid using the default auto mode, which automatically creates a subnet in each Compute Engine region. For more information, see Subnet creation mode.
Create a subnetwork, and specify the region and IP range:
gcloud compute networks subnets create [YOUR_SUBNETWORK_NAME] \ --network [YOUR_NETWORK_NAME] --region [YOUR_REGION] --range [YOUR_RANGE]
[YOUR_SUBNETWORK_NAME]is the new subnetwork.
[YOUR_NETWORK_NAME]is the name of the network you created in the previous step.
[REGION]is the region where you want the subnetwork.
[YOUR_RANGE]is the IP address range, specified in CIDR format, such as 10.1.0.0/24. If you plan to add more than one subnetwork, assign non-overlapping CIDR IP ranges for each subnetwork in the network. Note that each subnetwork and its internal IP ranges are mapped to a single region.
Optionally, repeat the previous step and add additional subnetworks.
Setting up a NAT gateway
If you intend to create one or more VMs that will not have public IP addresses, you must create a NAT gateway so that your VMs can access the Internet to download Google's monitoring agent.
If you intend to assign an external public IP address to your VM, you can skip this step.
To create a NAT gateway:
Create a VM to act as the NAT gateway in the subnet you just created:
gcloud compute instances create [YOUR_VM_NAME] --can-ip-forward \ --zone [YOUR_ZONE] --image-family [YOUR_IMAGE_FAMILY] \ --image-project [YOUR_IMAGE_PROJECT] \ --machine-type=[YOUR_MACHINE_TYPE] --subnet [YOUR_SUBNETWORK_NAME] \ --metadata startup-script="sysctl -w net.ipv4.ip_forward=1; iptables \ -t nat -A POSTROUTING -o eth0 -j MASQUERADE" --tags [YOUR_VM_TAG]
[YOUR_VM_NAME]is the name of the VM you are creating that want to use for the NAT gateway.
[YOUR_ZONE]is the zone where you want the VM.
[YOUR_IMAGE_PROJECT]specify the image you want to use for the NAT gateway.
[YOUR_MACHINE_TYPE]is any supported machine type. If you expect high network traffic, choose a machine type with that has at least eight virtual CPUs.
[YOUR_SUBNETWORK_NAME]is the name of the subnetwork where you want the VM.
[YOUR_VM_TAG]is a tag that is applied to the VM you are creating. If you use this VM as a bastion host, this tag is used to apply the related firewall rule only to this VM.
Create a route that is tagged so that traffic passes through the NAT VM instead of the default Internet gateway:
gcloud compute routes create [YOUR_ROUTE_NAME] \ --network [YOUR_NETWORK_NAME] --destination-range 0.0.0.0/0 \ --next-hop-instance [YOUR_VM_NAME] --next-hop-instance-zone \ [YOUR_ZONE] --tags [YOUR_TAG_NAME] --priority 800
[YOUR_ROUTE_NAME]is the name of the route you are creating.
[YOUR_NETWORK_NAME]is the network you created.
[YOUR_VM_NAME]is the VM you are using for your NAT gateway.
[YOUR_ZONE]is the zone where the VM is located.
[YOUR_TAG_NAME]is the tag on the route that directs traffic through the NAT VM.
If you also want to use the NAT gateway VM as a bastion host, run the following command. This command creates a firewall rule that allows inbound SSH access to this instance from the Internet:
gcloud compute firewall-rules create allow-ssh --network [YOUR_NETWORK_NAME] --allow tcp:22 --source-ranges 0.0.0.0/0 --target-tags "[YOUR_VM_TAG]"
[YOUR_NETWORK_NAME]is the network you created.
[YOUR_VM_TAG]is the tag you specified when you created the NAT gateway VM. This tag is used so this firewall rule applies only to the VM that hosts the NAT gateway, and not to all VMs in the network.
Deploying a Windows VM for SAP MaxDB with Cloud Deployment Manager
The following instructions use Cloud Deployment Manager to deploy a VM instance with Windows and all of the persistent disks that SAP MaxDB requires.
About Cloud Deployment Manager
In these instructions, you define the resource options for your installation in a Cloud Deployment Manager configuration file template.
Cloud Deployment Manager treats all of the resources that are created for your SAP system as a single entity called a deployment. You can view and work with all of the deployments for your project on the Deployments page in the Cloud Console.
Be aware of the following behaviors when using Cloud Deployment Manager:
- Deleting a deployment deletes all of the resources associated with the deployment, including the VMs, the persistent disks, and any SAP systems that are installed on the VM.
By default, Cloud Deployment Manager uses the
ACQUIREresource creation policy. If you specify a VM name that is already in use by another VM in your project, Cloud Deployment Manager doesn't create a new VM, but instead adds the existing VM to your new deployment. If your original VM was created by a previous run of Cloud Deployment Manager, the VM is associated with two deployments.
If you then delete the new deployment, the acquired VM is deleted from the deployment that originally created it. To avoid such a scenario, either set the Cloud Deployment Manager resource policy to
CREATE, or make sure that you use unique resource names in your new deployment.
For information about the policies you can use while creating resources with Cloud Deployment Manager and how to specify them, see the Cloud Deployment Manager documentation.
Open the Cloud Shell.
Download the template.yaml configuration file template to your working directory by entering the following command in the Cloud Shell:
Optionally, rename the template.yaml file to identify the configuration it defines. For example, maxdb-win-2016.yaml.
Open the template.yaml file in Cloud Shell code editor.
To open the Cloud Shell code editor, click the pencil icon in the upper right corner of the Cloud Shell terminal window.
In the template.yaml file, update the following property values by replacing the brackets and their contents with the values for your installation.
Property Data type Description instanceName String The name of the VM instance on which SAP MaxDB will be installed. The name must be 13 characters or less and be specified in lowercase letters, numbers, or hyphens. instanceType String The type of Compute Engine virtual machine on which SAP MaxDB will be installed. Specify a machine type with two or more vCPUs. For example,
n1-standard-4. If you are running SAP MaxDB on the same VM as SAP NetWeaver, select a machine type that includes enough CPUs and memory to support both systems. See the SAP NetWeaver Planning Guide.
zone String The zone in which you are deploying your SAP MaxDB. It must be in the same region that you selected for your subnetwork. subnetwork String The name of the subnetwork that you created in a previous step. If you are deploying to a shared VPC, specify this value as [SHAREDVPC_PROJECT]/[SUBNETWORK]. For example, myproject/network1. windowsImage String The name of the Windows operating- system image or image family that you are using with SAP MaxDB. To specify an image family, add the prefix family/ to the family name. For example, family/windows-2016. To specify a specific image, specify only the image name. For the list of available image families, see the Images page in the Cloud console. windowsImageProject String The Google Cloud project that contains the image you are going to use. This project might be your own project or a Google Cloud image project, such as windows-cloud. For a list of GCP image projects, see the Images page in the Compute Engine documentation. maxdbRootSize Integer The size in GB of MaxDB (D:), which is the root directory of the database instance. The minimum and default values for maxdbRootSize are both 8 GB. maxdbDataSize Integer The size of MaxDB Data (E:), which holds the database data files. The minimum and default values for maxdbDataSize are both 30 GB. maxdbLogSize Integer The size of MaxDB Log (L:), which holds the database transaction logs. The minimum and default values for maxdbLogSize are both 8 GB. maxdbBackupSize Integer The size of the Backup (X:) volume. This property is optional. If set to 0 or omitted, no disk is created. maxdbDataSSD boolean Specifies whether the data drive uses an SSD persistent disk (
Yes) or an HDD persistent disk (
Yesis the default.
maxdbLogSSD boolean Specifies whether the log drive uses an SSD persistent disk (
Yes) or an HDD persistent disk (
Yesis the default. SSD is recommended for the log drive.
usrsapSize Integer Required only if you are installing SAP MaxDB to run with SAP NetWeaver on the same VM instance. In the deployed VM, this volume is labeled SAP (S:). swapSize Integer Required only if you are installing SAP MaxDB to run with SAP NetWeaver on the same VM instance. In the deployed VM, this volume is labeled Pagefile (P:).
The following configuration file creates a VM that is configured to run both the SAP MaxDB database server and SAP NetWeaver. The configuration file directs Cloud Deployment Manager to deploy an n1-standard-16 virtual that is running a Windows Server 2016 operating system. The VM includes all of the directories that are required to run SAP MaxDB with NetWeaver.
imports: - path: https://storage.googleapis.com/sapdeploy/dm-templates/sap_maxdb-win/sap_maxdb-win.py resources: - name: sap_maxdb-win type: https://storage.googleapis.com/sapdeploy/dm-templates/sap_maxdb-win/sap_maxdb-win.py properties: instanceName: ex-vm-maxdb-win instanceType: n1-standard-16 zone: us-central1-f subnetwork: example-sub-network windowsImage: family/windows-2016 windowsImageProject: windows-cloud maxdbRootSize: 10 maxdbDataSize: 50 maxdbLogSize: 30 maxdbBackupSize: 100 maxdbDataSSD: Yes maxdbLogSSD: Yes usrsapSize: 15 swapSize: 24
Deploy the VM:
gcloud deployment-manager deployments create [DEPLOYMENT-NAME] --config [TEMPLATE-NAME].yaml
The above command invokes the Cloud Deployment Manager, which deploys the VM, all according to the specifications in your template.yaml file. The process might take a few minutes. To check the progress of your deployment, follow the steps in the next section.
The following steps use Stackdriver Logging, which might incur charges. For more information, see Stackdriver pricing.
Open Stackdriver Logging to check for errors and monitor the progress of the installation.
On the Resources tab, select Global as your logging resource. If
INSTANCE DEPLOYMENT COMPLETEis displayed for a VM, Cloud Deployment Manager processing is complete for the VM.
After the SAP MaxDB system deploys, connect to your VM as described in the next section, Connecting to your VM, to confirm that all of the required data volumes exist and that they have the expected capacities. The
Pagefiledrive should be almost full.
If any of the validation steps show that the installation failed:
- Correct the error.
- On the Deployments page, delete the deployment to clean up the VMs and persistent disks from the failed installation.
- Rerun your deployment.
Connecting to your VM
To connect to a Windows-based VM, you must first generate a password for the VM. You can then connect to the VM using RDP or PowerShell.
After you create a Windows VM, you must generate a password for the VM before you can connect to it.
Go to the VM instances page.
Open the VM instance details page by clicking the name of the VM that you just created.
On the instance details page, click the Set Windows Password button. A password is generated for you. Copy the password and store it in a secure place.
If your firewall allows access on port 3389, you can use RDP to connect to a Windows instance and start a Remote Desktop session. To connect to your VM by using PowerShell, see Using PowerShell.
Connect to the remote desktop on Windows instances using one of the following methods:
- Use a Chrome browser that has the Chrome RDP for Google Cloud extension installed and establish an RDP connection from the Cloud Console.
Download the RDP file and manually connect through the Windows Remote Desktop Connection client or a third-party client.
If the Chrome RDP for Google Cloud extension is not installed already in your Chrome browser, install it now.
To check for the Chrome RDP for Google Cloud Platform extension, enter
chrome://extensions/in you browser address bar and look for the extension under Chrome Apps on the Extensions page of your Chrome browser.
Go to the VM instances page in the in the Cloud Console.
Click the RDP button next to the instance that you want to connect to. A new browser window opens with the Chrome RDP for Google Compute Engine extension.
Enter your username and password. If this is your first time connecting to this instance, or if you have forgotten your password, create or reset your Windows password.
Click OK to connect.
- Install an RDP client. If you don't have a preference, install the Chrome RDP for Google Compute Engine extension.
- Get your Windows VM's external IP address. Go to the
VM instances page
in the Cloud Console or run
gcloud compute instances listto see a list of your instances with their external IP values.
In your RDP client, provide your VM's external IP address as the IP address to connect to. For example, in the Chrome RDP extension, you would enter the IP address in the following format:
Enter your sign-in information and leave the Domain field blank. If this is your first time connecting to this VM, or if you have forgotten your password, create or reset your Windows password.
- If you have not created a username and password on the Windows VM yet, create your Windows password.
- Add a firewall rule or edit your existing firewall rule to open port 5986 on the GCP network where your Windows Server VM is located.
- On your local workstation, open the PowerShell terminal.
Optionally, you can initialize a variable to hold your user credentials so you do not need to enter them each time you connect to the instance. If you skip this step, you receive a prompt for your username and password later.
$credentials = Get-Credential
Use the Enter-PSSession command to start a remote PowerShell session and include the flags to use SSL and skip credentials checks.
Enter-PSSession -ComputerName [IP_ADDRESS] -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck) -Credential $credentials
Installing the database
Now that your operating system is configured, you can install your SAP MaxDB database. MaxDB is typically installed with the SAP product with which it will be used.
To install SAP MaxDB on your VM:
- Use RDP or Windows PowerShell to connect to your Windows-based VM.
- Download the SAP Software Provisioning Manager (SWPM), the SAP product installation media, and MaxDB installation Media according to SAP installation guides.
- Install your SAP product and SAP MaxDB database according to the SAP installation guides for your SAP product. For additional guidance, see the SAP MaxDB documentation.
SAP provides additional installation information in SAP Note 1020175 - FAQ: SAP MaxDB installation, upgrade or applying a patch.
Performing post-deployment tasks
Before using your SAP MaxDB instance, we recommend that you perform the following post-deployment steps:
- Update your SAP MaxDB software with the latest patches, if available.
- Install any additional components.
- Configure and back up your new SAP MaxDB database.
For more information, see SAP MaxDB Database Administration.