Wednesday, January 28, 2015

MySQL as relational storage using WSO2 Storage Server

WSO2 Storage Server, Relational Storage Service (RSS) feature allows creating and managing the Relational Database Management System (RDBMS). By default storage server support H2 database but it can be extent. To setup MySQL as relational storage need to do following configurations

1.      Download and install MySQL using the following command:
sudo apt-get install mysql-server mysql-client
2.      Access the  MySQL shell using following command :
mysql –u root  -p
3.      create a database call test as RSS meta repository using following command :
create database test;
4.      Select the script <SS_HOME>/dbscripts /rss-manager/mysql/wso2_rss_mysql.sql and by running the script create the RSS metadata repository database structure.
5.      Edit the default datasource configuration. The master-datasources.xml file, in the <SS_HOME>/repository/conf/datasources directory. 
<datasource>
            <name>MetadataRepo</name>
            <jndiConfig>
                        <name>MetadataRepoDS</name>
            </jndiConfig>
            <definition type="RDBMS">
            <configuration>
                <dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
            <dataSourceProps>
                <property name="URL">jdbc:mysql://localhost:3306/test</property>
                <property name="user">root</property>
                <property name="password">root</property>
            </dataSourceProps>
            </configuration>
            </definition>
</datasource>
6.      To do the RSS meta data specific configurations open the rss-config.xml file stored in the <SS_HOME>/repository/conf/etc/ directory and do the following changes:
<Provider>MYSQL</Provider>
<Environments>
<Environment>
<Name>DEFAULT</Name>
<RSSInstances>
<RSSInstance>
<Name>WSO2RSS1</Name>
<InstanceType>SYSTEM</InstanceType>
<DbmsType>MYSQL</DbmsType>
<ServerCategory>LOCAL</ServerCategory>
<DataSourceConfiguration>
<Definition>
<Url>jdbc:mysql://localhost:3306</Url>
<Username>RootUser</Username>
<Password>RootPassword</Password>
<DriverClassName>com.mysql.jdbc.Driver</DriverClassName>
</Definition>
</DataSourceConfiguration>
</RSSInstance>
</RSSInstances>
</Environment>
</Environments>

Download the MySQL Java connector JAR file and add to the <SS_HOME>/repository/components/lib/ directory

Thursday, January 22, 2015

WSO2 Storage Server

WSO2 Storage Server is conveniently provides a multi-tenanted structured and unstructured data storage provisioning and managing capabilities for development purpose. The storage server provides rapid provisioning and secure access to storage system such as relational, NoSQL Columnar, and Hadoop Distributed File System (HDFS) repositories using a consistent management process. The storage server management console allows users to create database, add users and provisioning access with minimum database administration skills.

The storage server can be downloaded from http://wso2.com/products/storage-server/  or can build from the source code. The source code for carbon-storage management can be downloaded from gitHub using following link https://github.com/wso2-dev/carbon-storage-management.git and the product storage server can be downloaded from gitHub using following address https://github.com/wso2-dev/product-ss.git

To build the product
To build the storage server need to have Maven build tool and JDK1.6 /1.7 installed. When building the storage server needs to follow the order because there are dependencies on carbon- storage management for product storage server, following is the order:  
  1. Build the carbon- storage management
  2. Build the product storage server
“maven clean install” is the command used to build the product from source code. “mvn clean install -Dmaven.test.skip=true” is the command used to build the product from source code without running any of the unit tests.

Running the product
  1. Extract the downloaded zip or extract the wso2ss-SNAPSHOT.zip inside the ../product-ss/modules/distribution/target directory.
  2. Go to the bin directory in the extracted folder
  3. On Windows run  “./wso2server.bat”, on Linux/Solaris run “./wso2server.sh”
  4. Once the server started point the browser to the URL https://localhost:9443/carbon
  5. To login to the management console use “admin”, “admin” as the username and password
Relational Storage Service
The storage server allows users to create and manage Relational Database Management System (RDMS) through the Relational Store Service (RSS). By default RSS support for H2 but it is extensible RSS support for MySQL, SQL SERVER or Oracle also. RSS facilitates to
  •  Create database  
  • Create privilege templates 
  • Create database user 
  • Create RSS instances

Column storage service
By column storage service storage server facilitate users to create and manage the Cassandra cluster using through a simplified management console UI. Column storage service facilitates to: 
  • Creating Keyspaces
  • Creating Column Families   
  • Explore Cassandra Cluster 
  • Cassandra Authentication and Authorization

Hadoop Distributed File System
Hadoop Distributed File System (HDFS) facilitates users to create and manage a distributed file system with authentication and authorization.