This deployment guide shows you how to deploy and connect to a Google Compute Engine VM running SAP Business One.
For more information about planning your deployment, see the SAP Business One planning guide.
Deploying SAP Business One on GCP
This solution uses a GCP install script to set up SAP Business One on GCP. The solution uses the following software:
- SAP HANA 1.0 SP12
- SAP Business One 9.2 PL08
Setting up your Google account
A Google account is required to work with GCP.
- Sign up for a Google account if you don't already have one.
- Log in to the Google Cloud Console, and create a new project.
- Enable your billing account.
- Configure SSH keys so that you are able to use them to SSH into your
Compute Engine instances. Use the
gcloudcommand-line tool to create a new SSH key, or, if you already have an existing SSH key, use the tool to format your existing SSH keys.
- Use the
gcloudcommand-line tool or Cloud Console to add the SSH keys to your project metadata. This allows you to access any Compute Engine instance created within this project, except for instances that explicitly disable project-wide SSH keys.
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.
Downloading SAP software
Download the SAP HANA and SAP Business One binaries.
Access the SAP installation page.
If your SAP Support Portal account does not allow access to the software and you believe that you should have access to the software, contact the SAP Global Support Customer Interaction Center.
Download all applicable parts of the following software to your local machine:
- SAP HANA Platf.Ed.1.0 SPS12
- SAP Business One 9.2 PL08
Use the Cloud Console to create a Cloud Storage bucket for storing the SAP HANA installation files. Note that the bucket name must be unique across GCP. During bucket creation, choose Standard in the Default storage class section, then choose us-west1 in the Location section.
Configure bucket permissions. By default, as owner of the bucket, you have read-write access to the bucket. If you want, you can allow other members in your group or individual users to access your bucket, as shown here:
In the Cloud Console, in the Cloud Storage bucket page, choose Upload Files to upload the software to your bucket from your local machine:
Note the name of the bucket that you uploaded the binaries to. You will need to use it when installing the SAP software.
Setting up configuration files
Next, set up the two configuration files that are used by the install script.
Create a text file named
install.cfgand add the following lines:
[General] components=server,client,afl [Server] # SAP HANA System ID sid=[SID] # Instance Number number=00 # SAP Host Agent User (sapadm) Password sapadm_password=[SAPADM_PASSWORD] # System Administrator Password password=[SYSTEM_ADMIN_PASSWORD] # Database User (SYSTEM) Password system_user_password=[SYSTEM_PASSWORD] Restart system after machine reboot? ( Default: n ) autostart=y
Create a text file named
b1.cfgand add the following lines:
SITE_USER_ID=B1SiteUser SITE_USER_PASSWORD=[SITE_USER_PASSWORD] SLD_CERTIFICATE_PASSWORD=[SLD_CERTIFICATE_PASSWORD] B1S_TECHUSER_PASSWORD=[B1S_TECHUSER_PASSWORD]
Upload these two files into the root of the Cloud Storage bucket you created in the previous steps.
Delete these two files from your local machine as a security precaution, because they contain password information.
Creating a VM for SAP HANA and SAP Business One
The following instructions create an SAP-certified
with all of the required disk configuration, and then install SAP HANA on the instance. Please refer
to the pricing
section to understand the costs.
Navigate to Cloud Shell.
Set the following environment variables. Replace
[YOUR_BUCKET]with your bucket name,
[NETWORK]with your network name, and
[SUBNETWORK]with your subnetwork name.
export INSTANCE_NAME="sapb1server" export INSTANCE_TYPE="n1-highmem-32" export ZONE="us-west1-b" export LINUX_VERSION="SLES 12 SP1" export NETWORK_NAME="[NETWORK]" export SUBNET="[SUBNETWORK]" export MEDIA_BUCKET="[YOUR_BUCKET]" export INSTALL_B1="YES"
Create the instance:
curl https://storage.googleapis.com/saphana/deployinit | bash
The above command specifies an installation script that initiates after VM creation completes. The script downloads the SAP HANA and SAP Business One software from your bucket, and installs the software using the values specified in the configuration files. The script takes approximately 40 minutes to complete.
Copy the internal and external IP addresses that appear when the script begins. You will need to use one of these addresses to connect to SAP Business One in the next step.
Verifying the SAP Business One installation
After approximately 40 minutes has passed, navigate to your SAP Business One site address. You can use a VPN to connect to the internal IP, or you can open ports on your instance to use the external IP. Access the following URL using the applicable IP address.
You should see the following screen:
Login using the following credentials:
B1SiteUser, which is the value defined in
- Password: The value defined in
Ensure that the login works and takes you to the SAP Business One landing page.
- Learn more about planning this deployment in the SAP Business One Planning Guide.