how to set up Data Services Server cluster

281 views Asked by At

Is there a detailed tutorials about how to set up Data Services Server cluster.

I followed the guide http://docs.wso2.org/pages/viewpage.action?pageId=29918203, but it is not specifically for DSS.

And I also have some problems about this guide.

  1. In section "Setting up the database", how many database should we need to create? carbondb, wso2conum_db or wso2conreg_db? I have only found the process of creating wso2conum_db or wso2conreg_db, but not found the process of creating carbondb.
  2. Shall I need to configure a user management database, a shared registry database and a central database in "ESB_MGR_HOME/repository/conf/datasoruces/master-datasources.xml"?
1

There are 1 answers

2
poohdedoo On

Clustering data services is similar to clustering Application server http://docs.wso2.org/display/CLUSTER420/Clustering+Application+Server

For database configuration

You only need two databases.

1) wso2conreg_db - which stores the registry data (you can give any name you prefer)

2) wso2conum_db - which stores user management related data.(you can give any name you prefer)

These data sources needs to be defined in master-datasources.xml according to your database credentials as shown below.

Mounting the Registry to ESB nodes (master-datasources.xml)

<datasource>
 <name>WSO2_REG_DB</name>
 <description>The datasource used for registry</description>
 <jndiConfig>
    <name>jdbc/WSO2_REG_DB</name>
 </jndiConfig>
 <definition type="RDBMS">
  <configuration>
    <url>jdbc:mysql://localhost:3306/wso2conreg_db</url>
    <username>root</username>
    <password>root</password>
    <driverClassName>com.mysql.jdbc.Driver</driverClassName>
    <maxActive>50</maxActive>
    <maxWait>60000</maxWait>
    <testOnBorrow>true</testOnBorrow>
    <validationQuery>SELECT 1</validationQuery>
    <validationInterval>30000</validationInterval>
  </configuration>
 </definition>
</datasource>

Configure the user management database master-datasources.xml

<datasource>
 <name>WSO2_UM_DB</name>
 <description>The datasource used for registry and user manager</description>
 <jndiConfig>
  <name>jdbc/WSO2UmDB</name>
 </jndiConfig>
 <definition type="RDBMS">
 <configuration>
  <url>jdbc:mysql://localhost:3306/wso2conum_db</url>
  <username>root</username>
  <password>root</password>
  <driverClassName>com.mysql.jdbc.Driver</driverClassName>
  <maxActive>50</maxActive>
  <maxWait>60000</maxWait>
  <testOnBorrow>true</testOnBorrow>
  <validationQuery>SELECT 1</validationQuery>
  <validationInterval>30000</validationInterval>
 </configuration>
</definition>
</datasource>

Mounting the Registry to ESB nodes - registry.xml

<dbConfig name="remote_registry">
    <dataSource>jdbc/WSO2_REG_DB</dataSource>
  </dbConfig>

<remoteInstance url="https://localhost:9445/registry">
    <id>instanceid</id>
    <dbConfig>remote_registry</dbConfig>
    <readOnly>false</readOnly>
    <enableCache>true</enableCache>
    <registryRoot>/</registryRoot>
    </remoteInstance>

    <mount path="/_system/config" overwrite="true">
    <instanceId>instanceid</instanceId>
    <targetPath>/_system/esbnodes</targetPath>
    </mount>
    <mount path="/_system/governance" overwrite="true">
    <instanceId>instanceid</instanceId>
    <targetPath>/_system/governance</targetPath>
    </mount>

Specify the userstore in user-mgt.xml

<Property name=”dataSource”>jdbc/WSO2UmDB</Property>