Deploy

Learn about best practices for deploying and configuring Oracle RAC with CMAN and Oracle Notification Server proxy. CMAN is part of the database. It is free if you run Enterprise Edition or higher. The Oracle Notification Server proxy is also free.

Deploy CMAN on OCI Compute Virtual Machine

Follow these steps to install CMAN and deploy it on the OCI Compute virtual machine:

  1. Download the latest Oracle Database 23ai client software or Linux x86-64 from edelivery.oracle.com.
  2. Install CMAN using an image file from the section Installing Oracle CMAN Using an Image File in the Oracle Database Client Installation Guide for Linux guide.
  3. To install CMAN software without using an image file, use the following command:
    /home/oracle/install/client/runInstaller -ignorePrereq -waitforcompletion  -silent\
    UNIX_GROUP_NAME="oinstall" \
    INVENTORY_LOCATION= /u01/app/oraInventory \
    ORACLE_HOME= /u01/app/oracle/product/23ai/client_1 \
    ORACLE_BASE= /u01/app/oracle \oracle.install.client.installType=Custom \
    oracle.install.client.customComponents="oracle.sqlplus:23.0.0.0.0,oracle.network.client:23.0.0.0.0,oracle.network.cman:23.0.0.0.0,oracle.network.listener:23.0.0.0.0" || \
    sync
  4. If the firewall is enabled on the cman-host machine, then use root to set the following firewall rules:
    sudo firewall-cmd --permanent --add-port=1521/tcp
    sudo firewall-cmd --add-port=1521/tcp
    sudo firewall-cmd --add-port=6200/tcp
    sudo firewall-cmd --permanent --add-port=6200/tcp
  5. Install CMAN following the documentation.
  6. Configure the computer that hosts CMAN by setting up parameters in the cman.ora file following the Oracle Connection Manager documentation.
    Machine IPs Host Name Domain Version

    Name: OnsProxyVcn

    IPv4 CIDR Block: 10.0.0.0/16

    Public IP: 129.146.104.209

    Private IP: 10.0.0.90

    cman-host subnet.onsproxyvcn.oraclevcn.com 23.5
    The following is an example of the cman.ora file:
    #CMAN Alias
    CMAN_cman-host.sub12161926540.onsproxyvcn.oraclevcn.com =(configuration=
    # Listening address of the cman  (address=(protocol=tcp)(host=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com)(port=1521))
    # Configuration parameters of this CMAN
    parameter_list =    (connection_statistics=yes)
    )  
    (next_hop=(description=(address=(protocol=tcp)(port=1521)(host=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com))))
    (rule_list=    
        (rule=       
            (src=*)(dst=racnode2.sub12161926541.onsproxyvcn.oraclevcn.com)(srv=*)(act=accept)
            (action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
        )    
        (rule=       
            (src=*)(dst=racnode1.sub12161926541.onsproxyvcn.oraclevcn.com)(srv=*)(act=accept)
            (action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
        )    
        (rule=       
            (src=*)(dst=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com)(srv=*)(act=accept)
            (action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
        )    
        (rule=       
            (src=localhost)(dst=*)(srv=*)(act=accept)
            (action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
        )  
      )
    )
  7. Start Connection Manager on cman-host using the following command:
    # cmctl startup -c CMAN_cman-host.sub12161926540.onsproxyvcn.oraclevcn.com

Set Up the Application Client on Google Cloud Virtual Machine

Follow these steps to set up the application client on a virtual machine in Google Cloud.

  1. Install the Oracle Database on the client machine following the steps on the Oracle Database Client Installation Guide for Linux guide.
    Create a client virtual machine in Google Cloud using the following configuration:
    Client Details
    Client machine

    Name: client-host

    Machine type:e2-medium

    Primary Internal IP Address: 10.180.0.2

    Public IP: 34.106.100.241

    Hostname: client-host.c.oraoperator-on-gke.internal

  2. On the client host machine, copy the required .jar files:
    1. Download the files ons-23.5.0.24.07.jar and jar from the Developers Guide For Oracle JDBC on Maven Central. It is highly recommended to use the latest version of libraries based on the database version and the client you are using.
    2. Copy them to the client-host.
    3. Copy them to the following locations:
      mkdir -p $ORACLE_HOME/opmn/lib
      cp /tmp/ons-23.5.0.24.07.jar $ORACLE_HOME/opmn/lib/ons.jar
      mkdir -p $ORACLE_HOME/jdbc/lib
      cp /tmp/ojdbc8.jar $ORACLE_HOME/jdbc/lib/ojdbc8.jar
      cp /tmp/ojdbc8.jar $ORACLE_HOME/inventory/Scripts/ext/jlib/ojdbc8.jar
  3. Entries in /etc/hosts file are used for the name resolution. To ensure that DNS resolution is correctly configured, Oracle recommends that you set up a private DNS for forwarding and listening endpoints from Google to OCI.
  4. For the client machine in Google Cloud to reach the CMAN machine deployed in OCI using the hostname, create the following additional entry in the /etc/hosts file on the client machine:
    [oracle@client-host ~]$ cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    10.180.0.2 client-host.c.oraoperator-on-gke.internal client-host # Added by Google
    169.254.169.254 metadata.google.internal  # Added by Google
    129.146.104.209 cman-host.sub12161926540.onsproxyvcn.oraclevcn.com cman-host
  5. For the CMAN in OCI to reach the client machine in Google Cloud using the hostname, create the below additional entry in the /etc/hosts file on the CMAN:
    [oracle@cman-host ~]$ cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    10.0.0.90 cman-host.sub12161926540.onsproxyvcn.oraclevcn.com cman-host
    34.106.100.241 client-host.c.oraoperator-on-gke.internal client-host