Install ODI Agent on ExaCC with ODI Marketplace

Eloi Lopes
9 min readJun 5, 2023

--

Customers using Exadata Cloud at Customer (ExaCC) with ODI they want to have a local agent running on ExaCC network. ODI Marketplace didn’t allow this until a couple of months ago.

Now, we can use it and we will see how to do it. The ExaCC doesn’t have Graphical User Interface (GUI) enable. So, the ODI configuration will be executed in silent mode.

Environment

I’m using ODI marketplace image V12.2.1.4.221215 with repositories stored in Autonomous Database. It’s quite import to know the current version of ODI Marketplace because of level of patching will be required for ODI agent in ExaCC.

Prerequisites

First you need to download the follow files:

  1. ODI Marketplace with image V12.2.1.4.221215 up and running on OCI
  2. Download ODI 12.1.2.1.4 software from https://edelivery.oracle.com
  3. Download 2 patches from Oracle support page:
  • Patch 28186730 for patching OPatch.
  • Patch 34898600 for updating ODI to version 12.2.1.4.221215

4. Autonomous Wallet.

5. Open ODI agent (20911) port on ExaCC.

Preparing ExaCC environment

Creating directories and unzip files:

#ExaCC commands
sudo mkdir -p /u02/app/oracle/product/12.2.1.4/odi_1
sudo chown oracle:oinstall /u02/app/oracle/product/12.2.1.4/odi_1 -R
sudo mkdir -p /u02/app/oracle/product/12.2.1.4/wallet
sudo chown oracle:oinstall /u02/app/oracle/product/12.2.1.4/wallet -R
cd /software/odi/
sudo unzip /software/odi/Wallet_ODI.zip -d /u02/app/oracle/product/12.2.1.4/wallet
unzip V983389-01.zip

# In case you don't have java version for ODI, please install it
#sudo rpm -ivh jdk-8u361-linux-x64.rpm

#Define Environment variables
export JAVA_HOME=/usr/java/jdk1.8.0_361-amd64
export TNS_ADMIN=/u02/app/oracle/product/12.2.1.4/wallet
export MW_HOME=/u02/app/oracle/product/12.2.1.4/odi_1

#ODI Marketplace commands
#Since I don't have the same directories I have to create a dedicate folder
# for wallet that will be accessed in the same directory for both agents
sudo mkdir -p /u02/app/oracle/product/12.2.1.4/wallet
sudo chown oracle:oracle /u02/app/oracle/product/12.2.1.4/wallet -R
sudo cp <wallet location>/Wallet_ODI.zip -d /u02/app/oracle/product/12.2.1.4/wallet

In case you don’t have a oraInst.loc files, please create one:


vi oraInst.loc
inventory_loc=/software/odi/
inst_group=oinstall

In order to install ODI in silent mode, we need a response file. Here you have the one that I used:

[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#My Oracle Support User Name
MOS_USERNAME=

#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=

#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=

#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=

#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/u02/app/oracle/product/12.2.1.4/odi_1

#The federated oracle home locations. This should be an existing Oracle Home. Multiple values can be provided as comma seperated values
FEDERATED_ORACLE_HOMES=

#Set this variable value to the Installation Type selected. e.g. Standalone Installation, Enterprise Installation.
INSTALL_TYPE=Enterprise Installation

Installing ODI:

java -jar fmw_12.2.1.4.0_odi.jar -silent -responseFile /software/odi/responseFile.rsp -invPtrLoc /u02/app/oracle/installer/oraInst.loc

Output of ODI installation:

Launcher log file is /tmp/OraInstall2023-05-24_09-54-13AM/launcher2023-05-24_09-54-13AM.log.
Extracting the installer . . . . . . . . Done
Checking if CPU speed is above 300 MHz. Actual 2693.670 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 16383 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 377 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2023-05-24_09-54-13AM
Log: /tmp/OraInstall2023-05-24_09-54-13AM/install2023-05-24_09-54-13AM.log
Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of redhat-7, redhat-6, oracle-6, oracle-7, SuSE-11, SuSE-12, SuSE-15
Actual Result: oracle-7.9
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.


Starting check : CheckJDKVersion
Expected result: 1.8.0_191
Actual Result: 1.8.0_361
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.


Validations are enabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Data Integrator 12.2.1.4.0 completed successfully.
Logs successfully copied to /u02/app/oracle/product/installer/logs.

Applying Patches

The ODI 12.1.2.1.4 comes with a OPatch version that is not compatible with patches we need to apply. So the first patch is for Opatch:

mkdir OPATCH_PATCH
unzip p28186730_1394210_Generic.zip -d OPATCH_PATCH/
cd OPATCH_PATCH/6880880
java -jar /software/odi/OPATCH_PATCH/6880880/opatch_generic.jar -silent oracle_home=/u02/app/oracle/product/12.2.1.4/odi_1

Now, let patch ODI on ExaCC to have the same version as ODI Marketplace (12.2.1.4.221215) :

mkdir PATCH
unzip p34898600_122140_Generic.zip -d PATCH/
cd PATCH/34898600
#Apply the patch
/u02/app/oracle/product/12.2.1.4/odi_1/OPatch/opatch apply

Oracle Interim Patch Installer version 13.9.4.2.10
Copyright (c) 2023, Oracle Corporation. All rights reserved.


Oracle Home : /u02/app/oracle/product/12.2.1.4/odi_1
Central Inventory : /u02/app/oracle/product/installer
from : /u02/app/oracle/product/12.2.1.4/odi_1/oraInst.loc
OPatch version : 13.9.4.2.10
OUI version : 13.9.4.0.0
Log file location : /u02/app/oracle/product/12.2.1.4/odi_1/cfgtoollogs/opatch/opatch2023-05-24_09-59-13AM_1.log


OPatch detects the Middleware Home as "/u02/app/oracle/product/12.2.1.4/odi_1"

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 34898600

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u02/app/oracle/product/12.2.1.4/odi_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
...
...

Now, we have ODI prepared to create the agent. Since, it’s silent installation we will need to run a script provided by Oracle Support (Doc ID 2430188.1).

Go to this directory:

cd /u02/app/oracle/product/12.2.1.4/odi_1/oracle_common/common/bin/

#set the environment variables
./setWlstEnv.sh

Now, create a python file:

vi install_odi_agent.py

#add below code
#!/usr/bin/python

# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This script creates domain, extends domain with all ODI templates
# and finally configures master and work datasources on managed server

import os, sys

###############################################################################
# Set approriate values for following variable as per your environment
###############################################################################

# gets hostname from the OS
host_name = os.getenv('HOSTNAME');

# Middleware Home of your environment
mw_home="/u02/app/oracle/product/12.2.1.4/odi_1";

# odi folder location under middleware home
odi_oracle_home= mw_home + "/odi";

# WLS domain directory. Update as appropriate
wls_domain_dir=mw_home+"/user_projects/domains";

# Domain name for the Odi Jee Agent
wls_domain_name="odi1";

# Weblogic admin user name
wls_user="weblogic";

# Weblogic admin user's password
wls_pass="<password>";

# The STB schema username created through RCU. Ends with _STB
# ODI Master and Work repository and Opss database connections are fetched from
# this schema
service_db_user="DEV_STB";

# STB users password
service_db_pass="<password>";

# JDBC URL to the STB database
# Make sure to use the right URL format
service_db_url='jdbc:oracle:thin:@odi_low?TNS_ADMIN=/u02/app/oracle/product/12.2.1.4/wallet';

# JDBC driver to be used for the STB Database connection
service_db_driver='oracle.jdbc.OracleDriver';

# ODI supervisor user
odi_supervisor='SUPERVISOR';

# ODI Supervisor user's password
odi_supervisor_pass='<password>';

# ODI agent name for the Jee agent. Default teample contains OracleDIAgent
odi_instance='OracleDIAgent';

# Listen Address
odi_listen_address = '<Private IP of ExaCC, where agent is being installed>';

# ODI Port
odi_port = "<new ODI Agent port>";

# ODI Protocol
odi_protocol = "http";

# Agent Machine Name from template
agent_machine="LocalODIMachine";

# Work repository name
odi_work_repository_name='WORKREP';

#Master Repository datasource name. Default is odiMasterRepository
master_db_datasource = "odiMasterRepository";


#Work Reposiotry datasource name. Default is odiWorkRepository
work_db_datasource = "odiWorkRepository";


########################################################################
#DO NOT MODIFY THE CODE BELOW THIS LINE
########################################################################

def createDataSource(dsName, user, password, url, driver):
print 'Setting JDBCSystemResource with name '+dsName
cd('/');
existing=true;
try:
cd('/JDBCSystemResource/'+dsName+'/JdbcResource/'+dsName)
except :
existing=false;
if ( not(existing) ) :
create(dsName,'JDBCSystemResource');
cd('/JDBCSystemResource/'+dsName+'/JdbcResource/'+dsName)
if ( not(existing) ) :
create('NO_NAME_0', 'JDBCDriverParams')
cd('JDBCDriverParams/NO_NAME_0')
cmo.setPasswordEncrypted(password)
cmo.setUrl(url)
cmo.setDriverName(driver)
if ( not(existing) ) :
create('NO_NAME_0', 'Properties')
cd('Properties/NO_NAME_0');
if ( not(existing) ) :
create('user', 'Property')
cd('Property/user')
cmo.setValue(user)

def createWLSUser(user, password):
cd(r'/Security/base_domain/User/'+user)
cmo.setPassword(password)
cd(r'/Server/AdminServer')
cmo.setName('AdminServer')
cd(r'/SecurityConfiguration/base_domain/')
cmo.setNodeManagerUsername(user);
cmo.setNodeManagerPasswordEncrypted(password);

def createODIInstance(instance, machine, listen_address, port, supervisor, supervisor_pass, datasource):
cd('/');
existing=true;
try:
cd('/SystemComponent/'+instance);
except :
existing=false;
if( not(existing) ) :
create(instance,"SystemComponent");
cd('/SystemComponent/'+instance);
set('ComponentType','ODI');
set('Machine',machine);
cd('/SystemCompConfig/OdiConfig/OdiInstance/'+instance);
set("ListenAddress",listen_address);
cmo.setListenPort(port);
set('SupervisorUsername', supervisor);
set('PasswordEncrypted', supervisor_pass);
set('PreferredDataSource', datasource);

def makeOPSSChanges(supervisor, password):
#OPSS related changes - START
cd(r'/Credential/TargetStore/oracle.odi.credmap/TargetKey/SUPERVISOR')
create('c','Credential')
cd(r'Credential')
cmo.setUsername(supervisor)
cmo.setPassword(password)
#OPSS related changes - END

##################################################################################

if not os.path.isdir(mw_home):
sys.exit("Error: fusion middleware home directory '" + mw_home + "' does not exist.")

wls_domain_template_jar = "/wlserver/common/templates/wls/wls.jar"
wls_domain_creation_template_path = mw_home + wls_domain_template_jar

domain_path = wls_domain_dir + '/' + wls_domain_name

work_template_jar = '/common/templates/wls/odi_work_datasource_template.jar'
agent_template_jar = '/common/templates/wls/odi_agent_template.jar'
odi_cam_template_jar = '/common/templates/wls/odi_cam_managed_template.jar'

#reads the template jar for domain creation
readTemplate(wls_domain_creation_template_path, 'Compact')
createWLSUser(wls_user, wls_pass);

#extending ODI domain with all ODI templates
addTemplate(odi_oracle_home + work_template_jar)
addTemplate(odi_oracle_home + agent_template_jar)
addTemplate(odi_oracle_home + odi_cam_template_jar)
cd('/SecurityConfiguration/base_domain') # domain is base_domain until saved as otherwise
cmo.setUseKSSForDemo(false)
makeOPSSChanges(odi_supervisor, odi_supervisor_pass);

#### Pre JDBC configuration to connect to the service_db database
createDataSource( 'LocalSvcTblDataSource', service_db_user, service_db_pass, service_db_url, service_db_driver);

#this section extends domain with ODI templates

# not needed if taking definitions from service_db
# createDataSource( master_db_datasource, master_db_user, master_db_pass, master_db_url, master_db_driver);

# not needed if taking definitions from service_db
#createDataSource( work_db_datasource, work_db_user, work_db_pass, work_db_url, work_db_driver);

# standalone-agent (odi_cam_managed_template)

createODIInstance(odi_instance, agent_machine, odi_listen_address, odi_port, odi_supervisor, odi_supervisor_pass, master_db_datasource)

cd('/')
#create(agent_machine, 'Machine') # agent_machine == LocalOdiMachine, it exists in the template
cd('/Machine/'+agent_machine)
create(agent_machine, 'NodeManager')
cd('NodeManager/'+agent_machine)
cmo.setListenAddress(host_name)

# configure JEE agent from the static template or a generated template
#cd('/Server/ODI_server1')
#cmo.setListenPort(8001)


cd('/')
servers= cmo.getServers()
for server in servers:
sName = server.getName()
cd('/Servers/' + sName)
listenAddress = cmo.getListenAddress()
if ( listenAddress == None or listenAddress == 'All Local Addresses') :
cmo.setListenAddress(None)

getDatabaseDefaults(); # service_db, master_db, work_db (and opss) definitions from service_db

print "domain_path "+domain_path;
writeDomain(domain_path)
closeTemplate()
print '***************************************************************************************'
print 'Done creating ODI JEE Agent domain, Master repository, Supervisor user and Nodemanager'
print '***************************************************************************************'

exit()

You have to adapt the script and put your directories, IPs, Ports and passwords.

Run the script:

./wlst.sh install_odi_agent.py

Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Setting JDBCSystemResource with name LocalSvcTblDataSource
Error: cd() failed. Do dumpStack() to see details.
Error: runCmd() failed. Do dumpStack() to see details.
May 24, 2023 10:34:03 AM oracle.simplefan.impl.FanManager configure
SEVERE: attempt to configure ONS in FanManager failed with oracle.ons.NoServersAvailable: Subscription time out
domain_path /u02/app/oracle/product/12.2.1.4/odi_1/user_projects/domains/odi1
May 24, 2023 10:34:13 AM oracle.security.jps.az.internal.runtime.policy.AbstractPolicyImpl initializeReadStore
INFO: Property for read store in parallel: oracle.security.jps.az.runtime.readstore.threads = null
***************************************************************************************
Done creating ODI JEE Agent domain, Master repository, Supervisor user and Nodemanager
***************************************************************************************


Exiting WebLogic Scripting Tool.

Now, we still need to make some changes in 2 files:

cd /u02/app/oracle/product/12.2.1.4/odi_1/user_projects/domains/odi1/config/jdbc

#create a backup of this file
cp jdbc_odiMasterRepository-jdbc.xml bck_jdbc_odiMasterRepository-jdbc.xml

vi jdbc_odiMasterRepository-jdbc.xml
#edit the file and change the JDBC url to use the wallet folder:

<?xml version="1.0" encoding="UTF-8"?>
<jdbc-data-source xsi:schemaLocation="http://www.bea.com/ns/weblogic/jdbc-data-source http://www.bea.com/ns/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd" xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>odiMasterRepository</name>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@odi_low?TNS_ADMIN=/u02/app/oracle/product/12.2.1.4/wallet</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
..
..

#REPEAT THE SAME STEPS FOR FILE jdbc_odiWorkRepository-jdbc.xml

cp jdbc_odiWorkRepository-jdbc.xml bck_jdbc_odiWorkRepository-jdbc.xml
vi jdbc_odiWorkRepository-jdbc.xml

<?xml version="1.0" encoding="UTF-8"?>
<jdbc-data-source xsi:schemaLocation="http://www.bea.com/ns/weblogic/jdbc-data-source http://www.bea.com/ns/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd" xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>odiWorkRepository</name>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@odi_low?TNS_ADMIN=/u02/app/oracle/product/12.2.1.4/wallet</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>

Change Repository connection to use wallet:

Also, please make sure the Work Repository connection is using the same wallet location:

Creating Agent on ODI Marketplace

Create the agent on ODI Marketplace with the same name, host(or IP) and port that was used in python script:

The last step is to start the ODI agent in ExaCC.

cd /u02/app/oracle/product/12.2.1.4/odi_1/user_projects/domains/odi1/bin

nohup ./agent.sh -NAME=OracleDIAgent &

Confirm the agent is reachable from ODI Marketplace:

I hope this helps. If you have any doubt, please reach out to me through LinkedIn or Medium.

References

Oracle Support Document 1610006.1 (How To Quickly Install ODI 12c, Configure Repositories in Silent Mode, and Create a Collocated Agent) can be found at: https://support.oracle.com/epmos/faces/DocumentDisplay?id=1610006.1

Oracle Support Document 2430188.1 (How To Create an ODI 12c Standalone Agent in Silent Mode) can be found at: https://support.oracle.com/epmos/faces/DocumentDisplay?id=2430188.1

https://docs.oracle.com/en/middleware/fusion-middleware/12.2.1.4/oding/installing-product-software.html#GUID-60CAF774-9DB3-487B-BAEC-F763E5FF63D4

--

--

Eloi Lopes

Opinions expressed are solely my own and do not express the views or opinions of my employer Oracle. https://www.linkedin.com/in/eloilopes/