Why... Why... Why?
This blog is dedicated to documenting error resolution and other tidbits that I discover while working as a Consultant in the Oracle EPM (Hyperion) field. As much of my job revolves around issue resolution, I see an opportunity to supplement the typical troubleshooting avenues such as the Oracle Knowledgebase and Oracle Forums with more pinpointed information about specific errors as they are encountered. Beware, the information found in this blog is for informational purposes only and comes without any warranty or guarantee of accuracy.

EPMVirt: Create your own Oracle Hyperion Virtual Environment:

Sunday, January 8, 2017

A Look Inside EPMVirt: Automation Scripts - EPM Installation

Finally, this post will get into the EPMVirt automation for EPM.

The installation is performed using a simple response file:

/uo/automation/epm/installAll.sh
which contains:
/u0/install/epm/installTool.sh -silent /u0/automation/epm/silentInstall.xml

Response files for the install tool are pretty simple. They just contain what products to install. To generate a response file simply go to the last page of the EPM installer after selecting the products and you sill see a Save button for saving the contents to a file.
<?xml version="1.0" encoding="UTF-8"?>
<HyperionInstall>
  <HyperionHome>/u0/Oracle/Middleware</HyperionHome>
  <UserLocale>en_US</UserLocale>
  <ActionType>0</ActionType>
  <SelectedProducts>
        <Product name="foundation">
            <ProductComponent name="foundationServices">
                <Component>hssWebApp</Component>
                <Component>staticContent</Component>
                <Component>weblogic</Component>
            </ProductComponent>
            <ProductComponent name="Calc">
                <Component>CalcWebApp</Component>
            </ProductComponent>
        </Product>
        <Product name="essbase">
            <Component>essbaseWebApp</Component>
            <Component>essbaseApsWebApp</Component>
            <Component>essbaseApsWebAppSamples</Component>
            <Component>essbaseStudioService</Component>
            <Component>essbaseStudioServiceSamples</Component>
            <Component>essbaseService</Component>
            <Component>essbaseServiceSamples</Component>
        </Product>
        <Product name="reportingAndAnalysis">
            <ProductComponent name="raFramework">
                <Component>raFrameworkWebApp</Component>
                <Component>raFrameworkService</Component>
            </ProductComponent>
            <ProductComponent name="fr">
                <Component>frWebApp</Component>
            </ProductComponent>
        </Product>
        <Product name="planning">
            <Component>planningWebApp</Component>
        </Product>
        <Product name="disclosure">
            <Component>disclosureWebApp</Component>
        </Product>
        <Product name="hfm">
            <Component>hfmAdmClient</Component>
            <Component>hfmWebApps</Component>
            <Component>hfmService</Component>
        </Product>
        <Product name="erpi">
            <Component>erpiWebApp</Component>
        </Product>
        <Product name="profitability">
            <Component>osloWebApp</Component>
            <Component>osloWebAppSamples</Component>
        </Product>
    </SelectedProducts>
  <ProductHomes/>
  <UpgradeCleanUp/>
  <UninstallCleanUp>false</UninstallCleanUp>
</HyperionInstall>
After the installer is run, the Config tool is also run using response files. My preference when running the config tool is to run through the Config for each product separately. Consequently, I have saved response files for each product and run through them separately. 
#!/bin/bash
echo "Status of database is...."
source ~/HYPDB.env
sqlplus EPM_HSS/PWD < /dev/null
echo "Fixing HFM scripts..."
cp /u0/automation/epm/boost_libs/hfm_post_install_steps.sh /u0/Oracle/Middleware/EPMSystem11R1/products/FinancialManagement/Server/
cp /u0/automation/epm/boost_libs/odbc.ini /u0/Oracle/Middleware/EPMSystem11R1/common/ODBC-64/Merant/7.1/odbc.ini
echo "Configuring..."
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_Foundation.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_CalcMgr.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_FDMEE.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_Essbase.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_EssbaseStudio.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_HFM.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_Plan.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_Profit.xml
/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_RA.xml

/u0/Oracle/Middleware/EPMSystem11R1/common/config/11.1.2.0/configtool.sh -silent /u0/automation/epm/EPMconfig_ReconfigWeb.xml
The basic flow of the file is:

  1. Check that the database is running by trying to connect using SQLPlus
  2. Run some customizations needed to get HFM 11.1.2.4 running on Oracle Linux 
  3. Run the typical EPM configurations
  4. Reconfigure the web server so it knows about all the products we've installed.
  5. LCM Import some Financial Reports for HFM and Planning 
  6. LCM Import the HFM-COMMA4DIM demo app
When complete, the basic EPM environment is ready. However, it doesn't contain any applications or data. Since EPMVirt is meant to be a working environment for demos, the next step will be to get the sample applications up and running. The sample applications do not come preinstalled. Again, like the OS install, database install, and EPM install - the sample applications config is all automated.

The automation is stored under /u0/automation/apps

I would like to mention again that this is just a test environment and the scripts and methods seen here are not meant for production. In addition, some of this requires crude, behind the scenes manipulations that I will leave to more advanced readers to take up on their own if interested. 

The script which creates the sample applications is /u0/automation/apps/createApps.sh.

The basic idea of the script is to:

  • Do some post install tuning for HFM. The default HFM memory settings are much to high to run on a small VM environment. 
  • LCM Import the Planning Sample Application
  • Perform a planning refresh to Essbase
  • Load the sample data for the Planning app into Essbase
  • Calculate the Essbase cube to roll up the data
  • LCM Import HFM-COMMA4DIM
Full contents of the createApps.sh script are below:

#!/bin/sh
echo "Post install steps for HFM..."
/u0/automation/epm/boost_libs/hfm_post_install_steps_helper.sh
/u0/automation/apps/HFMTuning.sh

echo LCM IMPORT OF CANNED APP
rm -rf /tmp/lcm 2> /dev/null
unzip /u0/automation/apps/PLANDEMO.zip -d /tmp/lcm

perl -p -i -e "s/name=\"\"/name=\"admin\"/" /tmp/lcm/HP-*/Import.xml
perl -p -i -e "s/password=\"\"/password=\"password\"/" /tmp/lcm/HP-*/Import.xml

/u0/Oracle/Middleware/user_projects/epmsystem1/bin/Utility.sh /tmp/lcm/HP-*/Import.xml

echo Planning Database Cube Refresh
echo password > /tmp/password
/u0/Oracle/Middleware/user_projects/epmsystem1/Planning/planning1/CubeRefresh.sh /A:PLANDEMO /U:admin /C /D /FSV /L < /tmp/password

echo Unzip the Planning Data
rm -rf /tmp/sampapp 2> /dev/null
unzip /u0/Oracle/Middleware/EPMSystem11R1/products/Planning/bin/sampleapp/sampApp_data.zip -d /tmp/sampapp 
echo Load Data and Calc Planning Cube
/u0/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/startMaxl.sh /u0/automation/apps/loadPlanData.maxl


echo LCM Import for Reporting and Analysis
rm -rf /tmp/lcm 2> /dev/null
unzip /u0/automation/apps/RA.zip -d /tmp/lcm

perl -p -i -e "s/name=\"\"/name=\"admin\"/" /tmp/lcm/Import.xml
perl -p -i -e "s/password=\"\"/password=\"password\"/" /tmp/lcm/Import.xml

/u0/Oracle/Middleware/user_projects/epmsystem1/bin/Utility.sh /tmp/lcm/Import.xml

echo LCM Import Part 1 for HFM
rm -rf /tmp/lcm 2> /dev/null
unzip /u0/automation/apps/HFM-COMMA4DIM.zip -d /tmp/lcm
cp /u0/automation/apps/ImportHFM1.xml /tmp/lcm
perl -p -i -e "s/name=\"\"/name=\"admin\"/" /tmp/lcm/ImportHFM1.xml
perl -p -i -e "s/password=\"\"/password=\"password\"/" /tmp/lcm/ImportHFM1.xml
/u0/Oracle/Middleware/user_projects/epmsystem1/bin/Utility.sh /tmp/lcm/ImportHFM1.xml
echo Ignore errors on import above ^^^

echo LCM Import Part 2 for HFM
perl -p -i -e "s/name=\"\"/name=\"admin\"/" /tmp/lcm/Import.xml
perl -p -i -e "s/password=\"\"/password=\"password\"/" /tmp/lcm/Import.xml
perl -p -i -e 's/^.*Application Snapshot.*$//' /tmp/lcm/Import.xml
/u0/Oracle/Middleware/user_projects/epmsystem1/bin/Utility.sh /tmp/lcm/Import.xml

Sample HFM Tuning SQL script for demo app:

/u0/automation/apps/HFMTuning.sh
update EPM_HFM.XFM_PARAMETERS set VALUE=500 where parametername = 'MaxDataCacheSizeInMB';
update EPM_HFM.XFM_PARAMETERS set VALUE=1 where parametername = 'MaxNumConcurrentConsolidations';
update EPM_HFM.XFM_PARAMETERS set VALUE=100 where parametername = 'MaxNumCubesInRAM';
update EPM_HFM.XFM_PARAMETERS set VALUE=10000 where parametername = 'MaxNumDataRecordsInRAM';
update EPM_HFM.XFM_PARAMETERS set VALUE=100 where parametername = 'MinDataCacheSizeInMB';
update EPM_HFM.XFM_PARAMETERS set VALUE=1 where parametername = 'NumConsolidationThreads';
update EPM_HFM.XFM_PARAMETERS set VALUE=1 where parametername = 'NumThreadsToUseWhenUpdatingCalcStatusSystemWasChanged';
update EPM_HFM.XFM_PARAMETERS set VALUE=1 where parametername = 'NumEAThreads';
update EPM_HFM.XFM_PARAMETERS set VALUE=180 where parametername = 'SQLCommandTimeout';

LoadPlanData.maxl
login admin password;
import database PLANDEMO.Consol data from data_file "/tmp/sampapp/SampleApp_data.txt" on error abort;
execute calculation default on PLANDEMO.Consol;
quit;

This concludes the discussion on "A Look Inside EPMVirt". It seems like a fairly simple task to put together an auto-installing EPM Demo environment, but as you can see, there are a number of automation scripts required. It boils down to automating the OS Install, Database, and EPM environment, then bundling into a handy EPMVirt RPM.
Enjoy!


1 comment:

  1. Hello Nicholas! This is pure gold! I wish you will have automated scripts for windows environments. Awesome job!!!

    ReplyDelete