Configure Database Parameters and VCN Peering

You must specify a database in Oracle Autonomous Database or Oracle Cloud Infrastructure Database (DB System) when you create an Oracle WebLogic Server for OCI domain that includes the Java Required Files (JRF) components.

The database you specify is used to create the required infrastructure schemas for the JRF-enabled domain.

Note:

For each schema that is created in the database, a data source is created in WebLogic Server. These data sources should not be used by applications deployed to the WebLogic domain after provisioning is complete. Instead, you must create independent data sources. See Manage Data Sources.
If you selected the option to create a new VCN, or selected the option to use an existing VCN with a new subnet for the WebLogic Server compute instances and the Oracle Cloud Infrastructure Database(DB System), or for the WebLogic Server compute instances and the Oracle Autonomous Database, Oracle WebLogic Server for OCI configures local peering in your VCNs, if your database is on a different VCN than the VCN you want to use for WebLogic Server.

Note:

In case of Autonomous Database, the database must use a private endpoint.

If you use an existing VCN and existing subnet, you must peer the VCNs manually before you create the stack. See Manual VCN Peering.

If your databases and domain are in different VCNs, then Oracle WebLogic Server for OCI configures local peering between the two VCNs. To support VCN peering, you must perform the following prerequisite tasks before creating a stack:
  • Create an local peering Gateway (LPG) in the database VCN.
  • Add a route to the current route table of the database subnet, to direct traffic to the CIDR of the WebLogic subnet to the LPG.
  • Open the database port to the WebLogic subnet CIDR.
  • If you use an existing VCN and new subnets, you must add the default private view of the database VCN to the DNS resolver of the existing VCN.

    See Add a DNS view to the DNS Resolver.

In the WebLogic Domain Configuration section, select the Provision with JRF check box to display the Database options.

Note:

Ensure that you have set up the user group polices and dynamic group polices that are applicable for the configuration. See User Group Policies and Dynamic Group Policies.

Configure Autonomous Database

To configure the database parameters:

  1. Select Autonomous Transaction Processing Database from Database Strategy list.
  2. Select the compartment in which you've created the database.
  3. Select the database where you want to create the JRF schemas for this WebLogic domain.
  4. Select the compartment where you have the autonomous database secret and then select the secret that contains the administration user password in the autonomous database. To create secrets, see Create Secrets for Passwords.
  5. Select the service level that the domain should use to connect to the selected autonomous database.
  6. If your database uses private endpoint, then select the Database uses private endpoint check box and specify the following:
    1. The compartment in which the autonomous database's VCN is found.
    2. The VCN on which you've created the autonomous database. If this VCN is different than the WebLogic Server VCN, they cannot have overlapping CIDRs. For example, you cannot create a domain on VCN 10.0.0.0/16 that uses a database on VCN 10.0.0.1/24.
    3. Specify the OCID of the local peering gateway in the database VCN to be peered with the WebLogic VCN.

    Oracle WebLogic Server for OCI creates a rule to the existing network security group for the autonomous database with private endpoints. This security list allows the WebLogic Server subnet to access the database port. If this step isn't required or you don't have the correct permissions to modify the database network, clear the Create Database Security List check box.

Configure Oracle Cloud Infrastructure Database

To configure the database parameters:

  1. Select Database System from Database Strategy list.
  2. Select the DB system to use for this WebLogic domain.
  3. Select the compartment in which the database's VCN is found.
  4. Select the VCN on which you've created the database. If this VCN is different than the WebLogic Server VCN, they cannot have overlapping CIDRs. For example, you cannot create a domain on VCN 10.0.0.0/16 that uses a database on VCN 10.0.0.1/24.
  5. Select the database home within the selected DB system.
  6. Select the database home version.
  7. Select the database within the selected DB system where you want to create the JRF schemas for this domain.
  8. Specify the Pluggable database (PDB) name, only if the selected database is running Oracle Database 12c or later.
  9. Specify the name of a database user with SYSDBA privileges.
  10. Select the compartment where you have the database administration secret and then select the secret that contains the database administration password. To create secrets, see Create Secrets for Passwords.
  11. Specify the database listen port (1521 by default)
  12. Specify the OCID of the local peering gateway in the database VCN to be peered with the WebLogic VCN.

    Note:

    This option is not applicable if you're using an existing VCN and existing subnet.
  13. If you want to use a connection string, select the Use Database Connection String check box and enter the following:
    1. The connection string to connect to the database.

      WARNING:

      Do not use the database connection string example provided in the Oracle Database Connection String field , instead use the format specified in the following table.

      Table 2-1 Database Connect String for Database Version and Type

      Database Version Database Type Database Connection String

      12c and above

      VM

      //<db_hostname>-scan.<db_domain>:<db_port>/<pdb_name>.<db_domain>

      12c and above

      Bare Metal

      //<db_hostname>.<db_domain>:<db_port>/<pdb_name>.<db_domain>

    2. The pluggable database (PDB) name.

      The PDB name ensures that you receive the notification about the Oracle Platform Security Services (OPSS) schema password expiry date. See Unable to Fetch the Password Expiry Date for the OPSS User.

  14. Specify the name of a database user with SYSDBA privileges.
  15. Select the compartment where you have the database secret and then select the secret that contains the password of the SYSDBA user. To create secrets, see Create Secrets for Passwords.

    Note:

    Oracle recommends you to use the connection string for Exadata Database systems.

    If you use database connection string, then Oracle WebLogic Server for OCI creates a single instance datasource. However, you can update the data source for Oracle WebLogic Suite with Active GridLink data source and data source for Oracle WebLogic Server Enterprise Edition with multi data source. See Configuring Active GridLink Connection Pool Features and Configuring JDBC Multi Data Sources.

    If using Database System with connection string, security list is not created to access the database. You must ensure that the ports are open to access the database.

    Oracle WebLogic Server for OCI creates a security list in the VCN on which you've created the database. This security list allows the WebLogic Server subnet to access the database port. If this step isn't required or you don't have the correct permissions to modify the database network, clear the Create Database Security List check box.

Manual VCN Peering

To peer the VCNs manually, perform the following steps:
  1. Create a local peering gateway (LPG) for the VCN that contains the WebLogic Server VM.
    1. Sign in to the Oracle Cloud Infrastructure Console.
    2. From the navigation menu Navigation Menu icon, click Networking, and then click Virtual Cloud Networks.
    3. From the list of Virtual Cloud Networks, click the name of the WebLogic Server VCN.
    4. Under Resources, click Local Peering Gateways.
    5. Click Create Local Peering Gateway.
    6. Enter a name for the LPG and select the compartment where you want to create the LPG, if you want the LPG to be created in a different compartment.
    7. Click Show Advanced Options and associate a route table and configure tags, if required.
    8. Click Create Local Peering Gateway.

      The LPG is then created and displayed on the Local Peering Gateways page in the compartment you chose.

  2. Create a local peering gateway (LPG) for the VCN that contains your database.
    1. In the Oracle Cloud Infrastructure Console, from the navigation menu Navigation Menu icon, click Networking, and then click Virtual Cloud Networks.
    2. From the list of Virtual Cloud Networks, click the name of the database VCN.
    3. Under Resources, click Local Peering Gateways.
    4. Click Create Local Peering Gateway.
    5. Enter a name for the LPG and select the compartment where you want to create the LPG, if you want the LPG to be created in a different compartment.
    6. Click Show Advanced Options and associate a route table and configure tags, if required.
    7. Click Create Local Peering Gateway.

      The LPG is then created and displayed on the Local Peering Gateways page in the compartment you chose.

  3. On the Local Peering Gateways page, establish a connection between the LPGs created in Steps 1 and 2.
    1. For the LPG created for the VCN, click the Actions icon Actions icon, and then click Establish Peering Connection.
    2. Select Enter Local Peering Gateway OCID, and enter the database LPG's OCID.
    3. Click Establish Peering Connection.

      The connection is established and the LPG's state changes to PEERED.

  4. Configure the route table in the database subnet to enable traffic to flow to the WebLogic Server subnet.
    1. In the Oracle Cloud Infrastructure Console, from the navigation menu Navigation Menu icon, click Networking, and then click Virtual Cloud Networks.
    2. From the list of Virtual Cloud Networks, click the name of the database VCN.
    3. Under Resources, click Route Tables.
    4. Click the route table to which you want to add route rule.
    5. Click Add Route Rules and specify the following:
      • From the Target Type list, select Local Peering Gateway.
      • For Destination CIDR Block, enter the WebLogic Server VCN's CIDR block. If you want, you can specify a subnet or particular subset of the peered VCN's CIDR.
      • Select the compartment where the LPG is located, if not the current compartment.
      • (Optional): Enter a Description of the rule.
    6. Click Add Route Rules.
  5. Configure the route table in the WebLogic Server subnet to enable traffic to flow to the WebLogic Server subnet.
    1. In the Oracle Cloud Infrastructure Console, from the navigation menu Navigation Menu icon, click Networking, and then click Virtual Cloud Networks.
    2. From the list of Virtual Cloud Networks, click the name of the WebLogic Server VCN.
    3. Under Resources, click Route Tables.
    4. Click the route table to which you want to add route rule.
    5. Click Add Route Rules and specify the following:
      • From the Target Type list, select Local Peering Gateway.
      • For Destination CIDR Block, enter the database VCN's CIDR block. If you want, you can specify a subnet or particular subset of the peered VCN's CIDR.
      • Select the compartment where the LPG is located, if not the current compartment.
      • (Optional): Enter a Description of the rule.
    6. Click Add Route Rules.

See Local VCN Peering in the Oracle Cloud Infrastructure documentation.

Add a DNS view to the DNS Resolver

If you use existing VCN with new subnets, or existing VCN and existing subnets, then for VCN peering, you must resolve the hosts in the database VCN using the WebLogic Server VM by adding the default private view of the database VCN to the DNS resolver of the WebLogic Server VCN.

  1. Sign in to the Oracle Cloud Infrastructure Console.
  2. From the navigation menu Navigation Menu icon, click Networking, and then click Virtual Cloud Networks.
  3. From the list of Virtual Cloud Networks, click the name of the WebLogic Server VCN.
  4. On the VCN Information tab, click the name of the DNS Resolver for the VCN.
  5. From the Associated Private Views section, click Manage Private Views.
  6. In the Private Manage Views window, select the Private View from the compartment where the private view of the private DNS zone is located.

    If a Private View is already associated with the resolver, click Additional Private View to select the private view of the private DNS zone.

  7. Click Save Changes.