1 How to Install Oracle Stream Analytics?

Oracle Stream Analytics is a very advanced, scalable, reliable, and flexible platform that helps you in designing event-processing applications very efficiently. It caters to a wide variety of industries like Telecom, Financial Services, Transportation, Retail, Insurance, and so on. You can use Oracle Stream Analytics for Real-time Fraud Detection, Real-time Location-based Marketing, Real-time Smart Inventory Management, Real-time Dynamic Pricing, Real-time Asset Tracking, and so on. This document helps you to plan and execute the installation of Oracle Stream Analytics in a seamless manner.

Planning Your Installation

To plan the installation of Oracle Stream Analytics 18.1.0.0.1 efficiently, ensure that you have the required hardware and software. You should also perform the prerequisite procedures before starting the installation process.

You can use the information in the certification matrix before installing Oracle Stream Analytics 18.1.0.0.1. The certification matrix provides you useful links to support pages, supported software, and system requirements in general. The following software is required for operation of Oracle Stream Analytics:
  • Oracle JDK 8 Update 131 and higher versions

  • Repository Database

    • Oracle Database versions 12.2.0.1 or higher, 12.1.0.1 or higher, and 11.2.0.4 or higher

    • Else, you can use MySQL version 5.6 or 5.7

  • A running Hadoop cluster with version 2.6 or 2.7

  • A running Kafka cluster with version 0.10.2.0

  • Locally installed Spark with version 2.2.1 built for Hadoop 2.7

    Note:

    Install Spark and JDK in the same node on which you plan to install Oracle Stream Analytics. See Installing Oracle Stream Analytics.
  • Google Chrome browser with version 60 or higher

Installing Oracle Stream Analytics

Only Oracle user-managed services This topic applies only to Oracle user-managed services.

After you ensure that you have procured the required software and hardware and completed the procedures to set up the required environment for installation, use the following steps to install Oracle Stream Analytics 18.1.0.0.1:
  1. Create a directory, for example, spark-downloads, and download Apache Spark into the newly created folder as specified below:
    • Spark release: 2.2.1

    • Package type: Pre-built for Apache Hadoop 2.7 and later

    • Download Spark: spark-2.2.1-bin-hadoop2.7.tgz

  2. Extract the Spark archive to a local directory.
    You can see a subfolder, spark-2.2.1-bin-hadoop2.7.
  3. Create a new directory, for example, OSA-downloads and download OSA-18.1.0.0.1.zip from Oracle eDelivery and extract it into the newly created folder.
    You can find the OSA-18.1.0.0.1-README.txt file in the OSA-18.1.0.0.1 zip file.
  4. Review the file OSA-18.1.0.0.1-README.txt.
  5. Set the environment variables:
    1. Set the SPARK_HOME environment variable in the OSA-18.1.0.0.0/osa-base/etc/osa-env.sh file to point to the directory where you have extracted the Spark archive. For example:
      SPARK_HOME=/products/spark-downloads/spark-2.2.1-bin-hadoop2.7
    1. Set the JAVA_HOME environment variable in the OSA-18.1.0.0.0/osa-base/etc/osa-env.sh file to point to the directory where you have extracted the JDK archive. For example:
      JAVA_HOME=/products/java-downloads/jdk1.8.0_131
  6. Configure your data source in OSA-18.1.0.0.1/osa-base/etc/jetty-osa-datasource.xml as per instructions in Initializing Metadata Store.
    1. Uncomment and edit one of the two Data source configurations, either for Oracle Database or MySQL depending on the database you want to use as metadata store. The uncommented fragment for Oracle database is shown below:

      <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">
           <Arg>
             <Ref refid="wac"/>
           </Arg>
           <Arg>jdbc/OSADataSource</Arg>
           <Arg>
             <New class="oracle.jdbc.pool.OracleDataSource">
               <Set name="URL">jdbc:oracle:thin:@myhost.example.com:1521:OSADB</Set>
               <Set name="User">{OSA_USER}</Set>
               <Set name="Password">{OSA_USER_PWD}</Set>
               <Set name="connectionCachingEnabled">true</Set>
               <Set name="connectionCacheProperties">
                 <New class="java.util.Properties">
                   <Call name="setProperty"><Arg>MinLimit</Arg><Arg>1</Arg></Call>
                   <Call name="setProperty"><Arg>MaxLimit</Arg><Arg>15</Arg></Call>
                   <Call name="setProperty"><Arg><InitialLimit</Arg><Arg>1</Arg></Call>
                 </New>
               </Set>
             </New>
           </Arg>
      </New>
    2. Change the database host, port, SID, Oracle Stream Analytics schema user name and password fields marked in bold in the code in step 6a.

Configuring the Default User

osaadmin user is predefined user with administrative privileges in Oracle Stream Analytics. You cannot delete the default user.

The installation directory has two scripts: <installRoot>/osa-base/bin/start-osa.sh and <installRoot>/osa-base/bin/configure.sh. The first script invokes configure.sh and then starts the Jetty server. If you do not need to start the server, but only need to configure the default user, then run the configure.sh script. The list of available parameters for both the scripts is given below:

  • help - show help content

  • dbroot - data base root user, or any user who has previligies to create db schema, db user

  • dbroot_password - password of the dbroot user

  • osaadmin_password - password of the predefined admin user: osaadmin

You do not need to specify osaadmin_password while creating a new schema. The script automatically detects that the osaadmin user is not created and prompts for osaadmin_password.

While installing Oracle Stream Analytics, configure the osaadmin user with an appropriate password by specifying a value for the osaadmin_password parameter. You can change the password later using the Oracle Stream Analytics application user interface.

Upgrading Oracle Stream Analytics

Only Oracle user-managed services This topic applies only to Oracle user-managed services.

If you have an existing Oracle Stream Analytics 18.1.0.0.0 installation, use the following steps to upgrade to Oracle Stream Analytics 18.1.0.0.1:

Metadata Upgrade

Use these steps if there is no additional configuration apart from the data source configuration and environment variables:

  1. Backup the existing Oracle Stream Analytics 18.1.0.0.0 metadata database, for example, use Oracle Database Backup tool.
  2. Stop Oracle Stream Analytics 18.1.0.0.0.
  3. Unzip Oracle Stream Analytics 18.1.0.0.1 installer.
  4. Copy the data source configuration from existing installation to the new installation:
    cp OSA-18.1.0.0.0/osa-base/etc/jetty-osa-datasource.xml OSA-18.1.0.0.1/osa-base/etc/jetty-osa-datasource.xml
  5. Copy the environment variable osa-env.sh from existing installation to the new installation:
    cp OSA-18.1.0.0.0/osa-base/etc/osa-env.sh OSA-18.1.0.0.1/osa-base/etc/osa-env.sh

Upgrade Using the Existing Jetty Configurations

Use these steps if you want to upgrade using the existing Jetty configurations:

  1. Backup the existing Oracle Stream Analytics 18.1.0.0.0 metadata database, for example, use Oracle Database Backup tool.
  2. Stop Oracle Stream Analytics 18.1.0.0.0.
  3. Unzip Oracle Stream Analytics 18.1.0.0.1 installer.
  4. Use the following set of commands:
    #!/bin/bash
    OSA_V18.1.0.0.0=<refers to the existing installation that you would like to update>
    OSA_V18.1.0.0.1=<refers to the unzipped OSA 18.1.0.0.1 installer>
     
    cp ${OSA_V18.1.0.0.1}/osa-base/bin/osa.installer.jar ${OSA_V18.1.0.0.0}/osa-base/bin/osa.installer.jar
    cp ${OSA_V18.1.0.0.1}/osa-base/extensibility-api/osa.spark-cql.extensibility.api.jar ${OSA_V18.1.0.0.0}/osa-base/extensibility-api/osa.spark-cql.extensibility.api.jar
    cp ${OSA_V18.1.0.0.1}/osa-base/lib/ext/osa.web.jetty-session.jar ${OSA_V18.1.0.0.0}/osa-base/lib/ext/osa.web.jetty-session.jar
     
    cp ${OSA_V18.1.0.0.1}/osa-base/resources/libs/wlthint3client.jar ${OSA_V18.1.0.0.0}/osa-base/resources/libs/wlthint3client.jar
    cp ${OSA_V18.1.0.0.1}/osa-base/resources/libs/spark-archive.jar ${OSA_V18.1.0.0.0}/osa-base/resources/libs/ #spark-acrhive.jar is a new file added in Oracle Stream Analytics 18.1.0.0.1 installer
    
    #comment below line if you want to keep existing logging configuration
    cp ${OSA_V18.1.0.0.1}/osa-base/resources/log4j2.xml ${OSA_V18.1.0.0.0}/osa-base/resources/log4j2.xml
    
    cp ${OSA_V18.1.0.0.1}/osa-base/resources/modules/spark-osa.jar ${OSA_V18.1.0.0.0}/osa-base/resources/modules/spark-osa.jar
    cp ${OSA_V18.1.0.0.1}/osa-base/sql/*.sql ${OSA_V18.1.0.0.0}/osa-base/sql/
     
    rm -f ${OSA_V18.1.0.0.0}/osa-base/start.d/logging-log4j2.ini
     
    cp ${OSA_V18.1.0.0.1}/osa-base/webapps/osa.web.*.war ${OSA_V18.1.0.0.0}/osa-base/webapps/
    cp ${OSA_V18.1.0.0.1}/osa-base/webapps/osa.web.admin.xml ${OSA_V18.1.0.0.0}/osa-base/webapps/
    #osa.web.admin.xml is a new file added in Oracle Stream Analytics 18.1.0.0.1 installer
    
    cp ${OSA_V18.1.0.0.1}/osa-base/version.txt ${OSA_V18.1.0.0.0}/osa-base/version.txt