Prerequisites to Deploying an GCP Instance

Complete these steps before you deploy the SBC on Google Cloud platform.

Create a Virtual Private Cloud

On GCP, a virtual private cloud (VPC) must be created for each network interface. If you're deploying the SBC in standalone mode, create one management network and four media networks. If you're deploying the SBC in HA mode, create one management network, two HA networks, and four media networks.
  • wancom0
  • wancom1 (HA only)
  • wancom2 (HA only)
  • s0p0
  • s1p0
  • s0p1
  • s1p1
  1. From the Google Cloud navigation menu, click VPC network and then VPC networks.
  2. On the top bar, click CREATE VPC NETWORK.
  3. Enter a name for this network.
  4. Select the region.
  5. Under New subnet define the subnet's name, region, and CIDR.
  6. Select the IPv4 firewall rules for this network.

    If setting the firewall rules for the management interface wancom0, allow ICMP and SSH traffic. Otherwise, you can more clearly define firewall rules after creating the VPC.

  7. Click CREATE.

Repeat this process for each network interface.

Create Firewall Rules

Each network interface needs a dedicated firewall rule to govern traffic on that interface. When you create a firewall rule, you specify what kinds of traffic the firewall should match (such as incoming TCP traffic on port 22 from 10.2.2.0/24) and whether the traffic is allowed or denied.

  1. From the navigation menu, click VPC network and then Firewall.
  2. From the top menu, click CREATE FIREWALL RULE.
  3. Enter a name for this firewall rule.
  4. Select the VPC network that this firewall rule will apply to.
  5. Set the Direction of traffic to ingress or egress.
  6. Set the Action on match to allow or deny.
  7. Set the Targets field to All instances in the network.
  8. Enter the source ranges that the firewall rule will match.
  9. Select the protocols and ports that the firewall rule will match.
  10. Click CREATE.

Repeat this process for each network interface.

The following is an example of the cloud shell command to create a firewall rule for the s0p0 media interface that allows outgoing TCP traffic on port 5060 to any destination.

gcloud compute --project=<PROJECT-NAME> firewall-rules create s0p0-fw-out \
    --direction=EGRESS \
    --priority=1000 \
    --network=sbc-s0p0 \
    --action=ALLOW \
    --rules=tcp:5060 \
    --destination-ranges=0.0.0.0/0

Enable Network Peering

Network peering allows internal IP addresses to connect to each other. The SBC uses network peering to route traffic between media interfaces.

  1. From the navigation menu, click VPC network and then VPC network peering.
  2. From the top menu, click CREATE PEERING CONNECTION and then Continue.
  3. Enter a name for this peering connection.
  4. Enter the name of the first VPC network.
  5. Enter the name of the second VPC network.
  6. Select both Import subnet routes with public IP and Export subnet routes with public IP.
  7. Click CREATE.

To create peering in both directions, repeat the process but swap the values of the "VPC network name" field and the "Your VPC network" field.

Create a Bucket

Create a bucket to contain the KVM disk image.

  1. From the navigation menu, click Cloud Storage and then Buckets.
  2. Click CREATE.
  3. Enter a name for this bucket.
  4. Click CREATE.

Upload the KVM Disk Image

Convert the KVM image to a raw disk and upload it to your Google Cloud Storage.

  1. Sign in to the Oracle Software Delivery Cloud.
  2. Search for "Oracle Communications Session Border Controller", select release S-Cz8.3.0, and click Continue.
  3. Under "Platforms/Languages," select All and click Continue.
  4. Accept the License Agreement and click Continue.
  5. Download the KVM image.
  6. Unzip and untar the qcow2 file.

    For example:

    unzip VXXXXXXX-01.zip
    tar xf nnSCZ920-img-vm_kvm.tgz
  7. Convert the qcow2 file to a raw disk format.
    qemu-img convert -f qcow2 -O raw nnSCZ920-img-vm_kvm.qcow2 disk.raw

    Note:

    The filename must be disk.raw.
  8. Compress the raw disk.
    tar --format=oldgnu -Sczf compressed-nnSCZ920-image.tar.gz disk.raw
  9. Upload the compressed raw disk to Google Cloud Storage.
    1. From the Google Cloud navigation menu, select Cloud Storage, then Buckets, then the name of your bucket, and then UPLOAD FILES.
    2. Select your tar file.
    3. Click Open.

Create a Custom Image

Your custom image must be created with the Cloud Shell because the GUI does not provide a way to enable multiple subnets.

  1. From the Google Cloud navigation menu, select Compute Engine and then Images.
  2. On the top bar, select CREATE IMAGE.
  3. Enter a name for this image.
  4. Set the Source to Cloud Storage file.
  5. In the Cloud Storage file box, browse to the tar file you uploaded.
  6. Click EQUIVALENT COMMAND LINE and then RUN IN CLOUD SHELL.
  7. Append the following line to the command to enable multiple subnets.
    --guest-os-features="MULTI_IP_SUBNET"

    An example command, with whitespace introduced for clarity:

    glcloud compute images <image-name> \
        --guest-os-features="MULTI_IP_SUBNET" \
        --source-uri=https://storage.googleapis.com/download/storage/v1/b/<BUCKET_NAME>/o/<OBJECT_NAME>?alt=media

You now have a custom image you can use to create a virtual machine instance template.

Create an Instance Template

An instance template is a saved virtual machine configuration from which you can deploy a VM or a group of VMs.

  1. From the navigation menu, click Compute Engine and then Instance templates.
  2. From the top menu, click CREATE INSTANCE TEMPLATE.
  3. Enter a name for the instance template.
  4. Set the Series field to N2 and set the Machine type field to one of the following:
    • n2-standard-4
    • n2-standard-8
    • n2-standard-16
  5. Click CPU PLATFORM AND GPU to expand the CPU configuration.
  6. Set CPU platform to Intel Ice Lake or later.
  7. Set the Boot disk to boot your custom image with a 40GB disk.
    1. Under Boot disk, click CHANGE.
    2. Select the CUSTOM IMAGES tab.
    3. Set the Image field to the custom image you created.
    4. Set the disk size to 40GB.
    5. Click SELECT to close the Boot disk.
  8. Click Advanced options and then Networking.
  9. Set the Network interface card to VirtIO.
  10. Add network interfaces.
    1. If using a load balancer, add s0p0 as the first network interface.
    2. If not using a load balancer, add wancom0 as the first network interface.
    3. Click ADD NETWORK INTERFACE to add the additional network interfaces.
  11. Add your SSH public key.
    1. Click Security and then MANAGE ACCESS.
    2. Click ADD ITEM.
    3. Paste in your SSH public key.

      Note:

      The SBC does not currently support ed25519 SSH keys.
  12. Click CREATE.