As the off line chat with Danesh we can configure datasources in deployment.yaml itself.
This effort has done in PR [1] yet to be merged. Sample deployment.yaml could be found in [2]. [1] https://github.com/wso2/carbon-datasources/pull/33 [2] https://github.com/daneshk/carbon-datasources/blob/945462c838e17cd1db66589be6c2f4e73b41117d/sample/spi-sample/src/main/resources/conf/deployment.yaml Thanks & Regards, Ishara Cooray Senior Software Engineer Mobile : +9477 262 9512 WSO2, Inc. | http://wso2.com/ Lean . Enterprise . Middleware On Tue, Apr 4, 2017 at 4:02 PM, Uvindra Dias Jayasinha <uvin...@wso2.com> wrote: > C5 uses HikariCP[1] in the carbon-datasources[2] implementation which is > dependent on a separate *-datasources.xml file to read configurations. > > The problem Ishara has highlighted is the need for having separate > databases per a tenant. Due to this we cannot hard code the database name > in the datasources.xml. So a docker container needs be able to read > information such as the database name, user name, password via environment > variables and use these to update the datasources.xml before the product is > started. > > Is there an alternative to the above approach? > > > [1]https://github.com/brettwooldridge/HikariCP > [2]https://github.com/wso2/carbon-datasources > > On 4 April 2017 at 12:42, Ishara Cooray <isha...@wso2.com> wrote: > >> Hi, >> >> In the current architecture, we use master-datasources.xml to configure >> data sources. >> >> But, with C5 effort we will need to dynamically load data source name to >> support multi tenancy. Since each tenant will have it's own data source. >> >> How are we going to support this? >> Can we configure the data source in deployment.yaml to read data source >> name from an environment variable? >> >> >> Thanks & Regards, >> Ishara Cooray >> Senior Software Engineer >> Mobile : +9477 262 9512 <+94%2077%20262%209512> >> WSO2, Inc. | http://wso2.com/ >> Lean . Enterprise . Middleware >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Regards, > Uvindra > > Mobile: 777733962 >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev