2.4 Configuring the Metadata Store

Please follow steps below for configuring your metadata store.

  1. Configure your data source in OSA-26.1.0.0.*/osa-base/etc/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:
    <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">7wKx1wn3sC41KWo7nIAkCbF8CibQLv3Kj1RcKQgp0vUyNQ@A</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. Generate Secure Password

    GGSA 26.1 uses OSA Secure tool to protect your passwords.

    To encrypt your password:

    Use osa-secure-tool.sh, available in the bin directory under osa-base.

    Before running the script make sure to set and add JAVA_HOME to the path by running the following commands:
    export JAVA_HOME=/to/your/java/location
    export PATH=$JAVA_HOME/bin:$PATH
    java -version ## Just to verify the java is set properly or not
    To generate the password:
    cd OSA-26.1.0.0.0/osa-base/bin
     ./osa-secure-tool.sh <YOUR_PASSWORD>

    If you are using this tool for the first time it will ask you to set a password that will be used to generate a key.Set Password to Generate Key

    Note:

    OSA Secure tool protected password will be different each time.

SAMPLE 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">{AES_Encrypted_Password}</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">{AES_Encrypted_Password}</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">{AES_Encrypted_Password}</Set>    
               </New>
        </Arg>
    </New>
-->

</Configure>

Note:

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