Is it advised to use different database for identity,shared,bps,consent & metric db in wsois 5.9.0?

北城余情 提交于 2020-01-24 22:06:43

问题


Is it advised to use different database for identity,shared,bps,consent & metric db in wsois 5.9.0? how to configure consent and metric db?

I am trying this configuration:

[user_store]
type = "database"
TenantManager="org.wso2.carbon.user.core.tenant.JDBCTenantManager"
ReadOnly=false
ReadGroups=true
WriteGroups=true
scim_enabled = true                                                             #enabling scim apis

[database.user]
url = "jdbc:mysql://localhost:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"
driver = "com.mysql.jdbc.Driver"

[realm_manager]
data_source = "WSO2USER_DB"

[database.identity_db]
type = "mysql"
url= "jdbc:mysql://127.0.0.1:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"

[database.shared_db]
type = "mysql"
url= "jdbc:mysql://127.0.0.1:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"

[bps_database.config]
url = "jdbc:mysql://localhost:3306/bepl_db?useSSL=false"
username = "regadmin"
password = "regadmin"
driver = "com.mysql.jdbc.Driver"

[[datasource]]
id="WSO2CONSENT_DB"
url = "jdbc:mysql://localhost:3306/bepl_db?useSSL=false"
username = "regadmin"
password = "regadmin"
driver = "com.mysql.jdbc.Driver"
jmx_enable=false

[carbon_health_check]
enable= true

[keystore.primary]
name = "wso2carbon.jks"
password = "wso2carbon"

What is the correct dbscripts import order and whether they can be in different databases?


回答1:


By default Identity server comes with an embedded H2 database. But WSO2 recommends changing this to any production level database. By refering to your configuration i can see that you are trying to change it to a mysql database.

You are using a database called regdb for identity and shared database. and for consent management and bps database you are using a different database called bepl_db.

Hence you will have to execute the following DB scrips as per the documentation for regdb.

     - <IS-HOME>/dbscripts/identity/mysql.sql
     - <IS-HOME>/dbscripts/identity/uma/mysql.sql
     - <IS-HOME>/dbscripts/mysql.sql

you will have to execute the following DB scrips as per the documentation for bepl_db.

    - <IS-HOME>/dbscripts/consent/mysql.sql
    - <IS-HOME>/dbscripts/bps/bpel/create/mysql.sql

Please note that if you do not have a clustered enviroment you also have the option of storing the consent data in IDENTITY_DB

If so you can execute the

    - <IS-HOME>/dbscripts/consent/mysql.sql 

script against the regdb not against the bepl_db. and remove the below config from deployment.toml

    [[datasource]]
    id="WSO2CONSENT_DB"
    url = "jdbc:mysql://localhost:3306/bepl_db?useSSL=false"
    username = "regadmin"
    password = "regadmin"
    driver = "com.mysql.jdbc.Driver"
    jmx_enable=false

Also, you only need to refer this documentation if you have a requirement of using the workflow feature.
https://is.docs.wso2.com/en/5.9.0/setup/changing-datasource-bpsds/

And you only need to refer this documentation if you have a clustered setup https://is.docs.wso2.com/en/5.9.0/setup/changing-datasource-consent-management/

Otherwise only follow https://is.docs.wso2.com/en/5.9.0/setup/changing-to-mysql/ documentation and that will be perfectly enough.

Also, metric db is deprecating since 5.9 hence do not worry about pointing its data to a different database.



来源:https://stackoverflow.com/questions/59207493/is-it-advised-to-use-different-database-for-identity-shared-bps-consent-metric

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!