This documentation is for WSO2 Business Activity Monitor 2.2.0. View documentation for the latest release.

Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

In this section we shall see how to standalone WSO2 BAM to work in MT mode. To run BAM in MT mode, you need to have MySQL server. This is required to use it as Hive Meta Store. Therefore please install MySQL server if you haven't installed it in your machine.

This topic includes the following sections.

  1. Setting up RSS (Relational Storage service)

  2. Setting up Hive

  3. Setting up Other BAM configurations

Setting up RSS (Relational Storage service)

RSS is required to obtain the tenant separated data storage which is required to store hive meta data. Therefore first of all we need to setup the RSS to work with MySQL server. Please follow the below steps in-order to configure the RSS.

  1. Download the RSS mysql script from here.

  2. Connect to the MySQL server form mysql client and execute the following queries.

create database rssdb;
use rssdb;
source C:\scripts\wso2_rss_mysql.sql;

    3. Go to $BAM_HOME/repository/conf/etc/rss-config.xml and edit as below

<wso2-rss> 
 <rss-type>MYSQL</rss-type> 

  <!-- RSS database used to store database servers, database
instance information, users etc.. --> 

  <rss-mgt-repository> 
      <datasource-config> 
<dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
         <dataSourceProps> 
            <property name="URL">jdbc:mysql://localhost:3306/rssdb</property>
            <property name="user">root</property>
            <property name="password">root</property>
         </dataSourceProps> 
      </datasource-config> 
  </rss-mgt-repository>

<!-- WSO2 RSS instances are predefined constant server instances
to be used by users, the other type is User Defined RSS instances, 
       which are defined by individual tenants --> 

  <system-rss-instances> 
      <system-rss-instance> 
          <name>WSO2RSS1</name> 
          <dbms-type>MYSQL</dbms-type>
          <server-category>LOCAL</server-category> 
          <admin-datasource-config> 
<dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
             <dataSourceProps>
                <property name="url">jdbc:mysql://localhost:3306</property> 
                <property name="user">root</property>
                <property name="password">root</property>
             </dataSourceProps> 
          </admin-datasource-config> 
      </system-rss-instance> 
  </system-rss-instances> 
</wso2-rss> 

Property name “user” indicates the username of the MySQL server and “password” as name implies the password of the MYSQL server. Please edit the configuration accordingly for your MySQL set-up.

 

Setting up Hive

In this section you have to point the hive meta data store URL in the hive-site.xml. Please follow the below instructions for that.

  1. Go to $BAM_HOME/repository/conf/advanced/hive-site.xml if you are using unix based machine. If you are using windows machine, please edit the hive-site-win.xml.

  2. Please edit the following properties.

<property> 
  <name>javax.jdo.option.ConnectionURL</name> 
  <value>jdbc:mysql://localhost:3306/metastore_db</value>
  <description>JDBC connect string for a JDBC metastore</description> 
</property> 

<property> 
  <name>javax.jdo.option.ConnectionDriverName</name> 
  <value>com.mysql.jdbc.Driver</value>
  <description>Driver class name for a JDBC metastore</description> 
</property>

............

<property> 
  <name>javax.jdo.option.ConnectionUserName</name> 
  <value>root</value> 
  <description>username to use against metastore database</description> 
</property> 

<property> 
  <name>javax.jdo.option.ConnectionPassword</name> 
  <value>root</value> 
  <description>password to use against metastore database</description> 
</property> 

Properties named 'javax.jdo.option.ConnectionUserName' and 'javax.jdo.option.ConnectionPassword' should be MySQL database credentials.

 

Setting up Other BAM configurations

If you are using the RSS in another server instance other than in the inbuild BAM instance or you have changed the port offset, then you have to do the following modifications to hive-rss-config.xml.

  1. Go to $BAM_HOME/repository/conf/advanced/hive-rss-confg.xml.

  2. Check and edit the following properties.

    <hive-rss-config> 
    	<rss-server-url>https://127.0.0.1:9443/</rss-server-url>
    	<rss-server-admin-userName>admin</rss-server-admin-userName>
    	<rss-server-admin-password>admin</rss-server-admin-password>
    </hive-rss-config>
    


    Here the rss-server url should be the server url of the RSS running WSO2 server. Note even if you are using the inbuilt rss within the BAM server you are using, if you have changed the port-offset of BAM server you will have to correct the rss-server-url in this config according to your port offset. [ie, if port offset is set to '1', then the rss-server-url should be https://127.0.0.1:9444/]. Rss-server-admin-userName and rss-server-admin-password are the super tenant credentials of the RSS server instance. If you are using the RSS instance in the same BAM server, then you don't need to change these as far as the super tenant user name and password hasn't been changed.

Make sure you have downloaded the MySQL driver jar and included that in $BAM_HOME/repository/components/lib directory.

If you have done all the steps mentioned above, then you have configured BAM to operate in MT mode. Now you can restart the server get all configurations loaded, and work in MT mode.


  • No labels