Deploying Demantra on UNIX, Solaris or Linux

This chapter covers the following topics:

About the Installer

To install Oracle Demantra on a UNIX, Linux or Solaris machine, run the Installer on a Windows machine. During the installation, choose whether to deploy the Demantra Web application on UNIX, or the Analytical Engine on Linux or Solaris:

Important: If you have already installed Demantra on a Windows machine, do not delete Demantra from Windows and then configure the web and engine on UNIX/Linux. The Windows install is still necessary for future patch applications and upgrades.

the picture is described in the document text

If you selected Deploy Demantra Web Application on UNIX, the Installer places a zip archive of the files required to install the Web on UNIX. It places it on the Windows machine as <Demantra Install Root>\Linux Delivery\.Oracle_Demantra_Unix_Web.tar.gz. It contains the following folders and files:

See Deploy Demantra Web Application on UNIX, Linux, or Solaris for more information.

If you selected Deploy Demantra Analytical Engine on Linux, the Installer places a zip archive of the files required to install the Engine on Linux. It places it on the Windows machine as <Demantra Install Root>\Linux Delivery\.Oracle_Demantra_Linux_Engine.tar.gz. It contains the following folders and files:

See Deploying the Demantra Analytical Engine on Linux for more information.

If you selected Deploy Demantra Analytical Engine on Solaris, the Installer places a zip archive of the files required to install the Engine on Solaris. It places it on the Windows machine as <Demantra Install Root>\Linux Delivery\.Oracle_Demantra_Solaris_Engine.tar.gz. It contains the following folders and files:

See Deploy Demantra Analytical Engine on Solaris for more information.

Deploying the Demantra Web Application on UNIX, Linux, or Solaris

To deploy the Demantra web application on UNIX, Linux, or Solaris, do the following:

Configure the Demantra Web Application

  1. Deploy the .war file. The application WAR file is created during application building process and delivered by the Windows Installer. Copy it to a location accessible by a supported Java container, (for example, WebLogic, and WebSphere) and follow the specific proprietary deployment process for a standard Web application deployment using your application server.

  2. Use the Data Source Configuration Tool to make the necessary updates. Use this tool to define the database connection details to use while executing the APS Standalone. Run the ds_config.sh file. It opens window Data Source Configuration for defining the database connection details. Complete the following fields:

    • Database Type: Oracle

    • Server Name: Database which contains the Schema.

    • User Name: The Database Schema Name.

    • Password Name: Schema's Password.

    • Database Name: The SERVICE_NAME/SID

    • Port Number: Port for connection to Database.

    If you are using command line, see Configure the Standalone Integration Tool (APS Standalone) on UNIX (Optional) in this section.

    Click Save to populate the file DataSource.properties.

  3. Use the Schema Parameters Configuration Tool to make the necessary updates.

    This tool defines system and application parameters used while running some processes (for example, workflow and simulation).

    Run file sp_config.sh. The Schema Parameters Configuration appears. Complete the following fields:

    • Application Server URL: The root context of the Demantra Application Server. Used for notifications from the engine, the desktop, and the database store procedures.

    • Workflow Groups: Groups of workflow users who can log in to this application.

    • Designate Administrator Account: Indicates whether mail settings are configured.

    • Mail Server: The name of the mail server.

    • Administrator Email Address: E-mail address of the system administrator or database administrator.

    • Audit Email Address: E-mail of the employee who will audit the processes performed in the application.

    • Table Spaces: The logical storage unit for the tables and indexes of a schema.

      If you are using command line, see Configure the Standalone Integration Tool (APS Standalone) on UNIX (Optional) in this section.

      Click Save to update tables SYS_PARAMS and APS_PARAMS.

Configure the Standard Integration Tool (APS Standalone) on UNIX (Optional)

If you want to use the standalone integration tool (APS Standalone) on UNIX to execute integration interfaces (instead of on Microsoft Windows or through a workflow), perform this configuration.

  1. Save and unzip the Smoke Test Linux folder in the Linux machine. You can locate the Integration and tools folders anywhere on the Linux machine and they do not need to be under the same directory. However, you need to keep the structure of these folders as described in these instructions.

  2. Navigate to folder tools and open file ds_config.sh.

    • For the value of variable _CD, enter the full path of the tools folder (for example, /usr/DemantraApps/tools).

    • For the value of variable _JAVA_HOME, either enter the appropriate JDK's path (for example, /opt/java1.6/jdk), or leave it empty and define environment variable JAVA_HOME.

    • Optionally, for the value of variable JAVA_OPTS, enter the Java runtime options (for example, -Xmx512m).

  3. Make file ds_config.sh executable. Run command: chmod u+x ds_config.sh.

  4. Populate the connection details using either the user interface or the command line.

    If you are using the user interface:

    • Open the Data Source Configuration Tool.

    • Run command: ./ds_config.sh

    • Fill the appropriate connection details described in section Configure the Web Application on UNIX.

      If you are using the command line, enter and run the command, as shown in the example below.

      For example:

      ./ds_config.sh DBMS=ORA Servername=rws60059rems.us.oracle.com

      Tnsname=mickey LogId=std_730A LogPassword=mdp Database=ma0mu211

      DBPort=1565 File=/usr/Demantra_SA_Test/lib/DS.ini

      Navigate to folder tools/conf and verify that it contains file DataSource.properties. The Schema Parameters Configuration Tool uses this file.

      Please note the following:

      • The parameters are not case sensitive.

      • Each parameter in the command line must contain a value.

      • The parameter File can contain a relative path.

      • You can choose a name for file DataSource.properties (for example, DataSource.properties, ds.ini).

      • If parameter File is not in the command line, the default creation folder is conf and the default name is DataSource.properties.

      • You need a space between each set of parameter and value.

  5. Navigate to folder tools and open file sp_config.sh.

    • For the value of variable _CD, enter the full path of the tools folder (for example, /usr/DemantraApps/tools).

    • For the value of variable _JAVA_HOME, either enter the appropriate JDK's path (for example, /opt/java1.7/jdk), or leave it empty and define environment variable JAVA_HOME.

    • Optionally, for the value of variable JAVA_OPTS, enter the Java runtime options (for example, -Xmx512m).

  6. Make file sp_config.sh executable. Run command: chmod u+x sp_config.sh.

  7. Populate the schema parameters using either the user interface or the command line.

    If you are using the user interface:

    • Open the Schema Parameters Configuration Tool

    • Run command: ./sp_config.sh

    • Fill the appropriate URL, workflow groups, mail settings, and tablespaces described in Configure the Web Application on UNIX.

      If you are using the command line, enter and run the command below.

      For example:

      ./sp_config.sh AppServerURL=http://mufasa/Demantra

      workflow.group=p_portal,Collaboration,Collaborator,

      "Demand Analyst",SOP Mail=true mail.server=my.server.com

      mailAddress=admin@mail.com auditMailAddress=Audit@mail.com

      tablespace=DEV_D indexspace=DEV_X simulationspace=DEV_D

      simulationindexspace=DEV_X sales_data_engine_space=DEV_D

      sales_data_engine_index_space=DEV_X

      Navigate to tables SYS_PARAMS and APS_PARAMS and verify that the parameters are updated.

      Please note the following:

      • The parameters are not case sensitive.

      • Each parameter in the command line must contain a value.

      • The parameters are not mandatory.

      • You need a space between each set of parameter and value.

      • If the value contains a space, use inverted commas to wrap it.

  8. Copy file DataSource.properties. Navigate to folder tools/conf (or the folder you used) and copy it (or the name you used) to folder Integration/conf.

  9. Navigate to folder Integration and open file aps.sh.

    • For the value of variable _CD, enter the full path of the tools folder (for example, /usr/DemantraApps/Integration).

    • For the value of variable _JAVA_HOME, either enter the appropriate JDK's path (for example, /opt/java1.7/jdk), or leave it empty and define environment variable JAVA_HOME.

    • Optionally, for the value of variable JAVA_OPTS, enter the Java runtime options (for example, -Xmx512m).

  10. Make file aps.sh executable. Run command: chmod u+x aps.sh.

  11. Run the APS Standalone. Use the following syntax:

    ./aps.sh [EXPORT_DATA/IMPORT_DATA/EXPORT_LEVEL/IMPORT_LEVEL] "

    [Integration Name]" "[ Query/Level Name]"

    For example, ./aps.sh EXPORT_DATA "Exp_integration" "Exp_profile"

Deploying the Demantra Analytical Engine

Unless otherwise noted, all instructions refer to all target platforms: Windows, Linux and Solaris.

Prerequisites for Engine Setup

Deploying the Analytical Engine with a New Oracle Wallet Repository

Oracle Wallet Manager is an application that wallet owners use to manage and edit the security credentials in their Oracle wallets. A wallet is a password-protected container used to store authentication and signing credentials, including private keys, certificates, and trusted certificates needed by SSL. From 12.2.5.1 onwards the Demantra forecasting engine will use Oracle Wallet to drive the credentials used by the engine.

Use the following procedure to use a secure Oracle Wallet with the Analytical Engine:

  1. Run the Setup.bat (for Windows) or Setup.sh (For Linux and Solaris) setup script on each machine where the Analytical Engine or Engine Manager will run. This sets up environment variables using Oracle wallet.

  2. When prompted provide the following details:

    • DB Hostname: The host name for the machine where the database is located.

    • Port: The database server listener port.

    • Service Name: The database service/sid name.

    • Username: The user name for the Demantra schema.

    • Oracle wallet password: Provide a password to protect the newly created wallet repository Retype this password again for verification and a third time to add the actual credentials into the Oracle Wallet. The password should at least be of 8 characters long.

  3. The setup scripts generate a “setenv” script that contains the necessary environment variables required for all engine modules to run. This script is called from within the other scripts used to run the Engine Manager, Engine Starter or Analytical Engine.

    Note: The setup process overwrites any files produced by a previous setup.

  4. After setup completes successfully review the setenv script and correct any entries if necessary.

    Parameter Description
    ENG_CONNECTION This parameter defines the Oracle wallet connection name used by Engine modules. You should only modify this parameter if you are using a different name than the default “DEM_CONN”.
    ENG_STARTER_ID This parameter is a unique ID for each computer where Engine Starter and the Analytical Engine will run. The default value is the host name. There is an 8-character limit for this parameter.
    ENG_NUM_CONCURRENT This parameter defines the number of concurrent engine processes that are allowed to run on the specific host. The default value is the number of available CPU cores.
    TNS_ADMIN This parameter defines the location for the newly created or existing Oracle Wallet.
    ORACLE_HOME (LINUX and Solaris only) This parameter points to included instant client binaries.

After the setup process completes it creates a new Oracle Wallet with the connection name “DEM_CONN”, and pointing to the specified database. Schema users are created and stored in a new directory called TNS_ADMIN. This directory also contains the required tnsnames.ora and sqlnet.ora files.

Setup also creates and runs the UpdatEngPath.sql sql script. This script updates the EngineBasePath SYS_PARAMS parameter, which is used by workflows to identify where the Analytical Engine is deployed. This path is accessible in workflows using the #EngineBasePath# token, which can be used to call any of the Analytical Engine scripts.

Note: The System Administrator is responsible for modifying security privileges for the newly created wallet files so only the intended users can access them. For example, allowing read-only access to users running the Analytical Engine, but read and write access to Administrators.

Example Setenv.bat File

@echo off 
set ENG_CONNECTION=DEM_CONN
set ENG_STARTER_ID=%COMPUTERNAME%
for /f "skip=1 delims=" %%i in ('wmic cpu get numberofcores') do if not defined NumberOfCores set NumberOfCores=%%i
SET ENG_NUM_CONCURRENT=%NumberOfCores%
set TNS_ADMIN=%~dp0TNS_ADMIN set PATH=%~dp0\bin;%PATH%  

Using Unsecure Direct Connection Details

Caution: Use the following procedure to circumvent the Oracle wallet setup and passes database credentials directly. Passing unencrypted credentials is not advised and may pose a security risk.

  1. Run the following commend:

    Setup.sh –nowallet

    You will not be prompted for any input, since database credentials are provided directly to the Manager, Engine Starter, and Analytical Engine.

  2. Setup creates the UpdatEngPath.sql sql script, which updates the EngineBasePAth SYS_PARAMS parameter, which is used by workflows to identify where the Analytical Engine is deployed. You must run this script manually to update the EngineBasePath parameter.

Manual Setup for Using an Existing Secure Wallet

  1. Run the following command:

    Setup.sh –nowallet

    You will not be prompted for any input, since database credentials are provided directly to the Manager, Engine Starter, and Analytical Engine.

  2. Setup creates the UpdatEngPath.sql sql script, which updates the EngineBasePAth SYS_PARAMS parameter, which is used by workflows to identify where the Analytical Engine is deployed. You must run this script manually to update the EngineBasePath parameter.

  3. Add a new “DEM_CONN” connection to your existing wallet repository, pointing to the intended schema for Demand Engine. Your wallet must be configured for auto login as otherwise engine modules will not be able to connect without user intervention.

  4. Review the generated setenv script and modify the TNS_ADMIN variable to point to your existing wallet or alternately make sure it is defined at the system/user level and remove it from the setenv script.

Real Application Clusters (RAC) Advanced Setup with Oracle Wallet

  1. Use one of the previous Oracle Wallet setup methods.

  2. Create a dedicated RAC service name for each of the RAC nodes.

  3. Add an additional connection to your Oracle Walletfor each existing RAC service, pointing specifically to that service. While “DEM_CONN” should point to the general scan address, the service specific connections (DEM_CONN1, DEM_CONN2…) should each point to a one specific RAC service name.

  4. In Settings.xml, modify the RACServiceNames argument to list the newly created wallet connection names. For example, Example: argument="DEM_CONN1, DEM_CONN2".

    • Engine Starter must be running on each Machine where Engines are to be run. It can be invoked either manually as a background process or as an automated startup item. Engine Starter should be invoked using the command EngineStarter.bat/sh and not directly.

    • Use either Start_Engine2K.bat/sh [Profile ID] or Start_Simulation2K.bat/sh to start an Engine run. Internally these scripts/batch file will setup the environment variables as were defined at setup stage (1) and will run Engine Manager to start the actual run.

      Note: Users are responsible for securing access to the Oracle Wallet files by allowing read access only the system user that created or requires use of Oracle Wallet.

      RAC support for the Analytical Engine requires an In-Memory Consumption Driven Planning license.