2 Prepare to Migrate Oracle Java Cloud Service to Oracle Cloud Infrastructure

Before you migrate your service instances from Oracle Cloud Infrastructure Classic to Oracle Cloud Infrastructure, understand how the migration affects your existing instances, identify the necessary compute shapes, and create the network and databases to support your migrated service instances.

About Downtime Requirements

The migration process does not affect the availability of your existing Oracle Java Cloud Service instance in Oracle Cloud Infrastructure Classic. This instance continues to run and can serve client requests during this process.

You can discover and export the configuration from your source Oracle WebLogic Server domain while it is running. The migration tool does not modify your domain or significantly affect its performance.

After a service instance is migrated successfully, clients can be rerouted to the new instance in Oracle Cloud Infrastructure.

Select Oracle Cloud Infrastructure Shapes

Identify the compute shapes that provide similar IaaS resources in Oracle Cloud Infrastructure to the shapes that you're currently using for your service instances in Oracle Cloud Infrastructure Classic.

A compute shape defines the IaaS resources, such as OCPUs and memory, that are available to a specific node in a service instance. Oracle Cloud Infrastructure and Oracle Cloud Infrastructure Classic each has its own set of standard compute shapes. See:

  • About Shapes in Using Oracle Cloud Infrastructure Compute Classic
  • Compute Shapes in the Oracle Cloud Infrastructure documentation

Application Migration Service automatically selects a shape in Oracle Cloud Infrastructure for your new instance that most closely matches the shape in the source instance.

The Oracle Cloud Infrastructure Classic Java Migration Tool can generate a Terraform configuration to help you provision your new instance, and it automatically selects an Oracle Cloud Infrastructure shape for this configuration.

To ensure that a migrated service instance has the same performance characteristics as the original instance, and can support an equivalent workload, choose Oracle Cloud Infrastructure shapes that most closely map to the Oracle Cloud Infrastructure Classic shapes that you specified when you created the instance.

You must also confirm that the chosen shapes are available in your Oracle Cloud tenancy. Oracle configures shape limits for an Oracle Cloud Infrastructure region, or for a specific availability domain within a region. You can use the console to view the current shape limits for your tenancy, and to request a limit increase if necessary. See Service Limits in the Oracle Cloud Infrastructure documentation.

Design the Oracle Cloud Infrastructure Network

Before you migrate your service instances from Oracle Cloud Infrastructure Classic to Oracle Cloud Infrastructure, you must design and implement a virtual cloud network (VCN) to support your migrated service instances.

You can create new Oracle Cloud Infrastructure compartments, VCNs, and subnets for your service instances, or you can use existing ones. See these topics in the Oracle Cloud Infrastructure documentation:

Consider the following guidelines when you create or select a network for your service instances:

  • If instances communicate using the default shared network in Oracle Cloud Infrastructure Classic, then use a single subnet for these instances.
  • If instances are on separate IP networks in Oracle Cloud Infrastructure Classic, then use separate subnets for these instances.
  • A VCN should have an address range that includes all of the IP networks in Oracle Cloud Infrastructure Classic that need to communicate. Alternatively, configure peering between multiple VCNs.
  • A subnet should have at least the same number of addresses as the corresponding IP network in Oracle Cloud Infrastructure Classic.
  • If an instance was created in Oracle Cloud Infrastructure Classic without public IP addresses, then use a private subnet for this instance.
  • If custom access rules were created for an instance in Oracle Cloud Infrastructure Classic to control communication to or from the instance, then create a security list in Oracle Cloud Infrastructure and assign the security list to the appropriate subnets. To use custom security lists, you must assign the instance to a custom subnet, and not the default subnet.

Oracle Cloud Infrastructure Classic Java Migration Tool creates a bastion compute instance in Oracle Cloud Infrastructure in order for the migration controller (Control-S) compute instance to access your target service instance. After updating the target service instance, the tool deletes the temporary bastion compute instance.

Before you create service instances in Oracle Cloud Infrastructure that use your new network resources, you must create policies that grant your service access to these resources. See Prerequisites for Oracle Platform Services in the Oracle Cloud Infrastructure documentation.

Configure Security Rules for the Network

If your instance communicates with other resources in Oracle Cloud or on the Internet, create or update the security lists for your target Oracle Cloud Infrastructure network.

A security list is assigned to subnets within your virtual cloud network (VCN). It includes ingress and egress rules that specify the types of traffic allowed in and out of the instances within the subnet. You can update an existing security list, or create a new one and assign it to a subnet.

You might need to create security rules if your Oracle Java Cloud Service instance communicates with external resources, including these Oracle WebLogic Server resources:

  • JavaMail Session
  • Foreign Java Naming and Directory Interface (JNDI) Provider
  • Foreign Java Message Service (JMS) Server
  • Messaging Bridge
  • Store-and-Forward
  • WebLogic Diagnostic Framework (WLDF) REST Action

See Security Lists in the Oracle Cloud Infrastructure documentation.

Migrate the Application Databases

If the applications in your Oracle Java Cloud Service instance use database instances that were created in an Oracle Cloud Infrastructure Classic region, migrate these application databases to Oracle Cloud Infrastructure Database.

There are multiple methods of migrating your database. The Oracle Cloud Infrastructure Classic Database Backup Migration Tool uses Recovery Manager (RMAN). Another option is Oracle Data Guard. See Select a Method to Migrate Database Instances in Migrating Infrastructure Classic Workloads to Oracle Cloud Infrastructure.

  1. Create the Oracle Cloud Infrastructure Database instances in the same region and virtual cloud network (VCN) that you plan to create your target WebLogic Server domain.
  2. If the databases and target WebLogic Server domain will be on different subnets, then configure security rules that allow the target's subnet to communicate with the database ports.

Get Information About the Target Databases

Gather information about the Oracle Cloud Infrastructure Database instances that your target WebLogic Server domain will use. You will use this information to perform the migration.

  1. Access the Oracle Cloud Infrastructure console.
  2. Click the menu icon, and under Database, select Bare Metal, VM, and Exadata.
  3. Select the Region and Compartment where your database resides.
  4. Click the name of your database.
  5. From the DB System Details page, click Nodes, and then record these values.
    • The public IP address of the first database node
    • The host name prefix for the database (for example, myappdb)
    • The Scan DNS name
    • The domain name for the database (for example, mydbsubnet.myvcn.oraclevcn.com)
    • The database port number
  6. Click Databases. Record the database name and unique name.
    For example, ORCL and ORCL_iad1zj.
  7. Click the name of the database.
  8. Click DB Connection, and then record the Easy Connect string.
  9. If your database is running Oracle Database 12c or later, then identify the pluggable database (PDB) that contains your application schemas.
    1. Use a Secure Shell (SSH) client to connect to the database node as the opc user.
      ssh -i <privatekey> opc@<database_IP>
    2. Switch to the oracle user.
      sudo su - oracle
    3. Locate the ORACLE_HOME directory for the database on the file system.
      Example:
      /u01/app/oracle/product/12.1.0.2/dbhome_1
    4. If you are accessing this database node for the first time, run the oraenv command to configure the environment.
      source oraenv

      When prompted, enter the database name (SID) and the ORACLE_HOME directory.

      Example:

      ORACLE_SID = ORCL
      ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/dbhome_1
    5. Start sqlplus as the sysdba role.
      sqlplus / as sysdba
    6. Print the list of PDBs in this database.
      SELECT PDB, NETWORK_NAME, CON_ID FROM CDB_SERVICES;
    7. In the command output, identify the PDB name.
      Example:
      MYPDB  mypdb.mydbsubnet.myvcn.oraclevcn.com
  10. Repeat Steps 1 to 9 for any other databases to which the target instance will connect.