This page describes how to create an ODB Network and ODB Subnets in Google Cloud.
An ODB Network provides connectivity between Oracle Database@Google Cloud resources in the Oracle Cloud Infrastructure (OCI) child site and your Google Cloud VPC network. The ODB Network maps OCI network resources, such as Virtual Cloud Networks (VCNs), and their related subnets back to Google Cloud.
When you create an ODB Network, Oracle Database@Google Cloud automatically provisions all of the underlying components that are required to establish this connectivity. This includes the VCN, subnets, DNS zones, and the other objects that maintain the private connection between Google Cloud and the OCI child site.
Oracle Database@Google Cloud also lets you create up to five ODB Subnets within an ODB Network for the ease of network management.
Before you begin
- Make sure that you have the required Identity and Access Management (IAM) roles and permissions to create an ODB Network and ODB Subnets as described in Deploy Oracle Database@Google Cloud environment.
Create an ODB Network
An ODB Network must be created in the Google Cloud project that is associated to the billing account that you used for your marketplace order. In the case of a Shared VPC deployment, this project is also your host project and contains the Shared VPC network as well.
To create an ODB Network, do the following:
API
To create an ODB Network, run the following curl
command:
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/odbNetworks/ODB_NETWORK_ID" -d \ '{ "network": "projects/PROJECT_ID/global/networks/VPC_NETWORK", }'
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project in which to create the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region in which to create the ODB Network.
- ODB_NETWORK_ID: a unique identifier for your ODB Network.
- VPC_NETWORK: the ID of the VPC network which you want to associate with the ODB Network.
After the ODB Network is created, you can create ODB Subnets.
Create an ODB Subnet
You can create two types of ODB Subnets:
- Client ODB Subnets to connect to applications.
- Backup ODB Subnets to back up database services.
For an ODB Network, you can create up to five ODB Subnets. A single Client ODB Subnet can be used by both Autonomous Databases and VM Clusters.
The number of ODB Subnets required depends on which service you want to use:
- A VM Cluster requires one client subnet and one backup subnet.
- An Autonomous Database requires one client subnet.
To create a subnet, do the following:
API
To create an ODB Subnet, run the following curl
command:
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/odbNetworks/ODB_NETWORK_ID/odbSubnets/ODB_SUBNET_ID" -d \ '{ "cidr_range": "CIDR_RANGE", "purpose": "PURPOSE" }'
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project that contains your ODB Network for which you want to create an ODB Subnet. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of your ODB Network.
- ODB_NETWORK_ID: the ID of your ODB Network for which you're creating the ODB Subnet.
- ODB_SUBNET_ID: a unique identifier for your ODB Subnet.
CIDR_RANGE: To create a client subnet, provide the IPv4 address or address range that can access your cluster. If you're creating a backup subnet, then provide the IPv4 address or address range that serves as backup to access your cluster.
Address ranges must use a valid CIDR notation (for example, 10.10.10.0/24).
PURPOSE: the type of the ODB Subnet that you want to create. The accepted values are
client_subnet
orbackup_subnet
.