Set up IBM Cloud VPC landing zone infrastructure for SAP workloads
In this tutorial, you will learn how to set up the IBM Cloud® Virtual Private Cloud (VPC) landing zone that provides management services for your SAP workloads on IBM® Power® Virtual Server. You create a VPC, deploy virtual server instances for access and network services, and configure essential services including proxy, Network Time Protocol (NTP), and Domain Name System (DNS).
The following figure shows the VPC landing zone for SAP on Power Virtual Server.
The VPC landing zone that you create has the following architecture:
- A VPC with multiple subnets for different purposes (management, network services, and Virtual Private Endpoints (VPE)
- An access host (bastion) that provides secure SSH access to the environment
- A network services host that provides proxy, NTP, and DNS services
- Security groups and ACLs that control traffic flow
- A connection to Power Virtual Server through IBM Cloud Transit Gateway (configured in a later step)
Before you begin
Before you begin, ensure that you have:
- Completed the planning steps in Deploying infrastructure for SAP workloads on Power Virtual Server
- Sufficient IBM Cloud® Identity and Access Management (IAM) permissions to create and manage VPC resources
- An SSH key pair for authentication. For more information, see SSH keys
- A network design with non-overlapping IP address ranges for VPC subnets, Power Virtual Server networks, and on-premises networks
Create the VPC
Create a IBM Cloud VPC without default address prefixes to host the management services for your SAP landscape.
- Log in to the IBM Cloud console.
- Go to VPC Infrastructure > VPCs.
- Click Create.
- Enter a name for your VPC, such as
sap-management-vpc. - Select a resource group.
- Optionally, add tags for organization.
- In the Default address prefixes section, clear the checkbox for Create a default prefix for each zone to prevent automatic creation of address prefixes.
- Click Create virtual private cloud.
For detailed instructions, see Creating a VPC and subnet.
Create address prefixes
Create address prefixes that define the IP address ranges for your VPC. These prefixes are used when creating subnets.
The following table shows the recommended address prefixes:
| Address prefix purpose | Example IP address range |
|---|---|
| VPN services | 10.30.10.0/24 |
| Management services | 10.30.20.0/24 |
| VPE services | 10.30.30.0/24 |
| Network services | 10.30.40.0/24 |
- In your VPC details page, go to Address prefixes.
- Click Create.
- Create the first address prefix for VPN services:
- Enter a name, such as
vpn-prefix. - Select an availability zone.
- Enter an IP address range, such as
10.30.10.0/24. - Click Create.
- Enter a name, such as
- Create the second address prefix for management services:
- Enter a name, such as
management-prefix. - Select an availability zone.
- Enter an IP address range, such as
10.30.20.0/24. - Click Create.
- Enter a name, such as
- Create the third address prefix for VPE services:
- Enter a name, such as
vpe-prefix. - Select an availability zone.
- Enter an IP address range, such as
10.30.30.0/24. - Click Create.
- Enter a name, such as
- Create the fourth address prefix for network services:
- Enter a name, such as
network-services-prefix. - Select an availability zone.
- Enter an IP address range, such as
10.30.40.0/24. - Click Create.
- Enter a name, such as
Create subnets from address prefixes
Create subnets from the address prefixes you created. You need at least three subnets: one for VPN server, one for the access host, and one for network services.
The following table shows the recommended subnet layout:
| Subnet name | Address prefix | IP address range | Public gateway | Purpose |
|---|---|---|---|---|
| vpn-subnet | vpn-prefix | 10.30.10.0/24 | No | VPN server |
| management-subnet | management-prefix | 10.30.20.0/24 | No | Bastion host (access host) |
| vpe-subnet | vpe-prefix | 10.30.30.0/24 | No | Virtual Private Endpoints for Cloud Object Storage |
| network-services-subnet | network-services-prefix | 10.30.40.0/24 | Yes | Network services host |
- In your VPC details page, go to Subnets.
- Click Create.
- Create the VPN subnet from the VPN address prefix:
- Enter a name, such as
vpn-subnet. - Select the same availability zone as the VPN address prefix.
- Select the address prefix
vpn-prefix(10.30.10.0/24). - Leave the public gateway detached.
- Click Create subnet
- Enter a name, such as
- Create the management subnet from the management address prefix:
- Enter a name, such as
management-subnet. - Select the same availability zone as the management address prefix.
- Select the address prefix
management-prefix(10.30.20.0/24). - Leave the public gateway detached.
- Click Create subnet
- Enter a name, such as
- Create the VPE subnet from the VPE address prefix:
- Enter a name, such as
vpe-subnet. - Select the same availability zone as the VPE address prefix.
- Select the address prefix
vpe-prefix(10.30.30.0/24). - Leave the public gateway detached.
- Click Create subnet.
- Enter a name, such as
- Create the network services subnet from the network services address prefix:
- Enter a name, such as
network-services-subnet. - Select the same availability zone as the network services address prefix.
- Select the address prefix
network-services-prefix(10.30.40.0/24). - Attach a public gateway to enable internet access for software updates.
- Click Create subnet.
- Enter a name, such as
Configure security groups
Create security groups to control traffic to your virtual server instances, VPEs, and other resources. Security groups act as virtual firewalls that control inbound and outbound traffic.
Security group overview
You need to create three security groups for the VPC landing zone:
-
management-sg: Controls access to the bastion host (access host). Allows SSH access from IBM Cloud infrastructure, VPC subnets, Power Virtual Server networks, VPN client pool, and optionally from your trusted IP addresses.
-
network-services-sg: Controls access to the network services host. Allows all traffic from IBM Cloud infrastructure, VPC subnets, Power Virtual Server networks, and VPN client pool.
-
vpe-sg: Controls access to Virtual Private Endpoints for Cloud Object Storage. Allows all traffic from IBM Cloud infrastructure, VPC subnets, Power Virtual Server networks, and VPN client pool.
Create security groups
- In your VPC details page, go to Security groups.
- Click Create.
- Create each security group according to the rules in the following table.
The following table shows the security group rules for the VPC landing zone:
| Security group name | Inbound rules | Outbound rules | Attached resources |
|---|---|---|---|
| management-sg | Source: IBM Cloud infrastructure (161.26.0.0/16) Protocol: TCP, Port: 22 Source: VPC address prefixes (10.30.20.0/24, 10.30.30.0/24, 10.30.40.0/24) Source: Power Virtual Server management network Source: VPN client IP pool (if using VPN) Source: Your trusted IP addresses (optional) |
Destination: Any Protocol: All |
Access host (bastion) virtual server instance |
| network-services-sg | Source: IBM Cloud infrastructure (161.26.0.0/16) Protocol: All Source: VPC address prefixes (10.30.20.0/24, 10.30.30.0/24, 10.30.40.0/24) Source: Power Virtual Server management network Source: Power Virtual Server backup network Source: VPN client IP pool (if using VPN) |
Destination: Any Protocol: All |
Network services virtual server instance, load balancer, file share mount targets |
| vpe-sg | Source: IBM Cloud infrastructure (161.26.0.0/16) Protocol: All Source: VPC address prefixes (10.30.20.0/24, 10.30.30.0/24, 10.30.40.0/24) Source: Power Virtual Server management network Source: Power Virtual Server backup network Source: VPN client IP pool (if using VPN) |
Destination: Any Protocol: All |
Virtual Private Endpoints for Cloud Object Storage |
Replace the example IP address ranges with your actual network CIDRs: VPC address prefixes (for example, 10.30.10.0/24, 10.30.20.0/24, 10.30.30.0/24, 10.30.40.0/24), Power Virtual Server management network CIDR (for example, 10.51.0.0/24), Power Virtual Server backup network CIDR (for example, 10.52.0.0/24), and VPN client IP pool CIDR if you're using VPN (for example, 10.240.0.0/24).
For more information, see Configuring the security group for the instance.
Deploy the bastion or access host
Create a virtual server instance that serves as the access host (bastion) for your SAP landscape.
- Go to VPC Infrastructure > Virtual server instances.
- Click Create.
- Configure the virtual server instance:
- Enter a name, such as
sap-access-host. - Select your VPC.
- Select the management subnet.
- Select a Linux operating system image (RHEL 8.4 or later, or SLES 15 SP3 or later).
- Select the smallest profile (for example,
nxf-1x2) - Add your SSH key.
- Enter a name, such as
- In the Network interfaces section, click Edit on the primary network interface:
- Deselect the default security group.
- Select the
management-sgsecurity group. - Click Save.
- Click Create virtual server instance.
- Wait for the instance status to change to Running.
Enable floating IP for bastion or access host
Reserve and attach a floating IP address to the access host to enable external SSH access.
- In the access host instance details page, go to Network interfaces.
- Click Reserve next to Floating IP.
- Configure the floating IP:
- Enter a name, such as
access-host-fip. - Click Reserve.
- Enter a name, such as
- Note the floating IP address for SSH access.
For more information, see Reserving a floating IP address.
Verify access to the bastion/access host
Test SSH access to the access host using the floating IP address.
-
Open a terminal on your local machine.
-
Run the following SSH command (replace
<access_host_floating_ip>with your floating IP address):ssh -A -o ServerAliveInterval=60 -o ServerAliveCountMax=600 root@<access_host_floating_ip> -
Verify that you can successfully log in to the access host.
The ServerAliveInterval and ServerAliveCountMax parameters help maintain a stable SSH connection.
Deploy the network services host
Create a virtual server instance that provides essential network services to Power Virtual Server instances.
- Go to VPC Infrastructure > Virtual server instances.
- Click Create.
- Configure the virtual server instance:
- Enter a name, such as
sap-network-services. - Select your VPC.
- Select the network services subnet.
- Select a Linux operating system image (RHEL 9.4 or later).
- Select a profile with at least 2 vCPUs and 4 GB memory.
- Add your SSH key.
- Enter a name, such as
- In the Network interfaces section, click Edit on the primary network interface:
- Deselect the default security group.
- Select the
network-services-sgsecurity group. - Click Save.
- Click Create virtual server instance.
- Wait for the instance status to change to Running.
Verify access to the network services host
Test SSH access to the network services host through the access host.
-
Open a terminal on your local machine.
-
Run the following SSH command (replace
<access_host_floating_ip>and<network_services_host_private_ip>with your IP addresses):ssh -A -o ServerAliveInterval=60 -o ServerAliveCountMax=600 -o ProxyCommand="ssh -W %h:%p root@<access_host_floating_ip>" root@<network_services_host_private_ip> -
Verify that you can successfully log in to the network services host.
Create Virtual Private Endpoint for IBM Cloud Object Storage
Create a Virtual Private Endpoint (VPE) for IBM Cloud Object Storage to enable secure, private access to Cloud Object Storage from your VPC and Power Virtual Server instances.
- In the IBM Cloud console, go to VPC Infrastructure > Virtual private endpoints.
- Click Create.
- Configure the VPE gateway:
- Enter a name, such as
cos-vpe. - Select your VPC.
- Select your resource group.
- Enter a name, such as
- In the Service section:
- For Service category, select Cloud Object Storage.
- For Service offering, select Cloud Object Storage.
- The service endpoint will be automatically populated.
- In the Reserved IP section:
- Click Attach to attach a reserved IP.
- Select the
vpe-subnetthat you created earlier. - Select Auto-assign to automatically assign an IP address from the subnet.
- Click Attach.
- In the Security groups section:
- Deselect the default security group.
- Select the
vpe-sgsecurity group that you created earlier.
- Click Create virtual private endpoint.
- Wait for the VPE status to change to Stable.
- Note the reserved IP address assigned to the VPE. This IP address will be used to access Cloud Object Storage from your Power Virtual Server instances.
For more information about Virtual Private Endpoints, see About Virtual Private Endpoints for VPC.
Configure SQUID proxy server
Configure the SQUID proxy server to enable Power Virtual Server instances to access the internet for software updates and package installations.
You can use the ibm.power_linux_sap Ansible collection to automate this configuration. For more information, see the Ansible automation section at the end of this tutorial.
- Log in to the network services host using the SSH command from the previous step.
- Install SQUID:
yum update -y && yum install -y squid - Replace the contents of
/etc/squid/squid.confwith the contents from SQUID configuration file. - Enable and start the SQUID service:
systemctl enable squid systemctl restart squid systemctl status squid
Configure NTP service
Configure the NTP service to ensure time synchronization across all systems in your SAP landscape.
- Log in to the network services host.
- Install chrony:
yum update -y && yum install -y chrony - Edit
/etc/chrony.confand add the following lines (replace<pvs_mgmt_cidr>with your Power Virtual Server management network CIDR, such as10.51.0.0/24):local stratum 10 manual allow <pvs_mgmt_cidr> - Enable and start the chrony service:
systemctl enable chronyd systemctl start chronyd systemctl status chronyd
Configure DNS services
Configure DNS services for name resolution. You can choose between using IBM Cloud DNS service or configuring a DNS forwarder.
Option 1: Using IBM Cloud DNS service (recommended)
IBM Cloud DNS service is directly reachable from Power Virtual Server instances through a custom resolver.
- Create a DNS service instance. For more information, see Setting up an instance.
- Create DNS zones. For more information, see Managing DNS zones.
- Configure permitted networks. For more information, see Managing permitted networks.
- Create DNS records. For more information, see Managing DNS records.
- Configure a custom resolver with the VPE subnet as the location. For more information, see Configuring custom resolver.
The custom resolver provides private IP addresses that you can specify in Power Virtual Server subnet configurations.
Option 2: Configuring DNS forwarder
If you use your own DNS service, configure a DNS forwarder on the network services host.
- Log in to the network services host.
- Install BIND:
yum update -y && yum install -y bind - Edit
/etc/named.conf:- Add the following ACL at the beginning (replace
<pvs_mgmt_cidr>with your Power Virtual Server management network CIDR):acl allowed_clients { localhost; <pvs_mgmt_cidr>; }; - Add the following lines in the
optionssection:forwarders { 161.26.0.7; 161.26.0.8; 9.9.9.9; }; recursion yes; allow-query { allowed_clients; }; forward only;
- Add the following ACL at the beginning (replace
- Enable and start the DNS service:
systemctl enable named systemctl restart named systemctl status named
Automate with Ansible (optional)
You can automate the configuration of network services using the ibm.power_linux_sap Ansible collection.
- Install the Ansible collection:
ansible-galaxy collection install ibm.power_linux_sap - Update the variable file
playbook/vars/sample-variables-configure-network-services-host.yml:server_config: { squid: { enable: true }, ntp: { enable: true }, dns: { enable: true, dns_servers: "161.26.0.7; 161.26.0.8; 9.9.9.9;" } } - Run the Ansible playbook:
ansible-playbook --connection=local -i "localhost," playbooks/sample-configure-network-services-host.yml
Next steps
After you complete the VPC infrastructure setup, proceed with creating the Power Virtual Server workspace:
Alternatively, you can use the automated Deployable Architecture solution available in the IBM Cloud catalog to deploy the complete VPC landing zone using Terraform and Ansible. For more information, see Deploying the VPC landing zone for Power Virtual Server.