2.3 Configuring the Metadata Store

Please follow steps below for configuring your metadata store.

  1. Configure your data source in OSA-19.1.0.0.*/osa-base/etc/jetty-osa-datasource.xml as per instructions below. This step is essential for creating OSA’s database schema. The OSA database user referred to in the document will be created by the installation process.
  2. Uncomment and edit one of the two Data source configurations, either for Oracle Database or MySQL depending on the database you want to use as metadata store. The uncommented fragment for Oracle database is shown below: a.
    <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">               
              <Arg>             
              <Ref refid="wac"/>
              </Arg>        
                  <Arg>jdbc/OSADataSource</Arg>         
                <Arg>             
                 <New class="oracle.jdbc.pool.OracleDataSource">
                    <Set name="URL">jdbc:oracle:thin:@myhost.example.com:1521:OSADB</Set>
                    <Set name="User">OSA_USER</Set>
                    <Set name="Password">
                      <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">                       
                        <Arg> OBF:OBFUSCATED_PASSWORD</Arg>                   
                      </Call>               
                    </Set>                
                    <Set name="connectionCachingEnabled">true</Set>                
                    <Set name="connectionCacheProperties">  
                     <New class="java.util.Properties">   
                     <Call name="setProperty"><Arg>MinLimit</Arg><Arg>1</Arg></Call> 
                     <Call name="setProperty"><Arg>MaxLimit</Arg><Arg>15</Arg></Call>   
                     <Call name="setProperty"><Arg>InitialLimit</Arg><Arg>1</Arg></Call> 
                     </New>               
                   </Set>             
                 </New>         
                </Arg>
            </New>
  3. Decide on an OSA schema username and a plain-text password. For illustration, say osa as schema user name and alphago as password.

    Change directory to top-level folder OSA-19.1.0.0.* and execute the following command:java -cp ./lib/ jetty-util-9.4.17.v20190418.jar org.eclipse.jetty.util.security.Password osa <your password>

    For example, java -cp ./lib/ jetty-util-9.4.17.v20190418.jar org.eclipse.jetty.util.security.Password osa alphago

    You should see results like below on console:

    2019-06-18 14:14:45.114:INFO::main: Logging initialized @1168ms to org.eclipse.jetty.util.log.StdErrLogalphago

    OBF:<obfuscated password>

    MD5:34d0a556209df571d311b3f41c8200f3

    CRYPT:osX/8jafUvLwA

  4. Note down the obfuscated password string that is displayed (shown in bold), by copying it to clipboard or notepad.

  5. Change database host, port, SID, osa schema user name and osa schema password fields marked in bold in the code in Step 2a.

    Example - jdbc:oracle:thin:@myhost.example.com:1521:ORCL

SAMPLE JETTY-OSA-DATASOURCE.XML

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

<!-- =============================================================== -->
<!-- Configure jdbc/OSADataSource data source                        -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">

    <!-- SAMPLE OSA DATASOURCE CONFIGURATION FOR ORACLE-->
    <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">
         <Arg>
             <Ref refid="wac"/>
         </Arg>
         <Arg>jdbc/OSADataSource</Arg>
         <Arg>
             <New class="oracle.jdbc.pool.OracleDataSource">
                 <Set name="URL">jdbc:oracle:thin:@myhost.example.com:1521:OSADB</Set>
                 <Set name="User">osa_prod</Set>
                 <Set name="Password">
                    <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
                        <Arg>OBF:1ggz1j1u1k8q1leq1v2h1w8v1v1x1lcs1k5g1iz01gez</Arg>
                    </Call>
                </Set>
                <Set name="connectionCachingEnabled">true</Set>
                <Set name="connectionCacheProperties">
                    <New class="java.util.Properties">
                        <Call name="setProperty"><Arg>MinLimit</Arg><Arg>1</Arg></Call>
                        <Call name="setProperty"><Arg>MaxLimit</Arg><Arg>15</Arg></Call>
                        <Call name="setProperty"><Arg>InitialLimit</Arg><Arg>1</Arg></Call>
                    </New>
                </Set>
             </New>
         </Arg>
     </New>


    <!-- SAMPLE OSA DATASOURCE CONFIGURATION FOR ADW-->
    <!--
    <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">
         <Arg>
             <Ref refid="wac"/>
         </Arg>
         <Arg>jdbc/OSADataSource</Arg>
         <Arg>
             <New class="oracle.jdbc.pool.OracleDataSource" type="adw">
                 <Set name="URL">jdbc:oracle:thin:@oracletestdb_high?TNS_ADMIN=/scratch/oracletest/Wallet_oracletestdb</Set>
                 <Set name="User">{OSA_USER}</Set>
                 <Set name="Password">
                    <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
                        <Arg>{OBF:OBFUSCATE_PASSWORD}</Arg>
                    </Call>
                </Set>
                <Set name="connectionCachingEnabled">true</Set>
                <Set name="connectionCacheProperties">
                    <New class="java.util.Properties">
                        <Call name="setProperty"><Arg>MinLimit</Arg><Arg>1</Arg></Call>
                        <Call name="setProperty"><Arg>MaxLimit</Arg><Arg>15</Arg></Call>
                        <Call name="setProperty"><Arg>InitialLimit</Arg><Arg>1</Arg></Call>
                    </New>
                </Set>
             </New>
         </Arg>
     </New>
     -->
    <!-- SAMPLE OSA DATASOURCE CONFIGURATION FOR MYSQL-->
    <!--

    <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg>
            <Ref refid="wac"/>
        </Arg>
        <Arg>jdbc/OSADataSource</Arg>
        <Arg>
            <New class="com.mysql.cj.jdbc.MysqlConnectionPoolDataSource">
                <Set name="URL">jdbc:mysql://examplehost.com:3306/OSADB</Set>
                <Set name="User">{OSA_USER}</Set>
                <Set name="Password">
                    <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
                        <Arg>{OBF:OBFUSCATE_PASSWORD}</Arg>
                    </Call>
                </Set>
            </New>
        </Arg>
    </New>
-->

</Configure>

Note:

Do not use a hyphen in the OSA metadata username, in the jetty-osa-datasource.xml
.