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 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).
<?xml version="1.0" encoding="utf-8"?>
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.
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.
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.
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.
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.
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.
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.
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”.
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).
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.