Create a Multi Data Source for a RAC Database
Use the model Yaml templates to create a multi data source for an Oracle Real Application Cluster (RAC) database with WebLogic Enterprise Edition.
Following is an example of model Yaml template for app deployment with multi data source (RAC as infra DB with WebLogic Enterprise Edition) properties:
Note:
The template files are located at/u01/shared/scripts/pipeline/templates on the administration host.
        
                     resources:
  JDBCSystemResource:
    'db1-hellods':
      Target: '@@ENV:RESOURCE_PREFIX@@-cluster'
      JdbcResource:
        JDBCDataSourceParams:
          GlobalTransactionsProtocol: None
          JNDIName: [ 'jdbc/db1-hellods' ]
        JDBCDriverParams:
          DriverName: oracle.jdbc.OracleDriver
          URL: '@@SECRET:@@ENV:DOMAIN_UID@@-db1datasource-secret:url@@'
          PasswordEncrypted: '@@SECRET:@@ENV:DOMAIN_UID@@-db1datasource-secret:password@@'
          Properties:
            user:
              Value:
        JDBCConnectionPoolParams:
          StatementCacheSize: 0
          TestTableName: SQL ISVALID
          InitialCapacity: 1
          MaxCapacity: 1
    'db2-hellods':
      Target: '@@ENV:RESOURCE_PREFIX@@-cluster'
      JdbcResource:
        JDBCDataSourceParams:
          GlobalTransactionsProtocol: None
          JNDIName: [ 'jdbc/db2-hellods' ]
        JDBCDriverParams:
          DriverName: oracle.jdbc.OracleDriver
          URL: '@@SECRET:@@ENV:DOMAIN_UID@@-db2datasource-secret:url@@'
          PasswordEncrypted: '@@SECRET:@@ENV:DOMAIN_UID@@-db2datasource-secret:password@@'
          Properties:
            user:
              Value:
        JDBCConnectionPoolParams:
          StatementCacheSize: 0
          TestTableName: SQL ISVALID
          InitialCapacity: 1
          MaxCapacity: 1
    'hellods':
       Target: '@@ENV:RESOURCE_PREFIX@@-cluster'
       JdbcResource:
         DatasourceType: MDS
         JDBCDataSourceParams:
           AlgorithmType: 'Load-Balancing'
           DataSourceList: [ 'db1-hellods','db2-hellods' ]
           JNDIName: [ jdbc/hellods ]
                     You must set up the database to create a schema user before you create the data source. See Prerequisites to Create a Data Source.