Select Page

More and more often in an OBIEE you need a custom folder where to place javascript and CSS files like drawing/charting libraries (D3js, Oracle JET etc.), a custom style for OBIEE or just any file (business documentation for example) you want to make available in the browser. This is known as the AnalyticsRes folder from the OBIEE 11g world.

This approach is extremely useful mainly when using JS/CSS charting API/libraries because having them locally available protect you against the risk the remote file is corrupted by hackers adding code to steal your data or simply the file being deleted, moved or updated and breaking your code.
The second benefit of deploying JS/CSS files locally by this approach is that you don’t have to configure the Content Security Policy in the OBIEE Presentation Server config file (as covered in this post about Google Map) to allow the usage of remote files as the folder will be deployed with the same domain/IP and port as OBIEE.

The official documentation cover the deployment of an “analyticsRes” folder as the second approach for deploying a custom style in OBIEE.

In a coming post I will highlight why I don’t like this approach for OBIEE custom style/skin as it seems to have few more bugs compared to the option of deploying a bicustom.ear file. If you are interested into OBIEE custom style process stay tuned.

Steps to deploy a custom folder in OBIEE 12c Weblogic

It takes 10 steps and not longer than 5 minutes.

1) First you must create a folder on the OBIEE server filesystem (or at least a place OBIEE can access, can also be on a mounted shared folder). This is the folder where you place the content you want to make available via your browser.
The minimum required structure is a subfolder named WEB-INF and inside that folder a web.xml file (maybe it’s also possible without the web.xml file or with an empty web.xml file but … it’s already simple enough, so I preferred to avoid issues).

The folder on the disk must contains WEB-INF and web.xml

The folder on the disk must contains WEB-INF and web.xml

The content of the web.xml file is some definition of mime types based on files extensions. For example this is the one provided by OBIEE in the bicustom.war (contained in bicustom-template.ear, the template for developing custom styles/skins in OBIEE).

In my folder I already added a test file named “hello_world.txt”, this is the one I will use to test if the deployment works at the end.

2) Open the Weblogic Server Administration Console, by default http://<your IP/domain>:9500/console in OBIEE 12c, and navigate to the “Deployments” screen using the domain structure view on the left. To install a new deployment you first need to enable the edit mode by clicking on “Lock & Edit” and then you can start the install wizard with the “Install” button.

From the "Deployment" screen first "Lock & Edit" the Weblogic configuration and then start the install steps

From the “Deployment” screen first “Lock & Edit” the Weblogic configuration and then start the install steps

3) The first thing to do is navigate in the filesystem to point to the folder you want to deploy, mine is /opt/oracle/analyticsRes. Thanks to the WEB-INF folder Weblogic knows it can deploy that folder and make it visible on screen with a different icon in front of the folder and a radio button to select the location. Select the folder and move to the next step.

Browser the filesystem and select the folder representing the deployment

Browser the filesystem and select the folder representing the deployment

4) It’s important to set the correct type of installation, in your case “Install this deployment as an application” before to move to the next step.

Install the deployment as an application

Install the deployment as an application

5) Time to define where you want to deploy the folder. I recommend to avoid the AdminServer and to prefer the managed server running OBIEE. In your case you can simply select the “bi_cluster” and “All servers in the cluster” to keep it simple. It’s the same as explicitly select “bi_server1” in a normal setup.

Make the deployment available from the "BI cluster" and not the Admin server to have the same domain and port as OBIEE

Make the deployment available from the “BI cluster” and not the Admin server to have the same domain and port as OBIEE

6) In the option settings a very important step is to select “I will make the deployment accessible from the following location” under the Source Accessibility section of the page. In this way you can easily add new files and edit existing ones and the changes are directly valid and visible.

You must select "I will make the deployment accessible from the following location" to see live changes when you add new files or modify existing ones

You must select “I will make the deployment accessible from the following location” to see live changes when you add new files or modify existing ones

7) The deployment install steps are over, everything is set correctly and you can double check the settings in the summary. Time to move to the configuration screen for the newly installed deployment.

Once the install steps are done you can move to the configuration screen of the new deployment

Once the install steps are done you can move to the configuration screen of the new deployment

8) At this point you can check the configuration and modify attributes if you need, after you must “Activate Changes” with the button on the top-left to commit the changes in the Weblogic configuration.

Review the settings and "Activate Changes" to commit changes in Weblogic

Review the settings and “Activate Changes” to commit changes in Weblogic

9) Last step left is to start servicing queries. In the Control screen of the deployment you can select it and in the “Start” button you select “Servicing all requests”.

The deployment must be "started"

The deployment must be “started”

 

10) Cross your fingers and test! By default the URL is the name of the folder (you can change it by changing the Context Root in the deployment configuration screen).

Once the deployment is started the files in the folder are visible using the browser.

Once the deployment is started the files in the folder are visible using the browser.

Done! Any file you place into the folder (/opt/oracle/analyticsRes in my case) on the filesystem will be directly available through your browser. It can be JS / CSS charting libraries or also pictures, PDF or any other kind of file you can then link or display into OBIEE dashboard and analysis.

In a future post I will use this folder to deploy some JS charting libraries to add missing chart types in an OBIEE analysis.

Share This