Setting Up the Databases for Clustering
The following databases are needed when clustering WSO2 IoT Server.
Database Name | Description | Database Script Location |
---|---|---|
APIM Database (WSO2AM_DB) | This database stores data related to JAX-RS APIs and OAuth token data. | <IOTS_HOME>/dbscripts/apimgt/ |
App management database | This database store the mobile and IoT device application details. | <IOTS_HOME>/dbscripts/appmgt |
CDM core database (DM_DS) | This database stores generic data about devices (such as a unique identifier, device type, ownership type), device enrollment information, device operations, policy management related data, etc. | <IOTS_HOME>/dbscripts/cdm/ |
Certificate management database | This database stores the mutual SSL certificate details. | <IOTS_HOME>/dbscripts/certmgt |
Registry database (REG_DB) | This database acts as the registry database and stores governance and config registry data. The registry database must be mounted to all nodes in the cluster. | <IOTS_HOME>/dbscripts Example: The mysql.sql script to create the database for MySQL. |
Social database (WSO2_SOCIAL_DB) | The database used by the WSO2 App Manager Store to gather the likes, comments, and rating of an application. | <IOTS_HOME>/dbscripts/social |
Storage database | The database is used by the WSO2 App Manager to store web application data, such as URI templates, subscriptions, and more. | <IOTS_HOME>/dbscripts/storage |
User manager database (UM_DB) | This database stores the user details and user permission related details. | <IOTS_HOME>/dbscripts
Example: The script to create the database for MySQL. |
The following databases are related to plugins. These enable you to keep the data that is essential for these devices to work (such as APNS related keys) and this data is not available in the CDM core database.
Database Name | Description | Database Script Location |
---|---|---|
iOS database (MobileIOSDM_DS) | Stores the iOS related the data. If you have not configured WSO2 IoT Server for iOS, you won't have the database scripts in the given location. For more information on configuring WSO2 IoT Server for iOS, see iOS Configurations. | <IOTS_HOME>/dbscripts/cdm/plugins/ios |
Android database (MobileAndroidDM_DS) | Stores the Android related data. | <IOTS_HOME>/dbscripts/cdm/plugins/android |
Windows database (MobileWindowsDM_DS) | Stores the Microsoft Windows related data. | <IOTS_HOME>/dbscripts/cdm/plugins/windows |
To change the datasource configurations, please change the following files.
NOTE: Make sure to add the relevant JDBC library to the <IOTS_HOME>/lib
 directory. For example, add the mysql-connector-java-{version}.jar
 file to the <IOTS_HOME>/lib
 directory when using the MySQL database.
Files to change | Datasource |
---|---|
<IOTS_HOME>/repository/conf | This file must include the datasource configuration for the following databases.
|
<IOTS_HOME>/repository/conf | This file must include the datasource configuration for the CDM core database. |
<IOTS_HOME>/repository/conf | This file must include the datasource configuration for the Android plugin database. |
<IOTS_HOME>/repository/conf | This file must include the datasource configuration for the iOS plugin database. |
<PRODUCT_HOME>/repository/conf | This file must include the datasource configuration for the Windows Plugin database. |
What's next?
Next, let's mount the registry.