X

Best Practices from Oracle Development's A‑Team

Deploying Oracle Remote Data Connector in Tomcat for Oracle Analytics Cloud

Introduction<_h2>

This post describes deploying Oracle Remote Data Connector (RDC) for Tomcat in a Compute instance running on Oracle Cloud Infrastructure (OCI) for use by Oracle Analytics Cloud (OAC).<_p>

RDC is used primarily in cases where data sources are not accessible using a public IP address.<_p>

It supplements the official RDC documentation found here<_a><_strong> and here<_a> <_strong>with screen images and links to additional references.<_p>

 <_p>

A step-by-step example is provided for those desiring to perform a deployment. It uses a simple development method to validate basic connectivity.<_p>

The diagram below shows the components and accesses used.<_p>

<_a><_p>

 <_p>

 Before You Deploy<_h2>

Prerequisites<_h3>

Compute Instance on a Public Subnet
Security list for the VCN with ingress rules allowing access to ports 22, 80 and 1521
Apache and Tomcat configured and started on the compute instance.
Settings of unpackWARs=true and autoDeploy=true in Tomcat server.xml file
Client SSH _SCP Utilities
Private Key for SSH access to the compute instance
OAC Public key for use by RDC
Downloaded and Installed OAC Developer Client Tool
Downloaded RDC Web Archive from OTN
Oracle JDBC driver (provided with the Tomcat image used)<_p> <_div>

Authorizations<_h3>

Administrator role in the Oracle cloud tenancy for provisioning compute instances and configuring networks..
Administrator role in OAC for replacing data models.
Connect privilege in the database instance accessed by RDC<_p> <_div>

About the Marketplace Compute Image with Tomcat<_h3>

This post uses a compute instance provisioned from an OCI custom image in the Oracle Cloud Marketplace certified by Bitnami. This link here<_a> <_strong>provides links to the image, instructions, and general Tomcat documentation. The provisioned instance provides a running Apache_Tomcat environment with the prerequisite settings and firewall rules.<_p>

Security list Ingress Rules Allowing Access to Ports 22, 80 and 1521<_h3>

Refer here<_a> <_strong>for detailed information. The simplest method is to update the default security list created with the Virtual Cloud Network (VCN).<_p>

Port 22 is for SSH access into the Tomcat instance<_p>

Port 80 is for HTTP access to RDC from OAC and the OAC Administration tool<_p>

Port 1521 is for database access from RDC<_p>

Client SSH _SCP Utilities<_h3>

If using a Mac, the ssh<_strong> <_span>and scp<_strong> <_span>utilities should be available. If using Windows, PuTTY utilities are commonly used and can be downloaded from here<_a>. <_strong>This post uses PuTTY.<_p>

Private Key for SSH access to the Tomcat Instance  (.ppk fomat if using PuTTY)<_h3>

The private key is associated with the public key used to provision the compute instance hosting Tomcat. It is required to use the SSH and SCP utilities.<_p>

The PuTTYgen utility converts the key into a PuTTY-format key (*.PPK) for use with PuTTY.<_p>

Apache and Tomcat Configured and Started on the Compute Instance<_h3>

To verify the status of the services, SSH into the instance and run this command:<_p>

sudo _opt_bitnami_ctlscript.sh status <_strong><_p>

      If necessary, start the services:<_p>

sudo _opt_bitnami_ctlscript.sh start<_strong><_p>

Settings of unpackWARs=true<_strong><_span> and autoDeploy=true<_strong><_span> in the Tomcat server.xml file<_h3>

This deployment has the file in _opt_bitnami_apache-tomcat_conf<_span><_strong>. The relevant section in the server.xml<_span><_strong> file is:<_p>

<_p>

OAC Public key for use by RDC<_h3>

Download the OAC Public Key. RDC authenticates access using this key. Refer here<_a> <_strong>for detailed instructions.<_p>

<_a><_p>

Downloaded and Installed OAC Developer Client Tool from OTN<_h3>

The latest version can be downloaded from here<_a>. <_strong>This is also referred to as the OAC Administration Tool.<_p>

Downloaded RDC Web Archive (WAR) File from OTN<_h3>

The latest version can be downloaded to a client workstation from here<_a>. <_strong>If the download is a zip file, unzip the contents.<_p>

 Deploying RDC to the Tomcat Instance<_h2>

This section describes deploying the RDC application, configuring the metadata security option, and validating the deployment.<_p>

All commands in the Tomcat instance are run as the root<_span> <_strong>user.<_p>

Beginning the Deployment<_h3>

This section describes uploading, copying, and deploying the RDC WAR file.<_p>

Uploading the WAR File<_h4>

The WAR file is uploaded from a client workstation to the Tomcat instance using the secure copy utility and the Tomcat instance private key.<_p>

The pscp<_span> <_strong>syntax is: pscp [options] source [source...] [user@]host:target. An example is below:<_p>

C:>pscp -i < Path to your Private Key file<_em> > < Path to your WAR file<_em> > opc@< Tomcat IP Address<_em>>:_tmp<_strong><_p>

Copying the WAR File<_h4>

The WAR file is backed up and renamed to the application name required by RDC (obiee<_strong><_span>).<_p>

sudo su –<_strong>
cd _tmp<_strong>
cp < Your uploaded WAR file<_em> > < Your uploaded WAR file<_em> >.orig<_strong>
mv < Your uploaded WAR file<_em> > obiee.war<_strong><_p>

Deploying the WAR file<_h4>

The settings of unpackWARs=true<_span><_strong> and autoDeploy=true <_strong>instruct Tomcat to unarchive the WAR file and deploy the web application. <_span><_span>Additional details for deploying on a running Tomcat server are here<_strong><_a>. The Tomcat home in this example is _opt_bitnami_apache-tomcat<_span><_strong><_p>

export TOMCAT_HOME=_opt_bitnami_apache-tomcat<_strong>
cp _tmp_obiee.war $TOMCAT_HOME_webapps<_strong><_p>

Validating the Initial Deployment<_h4>

The initial deployment of RDC is validated using a HTTP command. From a browser enter the URL:<_p>

http:__< Tomcat IP<_em> Address<_em> >_obiee_javads?status<_span><_strong><_p>

You should receive a HTTP Status 401 – Unauthorized<_strong> response. If you receive a 404 – Not Found<_strong> then RDC is not running.<_p>

Disabling Metadata Security<_h3>

Disabling metadata security is required for RDC. Two options are presented. Both are performed by editing the shell script used to start Tomcat. This example uses the catalina.sh<_strong><_span> in the $TOMCAT_HOME_bin directory. Change to this directory, backup the script and use the vi<_span> <_strong>editor.<_p>

cd $TOMCAT_HOME_bin<_strong>
cp catalina.sh catalina.sh.preRDC<_strong>
vi catalina.sh<_strong><_p>

Setting the JAVA_OPTS Variable<_h4>

After line 1, insert the following then save and exit the editor.<_p>

<_a><_p>

-- Or -- Setting the DISABLE_RDC_METADATA_SECURITY Variable<_h4>

After line 1, insert the following then save and exit the editor.<_p>

# the following lines added for RDC<_strong>
export DISABLE_RDC_METADATA_SECURITY=1<_strong>
echo export DISABLE_RDC_METADATA_SECURITY=1<_strong><_p> <_div>

Restarting Tomcat<_h4>

Restarting Tomcat enables the metadata security changes. Run the following.<_p>

_opt_bitnami_ctlscript.sh restart tomcat<_strong><_p>

Revalidating the RDC Deployment<_h4>

Revalidating for the metadata changes uses a HTTP command. From a browser enter the URL:<_p>

http:__< Tomcat IP<_em> Address<_em> >_obiee_javads?status<_span><_strong><_p>

You should now receive an XML response similar to the following:<_p>

<_a><_p>

Configuring the OAC Public Key in RDC<_h3>

The prerequisite downloaded key is uploaded to the Tomcat instance and placed in the appropriate directory.<_p>

Uploading the OAC Public Key<_h4>

Using an SCP utility, upload the key to the Tomcat instance. The example below uses PSCP.<_p>

pscp -i < Path to your Private Key file<_em> > < Path to the public key<_em> > opc@< Tomcat IP Address<_em>>:_tmp<_strong><_p>

Placing the OAC Public Key<_h4>

Copy the key to the directory created by the deployment of RDC.<_p>

cp _tmp_oracle_bics_rdc.pem _opt_bitnami_apache-tomcat_webapps_obiee_rdc_keys<_strong><_p>

Configuring an RDC Database Connection for an OAC Data Model<_h3>

This section is for use with an OAC Data Model connection. If using DV RDC Direct Connections, proceed to Restarting Tomcat<_strong> below<_p>

Configuring an RDC Database Connection is performed by editing two configuration files, server.xml<_span> <_strong>and context.xml<_strong><_span>, then restarting Tomcat.<_p>

Backup the Configuration Files<_h4>

Backup the files using:<_p>

cd $TOMCAT_HOME_conf<_strong>
cp server.xml server.xml.preRDC<_strong>
cp context.xml context.xml.preRDC<_strong><_p>

Edit the Configuration Files<_h4>

Use the vi<_span> <_strong>editor to edit the files.<_p>

server.xml<_h4>

Replace the GlobalNamingResources<_span><_strong> element with:<_p>

<_a><_p>

context.xml<_h4>

Add the ResourceLink<_span><_strong> element within the Context<_span><_strong> element:<_p>

<_a><_p>

Restarting Tomcat<_h3>

Restarting Tomcat enables the database connection and public key changes. Run the following.<_p>

_opt_bitnami_ctlscript.sh restart tomcat<_strong><_p>

 Configuring OAC to Use RDC<_h2>

Connecting Directly to RDC using OAC 105.2+<_h3>

Beginning with this version, direct data connections are possible using RDC without an RPD. Refer here<_a><_strong> and here<_a> <_strong>for detailed instructions.<_p>

Configuring the Data Model with the OAC Developer Client Tool<_h3>

To use RDC with an RPD Data Model, first load the Java Data Sources. Then open the RPD and enter the RDC details in a new or modified connection pool.<_p>

Loading the RDC Java Data Sources<_h4>

Start the the OAC Developer Client tool. Before opening an RPD:<_p>

In the File<_strong> menu, select Load Java Datasources<_strong>.
In the Connect to Java Datasource Server<_strong> dialog:<_p>

Specify the Hostname<_strong> and the Port<_strong> where Remote Data Connector is running.
Enter the Tomcat Administrator Username<_strong> and Password<_strong>.
Leave the SSL<_strong> box unchecked.
Click OK<_strong>.<_p>

<_a><_p>

Open the RPD<_h4>

From the File<_strong> menu, Open<_strong> the RPD in Offline<_strong><_span> or In the Cloud<_strong><_span> mode.<_p>

Creating or Modifying a Physical Database Connection Pool<_h4>

A connection pool is required for the physical database defined in RDC . In the connection pool dialog,<_p>

On the General<_strong> tab:<_p>

Enter a meaningful Name<_strong>
Choose JDBC_JNDI<_strong><_span> for the Call Interface<_strong>
Enter the RDC URL for the Data Source Name<_strong>. Enter the User Name<_strong> and Password<_strong> for the database defined in RDC.<_p>

The syntax of the Data Source Name is:<_p>

http:__< Tomcat IP Address<_span> >:< Tomcat Port<_span> >_obiee_javads_myjdbcdatasource<_strong><_p> <_div>

<_a><_p>

On the Miscellaneous<_strong> Tab, ensure<_p>

Required Cartridge Version<_strong> is 12.1<_strong><_span>
Use SQL Over HTTP<_strong> is true<_strong><_span><_p>

<_a><_p>

Click OK<_strong>.<_p>

Save and Close the RPD<_h4>

From the File<_strong> menu, Save<_strong> the RPD and Check Consistency.<_p>

If the RPD is open In the Cloud<_strong><_span> mode:<_p>

From the File<_strong> menu, click Cloud<_strong> and Publish<_strong>.<_p>

Replacing the Data Model in OAC<_h3>

If the RPD was opened in offline mode above, replace it in OAC.<_p>

From the OAC Home page:<_p>

Click the <_a> and Console<_strong><_p>

From Service Administration<_strong> click Manage Snapshots<_strong><_p>

From the <_a> on the right, click Replace Data Model.<_strong><_p>

Validating the RDC Data Model Connection<_h3>

It may take a couple of minutes for a published or replaced data model to fully be synchronized. Run an analysis using a subject area associated with the RDC database connection pool in the RPD to validate the connection.<_p>

Summary<_h2>

This post described deploying Oracle Remote Data Connector for Tomcat in a Compute instance running on Oracle Cloud Infrastructure for use by Oracle Analytics Cloud.<_p>

For more OAC, BICS and BI best practices, tips, tricks, and guidance that the A-Team members gain from real-world experiences working with customers and partners, visit https:__blogs.oracle.com_author_dayne-carley<_a><_strong><_p>

 <_p>

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha