0
votes

As a POC (proof of concept), I'm trying to setup "WSO2 API Manager + Analytics" in an "all-in-one" way on a single node. It should be production-ready for a small scale, so I'm trying to replace H2 databases with MySQL databases.

So far, following the documentation, I've created these databases :

For WSO2 API Manager :

| wso2_apimgtdb                  | wso2am-2.0.0/dbscripts/apimgt/mysql5.7.sql
| wso2_mbstoredb                 | wso2am-2.0.0/dbscripts/mb-store/mysql-mb.sql
| wso2_metricsdb                 | wso2am-2.0.0/dbscripts/metrics/mysql.sql
| wso2_regdb                     | wso2am-2.0.0/dbscripts/mysql5.7.sql
| wso2_statsdb                   | (tables are build dynamically in this db)

For WSO2 API Manager Analytics :

| wso2_anal_eventstoredb         | (tables are build dynamically in this db)
| wso2_anal_processeddatastoredb | (tables are build dynamically in this db)

From that point, I've configured datasources in WSO2AM to point to these db :

<name>WSO2_CARBON_DB</name>     --> wso2_regdb
<name>WSO2AM_DB</name>          --> wso2_apimgtdb
<name>WSO2AM_STATS_DB</name>    --> wso2_statsdb
<name>WSO2_MB_STORE_DB</name>   --> wso2_mbstoredb

<name>WSO2_METRICS_DB</name>    --> wso2_metricsdb

Now, the question is : which db should be mutualized with Analytics and which db has to be created once for API Manager and once for Analytics ?

Here are the datasources to be configured in wso2am-analytics/repository/conf/datasources/ :

analytics-datasources.xml :     <name>WSO2_ANALYTICS_EVENT_STORE_DB</name>
analytics-datasources.xml :     <name>WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB</name>

master-datasources.xml :        <name>WSO2_CARBON_DB</name>
metrics-datasources.xml :       <name>WSO2_METRICS_DB</name>

stats-datasources.xml:          <name>WSO2AM_STATS_DB</name>

As stated above, I've created empty databases corresponding to WSO2_ANALYTICS_EVENT_STORE_DB and WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB, but I don't know what to do with WSO2_CARBON_DB, WSO2_METRICS_DB and WSO2AM_STATS_DB. Should I point to existing databases or create new ones ?

1

1 Answers

0
votes

You can have separate databases for WSO2_CARBON_DB and WSO2_METRICS_DB. But WSO2AM_STATS_DB must be shared.