7.1.1 Creating the RCU Schemas

In this section you create the Repository Creation Utility (RCU) schemas in the Oracle Database.

Note:

Before following the steps below, make sure that the Oracle Database and Listener are up and running, and you can connect to the database via SQL*Plus or other client tool.
  1. Run the following command to create a helper pod to run RCU:
    • If using Oracle Container Registry or your own container registry for the Oracle Access Management (OAM) container image:
      kubectl run --image=<image_name-from-registry>:<tag> \
      --image-pull-policy="IfNotPresent" \
      --overrides='{"apiVersion": "v1", "spec":{"imagePullSecrets": [{"name": "orclcred"}]}}' \
      helper -n <domain_namespace> \
      -- sleep infinity
      
      For example:
      kubectl run --image=container-registry.oracle.com/middleware/oam_cpu:14.1.2.1.0-jdk17-ol8-<YYMMDD> \
      --image-pull-policy="IfNotPresent" \
      --overrides='{"apiVersion": "v1","spec":{"imagePullSecrets": [{"name": "orclcred"}]}}' \
      helper -n oamns \
      -- sleep infinity
      
    • If you are not using a container registry and have loaded the image on each of the worker nodes, run the following command:
      kubectl run helper --image <image>:<tag> -n oamns -- sleep infinity
      
      For example:
      kubectl run helper --image oracle/oam_cpu:14.1.2.1.0-jdk17-ol8-<YYMMDD> -n oamns -- sleep infinity
      
    The output will look similar to the following:
    pod/helper created
    
  2. Run the following command to check the pod is running:
    kubectl get pods -n <domain_namespace>
    
    For example:
    kubectl get pods -n oamns
    
    The output will look similar to the following:
    NAME     READY   STATUS    RESTARTS   AGE
    helper   1/1     Running   0          3m
    

    Note:

    If you are pulling the image from a container registry it may take several minutes before the pod has a READY status of 1\1. While the pod is starting you can check the status of the pod, by running the following command:
    kubectl describe pod helper -n oamns
    
  3. Run the following command to start a bash shell in the helper pod:
    kubectl exec -it helper -n <domain_namespace> -- /bin/bash
    For example:
    kubectl exec -it helper -n oamns -- /bin/bash
    This will take you into a bash shell in the running helper pod:
    [oracle@helper ~]$
  4. In the helper bash shell run the following commands to set the environment:
    export CONNECTION_STRING=<db_host.domain>:<db_port>/<service_name>
    
    export RCUPREFIX=<rcu_schema_prefix>
    
    echo -e <db_pwd>"\n"<rcu_schema_pwd> > /tmp/pwd.txt
    
    cat /tmp/pwd.txt
    
    Where:
    • <db_host.domain>:<db_port>/<service_name> is your database connect string.
    • <rcu_schema_prefix> is the RCU schema prefix you want to set.
    • <db_pwd> is the SYS password for the database.
    • <rcu_schema_pwd> is the password you want to set for the <rcu_schema_prefix>
    For example:
    export CONNECTION_STRING=mydatabasehost.example.com:1521/orcl.example.com
    
    export RCUPREFIX=OAMK8S
    
    echo -e <password>"\n"<password> > /tmp/pwd.txt
    
    cat /tmp/pwd.txt
    
    Ensure the cat /tmp/pwd.txt command shows the correct passwords.
  5. In the helper bash shell, run the following command to create the RCU schemas in the database:
    /u01/oracle/oracle_common/bin/rcu -silent -createRepository -databaseType ORACLE -connectString \
    $CONNECTION_STRING -dbUser sys -dbRole sysdba -useSamePasswordForAllSchemaUsers true \
    -selectDependentsForComponents true -schemaPrefix $RCUPREFIX -component MDS -component IAU \
    -component IAU_APPEND -component IAU_VIEWER -component OPSS -component WLS -component STB -component OAM -f < /tmp/pwd.txt
    The output will look similar to the following:
    RCU Logfile: /tmp/RCU<DATE>/logs/rcu.log
    Processing command line ....
    Repository Creation Utility - Checking Prerequisites
    Checking Global Prerequisites
    Repository Creation Utility - Checking Prerequisites
    Checking Component Prerequisites
    Repository Creation Utility - Creating Tablespaces
    Validating and Creating Tablespaces
    Create tablespaces in the repository database
    Repository Creation Utility - Create
    Repository Create in progress.
    Executing pre create operations
    Percent Complete: 18
    Percent Complete: 18
    Percent Complete: 19
    Percent Complete: 20
    Percent Complete: 21
    Percent Complete: 21
    Percent Complete: 22
    Percent Complete: 22
    Creating Common Infrastructure Services(STB)
    Percent Complete: 30
    Percent Complete: 30
    Percent Complete: 39
    Percent Complete: 39
    Percent Complete: 39
    Creating Audit Services Append(IAU_APPEND)
    Percent Complete: 46
    Percent Complete: 46
    Percent Complete: 55
    Percent Complete: 55
    Percent Complete: 55
    Creating Audit Services Viewer(IAU_VIEWER)
    Percent Complete: 62
    Percent Complete: 62
    Percent Complete: 63
    Percent Complete: 63
    Percent Complete: 64
    Percent Complete: 64
    Creating Metadata Services(MDS)
    Percent Complete: 73
    Percent Complete: 73
    Percent Complete: 73
    Percent Complete: 74
    Percent Complete: 74
    Percent Complete: 75
    Percent Complete: 75
    Percent Complete: 75
    Creating Weblogic Services(WLS)
    Percent Complete: 80
    Percent Complete: 80
    Percent Complete: 83
    Percent Complete: 83
    Percent Complete: 91
    Percent Complete: 98
    Percent Complete: 98
    Creating Audit Services(IAU)
    Percent Complete: 100
    Creating Oracle Platform Security Services(OPSS)
    Creating Oracle Access Manager(OAM)
    Executing post create operations
    Repository Creation Utility: Create - Completion Summary
    Database details:
    -----------------------------
    Host Name : mydatabasehost.example.com
    Port : 1521
    Service Name : ORCL.EXAMPLE.COM
    Connected As : sys
    Prefix for (prefixable) Schema Owners : OAMK8S
    RCU Logfile                                  : /tmp/RCU<DATE>/logs/rcu.log
    
    Component schemas created:
    -----------------------------
    Component                                    Status         Logfile
    
    Common Infrastructure Services               Success        /tmp/RCU<DATE>/logs/stb.log
    Oracle Platform Security Services            Success        /tmp/RCU<DATE>/logs/opss.log
    Oracle Access Manager                        Success        /tmp/RCU<DATE>/logs/oam.log
    Audit Services                               Success        /tmp/RCU<DATE>/logs/iau.log
    Audit Services Append                        Success        /tmp/RCU<DATE>/logs/iau_append.log
    Audit Services Viewer                        Success        /tmp/RCU<DATE>/logs/iau_viewer.log
    Metadata Services                            Success        /tmp/RCU<DATE>/logs/mds.log
    WebLogic Services                            Success        /tmp/RCU<DATE>/logs/wls.log
    
    Repository Creation Utility - Create : Operation Completed
    [oracle@helper ~]$
  6. Exit the helper bash shell by issuing the command exit.