Great! Thanks Anuruddha! I have now merged this pull request to master branch.
On Thu, Jul 2, 2015 at 10:13 AM, Anuruddha Liyanarachchi < anurudd...@wso2.com> wrote: > Hi, > > I have now changed the configurator to scan the template module and > validate this with environment variables when read from environment is true. > > Also changed the dictionary define syntax from double quote to square > brackets. > Please review and merge PR [1]. > > [1]https://github.com/wso2/product-private-paas/pull/95 > > Regards, > > On Thu, Jun 25, 2015 at 6:26 PM, Gayan Gunarathne <gay...@wso2.com> wrote: > >> IMO also we need to scan the template module and validate this with >> environment variables. Otherwise we can't make sure we have values for all >> the configurations required. >> >> Thanks, >> Gayan >> >> On Thu, Jun 25, 2015 at 4:54 PM, Imesh Gunaratne <im...@wso2.com> wrote: >> >>> I'm -1 for option 1. This would restrict the Template Module developers >>> on specifying variable names and they may also not know there is a such >>> restriction exist. >>> >>> May be we need to scan the template module and find the list of variable >>> names. This would also allow us to validate whether the module.ini has >>> defined all the parameters. >>> >>> Thanks >>> >>> On Thu, Jun 25, 2015 at 2:39 PM, Anuruddha Liyanarachchi < >>> anurudd...@wso2.com> wrote: >>> >>>> Hi Lahiru, >>>> >>>> I think 1st option will be more suitable as we have some logic in side >>>> the templates to check variables are set. >>>> >>>> Regards, >>>> Anuruddha >>>> >>>> On Thu, Jun 25, 2015 at 1:56 PM, Lahiru Sandaruwan <lahi...@wso2.com> >>>> wrote: >>>> >>>>> Hi Anuruddha, >>>>> >>>>> I see two options to do this, >>>>> >>>>> 1. Mandate to the parameters to be started with CONFIG_PARAMS and >>>>> pick those from environment variables, as we discussed offline >>>>> 2. Scan through the templates and get placeholders to search >>>>> environment variables >>>>> >>>>> Wdyt? >>>>> >>>>> Thanks. >>>>> >>>>> On Thu, Jun 25, 2015 at 10:09 AM, Imesh Gunaratne <im...@wso2.com> >>>>> wrote: >>>>> >>>>>> I see a problem with the existing logic. >>>>>> >>>>>> IMO configurator should give priority to the environment variables if >>>>>> that option is enabled. Requiring to comment variables in module.ini is >>>>>> an >>>>>> overhead. >>>>>> >>>>>> Thanks >>>>>> >>>>>> >>>>>> On Thursday, June 25, 2015, Anuruddha Liyanarachchi < >>>>>> anurudd...@wso2.com> wrote: >>>>>> >>>>>>> Hi Lahiru, >>>>>>> >>>>>>> If we do that we will always have to set all the parameters. >>>>>>> >>>>>>> On Thu, Jun 25, 2015 at 8:23 AM, Lahiru Sandaruwan <lahi...@wso2.com >>>>>>> > wrote: >>>>>>> >>>>>>>> Ah.. I see, Thanks. >>>>>>>> >>>>>>>> Shall we make it read those values even if those values are >>>>>>>> commented in module.ini? >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> On Thu, Jun 25, 2015 at 8:14 AM, Anuruddha Liyanarachchi < >>>>>>>> anurudd...@wso2.com> wrote: >>>>>>>> >>>>>>>>> Hi Lahiru, >>>>>>>>> >>>>>>>>> It looks like you haven't un-comment the line in module.ini. You >>>>>>>>> need to uncomment the lines relevant to the parameters you are >>>>>>>>> sending as >>>>>>>>> payload, then only configurator will read those from environment and >>>>>>>>> override the value with environment value. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> On Thu, Jun 25, 2015 at 12:25 AM, Lahiru Sandaruwan < >>>>>>>>> lahi...@wso2.com> wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> I have sent parameters that are required to configure ESB cluster >>>>>>>>>> in payload as at [1]. Payload contains all the values i sent. >>>>>>>>>> >>>>>>>>>> But the configurator only picks few, as per the log [2]. >>>>>>>>>> >>>>>>>>>> Any idea, on what i might be doing wrong? >>>>>>>>>> >>>>>>>>>> Thanks. >>>>>>>>>> >>>>>>>>>> [1] >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_CLUSTERING=true, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_REGISTRY_DB_PASSWORD=asdfs, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_WKA_MEMBERS="127.0.0.1:4000", >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_REGISTRY_DB_USER_NAME=root, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_REGISTRY_DB_URL=jdbc:mysql:// >>>>>>>>>> 172.17.8.1:3306/reg_db?autoReconnect=true, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_USER_MGT_DB_USER_NAME=root, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_DRIVER_CLASS_NAME=com.mysql.jdbc.Driver, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_PT_HTTP_PROXY_PORT=8280, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_LOCAL_MEMBER_HOST=127.0.0.1, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_PT_HTTPS_PROXY_PORT=8243, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_PORT_OFFSET=0, >>>>>>>>>> >>>>>>>>>> START_CMD=PCA, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_DOMAIN=wso2.esb.com, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_USER_MGT_DB_PASSWORD=asdf, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_MEMBERSHIP_SCHEME=wka, >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_USER_MGT_DB_URL=jdbc:mysql://172.17.8.1:3306/user_db >>>>>>>>>> , >>>>>>>>>> >>>>>>>>>> CONFIG_PARAM_LOCAL_MEMBER_PORT=4100 >>>>>>>>>> >>>>>>>>>> [2] >>>>>>>>>> 2015-06-24 18:15:43,408 __main__ INFO Context generated: >>>>>>>>>> {'CONFIG_PARAM_DOMAIN': 'wso2.esb.com', >>>>>>>>>> 'CONFIG_PARAM_LOCAL_MEMBER_PORT': '4100', >>>>>>>>>> 'CONFIG_PARAM_LOCAL_MEMBER_HOST': >>>>>>>>>> '127.0.0.1', 'CONFIG_PARAM_WKA_MEMBERS': {'127.0.0.1': '4000'}, >>>>>>>>>> 'CONFIG_PARAM_PORT_OFFSET': '0', 'CONFIG_PARAM_SUB_DOMAIN': 'worker', >>>>>>>>>> 'CONFIG_PARAM_MEMBERSHIP_SCHEME': 'wka', 'CONFIG_PARAM_CLUSTERING': >>>>>>>>>> 'true', >>>>>>>>>> 'CONFIG_PARAM_PT_HTTP_PROXY_PORT': '8280', >>>>>>>>>> 'CONFIG_PARAM_PT_HTTPS_PROXY_PORT': '8243'} >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> -- >>>>>>>>>> Lahiru Sandaruwan >>>>>>>>>> Committer and PMC member, Apache Stratos, >>>>>>>>>> Senior Software Engineer, >>>>>>>>>> WSO2 Inc., http://wso2.com >>>>>>>>>> lean.enterprise.middleware >>>>>>>>>> >>>>>>>>>> phone: +94773325954 >>>>>>>>>> email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ >>>>>>>>>> linked-in: >>>>>>>>>> http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Thanks and Regards,* >>>>>>>>> Anuruddha Lanka Liyanarachchi >>>>>>>>> Software Engineer - WSO2 >>>>>>>>> Mobile : +94 (0) 712762611 >>>>>>>>> Tel : +94 112 145 345 >>>>>>>>> anurudd...@wso2.com >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> Lahiru Sandaruwan >>>>>>>> Committer and PMC member, Apache Stratos, >>>>>>>> Senior Software Engineer, >>>>>>>> WSO2 Inc., http://wso2.com >>>>>>>> lean.enterprise.middleware >>>>>>>> >>>>>>>> phone: +94773325954 >>>>>>>> email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ >>>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Thanks and Regards,* >>>>>>> Anuruddha Lanka Liyanarachchi >>>>>>> Software Engineer - WSO2 >>>>>>> Mobile : +94 (0) 712762611 >>>>>>> Tel : +94 112 145 345 >>>>>>> anurudd...@wso2.com >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Imesh Gunaratne* >>>>>> Senior Technical Lead >>>>>> WSO2 Inc: http://wso2.com >>>>>> T: +94 11 214 5345 M: +94 77 374 2057 >>>>>> W: http://imesh.gunaratne.org >>>>>> Lean . Enterprise . Middleware >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> -- >>>>> Lahiru Sandaruwan >>>>> Committer and PMC member, Apache Stratos, >>>>> Senior Software Engineer, >>>>> WSO2 Inc., http://wso2.com >>>>> lean.enterprise.middleware >>>>> >>>>> phone: +94773325954 >>>>> email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ >>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Thanks and Regards,* >>>> Anuruddha Lanka Liyanarachchi >>>> Software Engineer - WSO2 >>>> Mobile : +94 (0) 712762611 >>>> Tel : +94 112 145 345 >>>> a <thili...@wso2.com>nurudd...@wso2.com >>>> >>> >>> >>> >>> -- >>> *Imesh Gunaratne* >>> Senior Technical Lead >>> WSO2 Inc: http://wso2.com >>> T: +94 11 214 5345 M: +94 77 374 2057 >>> W: http://imesh.gunaratne.org >>> Lean . Enterprise . Middleware >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> >> Gayan Gunarathne >> Technical Lead, WSO2 Inc. (http://wso2.com) >> Committer & PMC Member, Apache Stratos >> email : gay...@wso2.com | mobile : +94 766819985 >> >> >> > > > > -- > *Thanks and Regards,* > Anuruddha Lanka Liyanarachchi > Software Engineer - WSO2 > Mobile : +94 (0) 712762611 > Tel : +94 112 145 345 > a <thili...@wso2.com>nurudd...@wso2.com > -- *Imesh Gunaratne* Senior Technical Lead WSO2 Inc: http://wso2.com T: +94 11 214 5345 M: +94 77 374 2057 W: http://imesh.gunaratne.org Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev