Automated deployment of DSS datasource configurati

2019-08-05 14:45发布

问题:

We have a "mavenized" project with several containers (wso2esb, wso2dss, tomcat) and many components to deploy to them.

We are trying to find a way to deploy the datasource configuration for all our DSS services but I notice it is stored in its own DB (H2).

Do you know if there is any way to declare something like a XML file in order to create the datasource in the DSS in an automated way?

I tried to see the documentation but did not find anything useful for automatic deployment (meaning without using the admin pages).

回答1:

Yeah, you can use the Carbon data source configuration file datasources.properties, to provide this information. This file should be located at $SERVER_ROOT/repository/conf.

A sample for this configuration file can be found in BPS sources.

After the data sources are defined using this, you can use them using the data source type "carbon data source" from data services.



回答2:

You can easily deploy artifacts with the hot deployment functionality in WSO2 Servers by simply copying them to a specific directory in the server. For Data Services Server you can copy the dbs files (in your case with the help of Maven) to $WSO2DSS_HOME/repository/deployment/server/dataservices dirctory. Similarly for BPELs its $WSO2BPS_HOME/repository/deployment/server/bpel

For CAR files created with carbon studio, its $WSO2CARBON_HOME/repository/deployment/server/carbonapps. For ESB configs, its $WSO2ESB_HOME/repository/deployment/server/synapse-configs.