4.10 Cleaning Up Installation

Perform the following steps to clean up an OAA, OARM, and OUA installation completely.

  1. From the installation host, connect to the management container and delete the file based vault and the logs from their respective NFS mounts:
    kubectl exec -n <namespace> -ti oaamgmt-oaa-mgmt-7d7597c694-tzzdz -- /bin/bash
    $ rm -rf /u01/oracle/logs/*
    $ rm -rf /u01/oracle/service/store/oaa/.*
    $ exit
  2. Run the following to find the helm charts installed:
    helm ls -n <namespace>
    For example:
    helm ls -n oaans
    The output will look similar to the following:
    NAME            NAMESPACE       REVISION        UPDATED   STATUS          CHART                 APP VERSION
    oaainstall      oaans           1               <date>    deployed        oaa-1.0.0-<tag>       0.1.0
    oaamgmt         oaans           1               <date>    deployed        oaa-mgmt-1.0.0-<tag>  0.1.0
    
    Delete the OAA charts:
    helm delete oaainstall -n oaans
    helm delete oaamgmt -n oaans
  3. Outside the container, run:
    kubectl get pods -n oaans
    kubectl get pods -n coherence
    If any pods remain then run:
    kubectl delete <pod_name> -n <namespace>
  4. Delete the OAuth client and resources:
    1. Encode the OAM administrator user and its password by using the command:
      echo -n <username>:<password> | base64
      For example:
      echo -n weblogic:<password> | base64
      This value should be used for <ENCODED_OAMADMIN> in the examples below.
    2. Delete the OAuth Client. For example:
      curl --location --request DELETE 'http://<OAuth_Host>:<OAuth_port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/client?name=OAAClient&identityDomainName=OAADomain' \
      --header 'Authorization: Basic <ENCODED_OAMADMIN>'
      
    3. Delete the OAuth Resource Server. For example:
      curl --location --request DELETE 'http://<OAuth_Host>:<OAuth_port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/application?name=OAAResource&identityDomainName=OAADomain' \
      --header 'Authorization: Basic <ENCODED_OAMADMIN>'
      
    4. Delete the OAuth Domain. For example:
      curl --location --request DELETE 'http://<OAuth_Host>:<OAuth_port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/oauthidentitydomain?name=OAADomain' \
      --header 'Authorization: Basic <ENCODED_OAMADMIN>'
      
  5. Drop the database schemas as follows:
    sqlplus sys/<password> as SYSDBA
    
    alter session set "_oracle_script"=TRUE; ** Required for PDB’s only **
    
    drop user <OAA_RCU_PREFIX>_OAA cascade;
    delete from SCHEMA_VERSION_REGISTRY where comp_name='Oracle Advanced Authentication' and OWNER=UPPER('<OAA_RCU_PREFIX>_OAA');
    
    commit;
    
    set pages 0
    set feedback off
    spool /tmp/drop_directories.sql
    select 'drop directory '||directory_name||';' from all_directories where directory_name like 'EXPORT%'
    /
    spool off
    @/tmp/drop_directories
    
  6. In order to repeat the pull/tag/push of the OAA images, remove the directory $WORKDIR/oaaimages/oaa-install/oaainstall-tmp before rerunning the installManagementContainer.sh script.