As Ishara mentioned, In C5 we are using deployment.yaml to configure all the datasources. There is no default values coming with the bean class. If a product needs datasources, those datasource configuration needs to specify in the deployment.yaml. We can refer environment variables in datasource configuration. we need to set the value like,
name:${env:<environment_variable>} This is still in the PR stage with kernel 5.2.0-M3. Thanks Danesh On Tue, Apr 4, 2017 at 4:13 PM, Ishara Cooray <isha...@wso2.com> wrote: > + Nuwan, Lakmal > > Thanks & Regards, > Ishara Cooray > Senior Software Engineer > Mobile : +9477 262 9512 <+94%2077%20262%209512> > WSO2, Inc. | http://wso2.com/ > Lean . Enterprise . Middleware > > On Tue, Apr 4, 2017 at 4:11 PM, Ishara Cooray <isha...@wso2.com> wrote: > >> 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/945462c83 >> 8e17cd1db66589be6c2f4e73b41117d/sample/spi-sample/src/main/ >> resources/conf/deployment.yaml >> >> >> >> Thanks & Regards, >> Ishara Cooray >> Senior Software Engineer >> Mobile : +9477 262 9512 <+94%2077%20262%209512> >> 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 >>> >> >> > -- *Danesh Kuruppu* Senior Software Engineer | WSO2 Email: dan...@wso2.com Mobile: +94 (77) 1690552 Web: WSO2 Inc <https://wso2.com/signature>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev