Hi Anuruddha, Thanks for elaborating the new design! The image link seems to be broken. Please re-attach.
One aspect I couldn't understand is the use of "DEFAULTS" and "PARAMS" sections in the configs.ini file. Is there a significance in separating the default values from any additional ones being applied? The way I see it, only PARAMS can fulfill the task with a set of key-values already in place as the defaults. Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Fri, May 8, 2015 at 9:49 AM, Anuruddha Liyanarachchi <anurudd...@wso2.com > wrote: > Hi Devs, > > Please find the new architecture of Configurator. > > > > *Templates-* Contains templates for each wso2 product and configs.ini in > the below structure. > > templates > └── AppServer > ├── conf > │ ├── axis2 > │ │ └── axis2.jinja > │ ├── carbon.jinja > │ └── tomcat > │ └── catalina-server.jinja > └── configs.ini > > *configs.ini *:- This file contains 3 sections. > [SETTINGS] - Configurator specific settings > [DEFAULTS] - Default values of place holders > [PARAMS] - Key value pairs for changing parameters > > Following is a sample config.ini file. > > > Configurator will generate the xml based on values and settings provided > in config.ini. These xml files will be then copied to the pack in the given > folder structure. > > Configurator is capable of reading configs from config.ini or environment > variables based on settings. > If a value is not set configurator will use values defined in the > "DEFAULTS" section of the config.ini file. > > > > > > > On Wed, May 6, 2015 at 11:22 AM, Anuruddha Liyanarachchi < > anurudd...@wso2.com> wrote: > >> Hi Imesh, >> >> I have now pushed my changes to [1]. >> >> Did we had a discussion on selecting Jinja as a template engine for this? >>> I would like to see a review of Jinja compared to other python based >>> template engines and reasons for selecting it. >> >> >> Following are the technologies available similar to jinja >> <http://jinja.pocoo.org/>. >> >> Mako <http://www.makotemplates.org/> >> Genshi <http://genshi.edgewall.org/> >> Django <https://www.djangoproject.com/> >> >> According to the Jinja website benchmarks from the testsuite show that >> Jinja2 has a similar performance to Mako and is between 10 and 20 times >> faster than Django’s template engine or Genshi[2]. >> Further more the [3] contains detailed comparison with real values. >> >> [1] >> https://github.com/anuruddhal/product-private-paas/tree/master/Configurator >> [2]http://jinja.pocoo.org/docs/dev/faq/ >> [3] >> http://blog.sendwithus.com/python-templating-performance-showdown-django-vs-jinja/ >> >> >> >> On Wed, May 6, 2015 at 10:05 AM, Imesh Gunaratne <im...@wso2.com> wrote: >> >>> Good work Anuruddha! I guess you are working on a PPaaS fork. Please >>> commit your changes to your personal git repository and arrange a code >>> review so that we can review the implementation design at early stages. >>> Once you are done with the initial implementation please send a PR. >>> >>> Did we had a discussion on selecting Jinja as a template engine for >>> this? I would like to see a review of Jinja compared to other python based >>> template engines and reasons for selecting it. >>> >>> I would recommend not to refer Puppet when designing the Configurator. >>> It would be better think out of the box and design according to the need we >>> have here in Carbon cartridges. Configurator would be similar to Stratos >>> cartridge agent and might need to use the same python base plugin >>> architecture we used in PCA. >>> >>> Thanks >>> >>> On Tue, May 5, 2015 at 7:38 PM, Rajkumar Rajaratnam <rajkum...@wso2.com> >>> wrote: >>> >>>> >>>> >>>> On Tue, May 5, 2015 at 7:15 PM, Anuruddha Liyanarachchi < >>>> anurudd...@wso2.com> wrote: >>>> >>>>> Hi Raj, >>>>> >>>>> I hope this is similar to puppet, where we keep some default carbon >>>>>> sever configuration template files and change parameters using tags, etc. >>>>>> Please confirm it. >>>>> >>>>> >>>>> Configurator changes the parameters in default carbon server >>>>> configurations files by reading parameters from a file. >>>>> This is similar to puppet. >>>>> >>>>> I would like to see the format of the file from which Configurator >>>>>> reads the configurations. Can you please paste that here? >>>>> >>>>> Please find the sample configurations file below. >>>>> >>>>> [DEFAULTS] >>>>> clustering=true >>>>> members={"mgt.as.wso2.com": 4100,"as.wso2.com": 4300} >>>>> localMemberHost= 127.0.1.1 >>>>> localMemberPort= 4100 >>>>> subDomain= mgt >>>>> stratos_instance_data_worker_host_name= as.wso2.com >>>>> stratos_instance_data_mgt_host_name= mgt.as.wso2.com >>>>> portOffset=1 >>>>> http_proxy_port=80 >>>>> https_proxy_port=443 >>>>> >>>>> >>>> We should have something similar node definition in puppet right? >>>> Otherwise, this configuration will get applied to all nodes, regardless of >>>> whether they are AS, ESB etc? Or is there any other way to handle it? >>>> >>>> Thanks. >>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Tue, May 5, 2015 at 7:09 PM, Reka Thirunavukkarasu <r...@wso2.com> >>>>> wrote: >>>>> >>>>>> Hi Anuriddha, >>>>>> >>>>>> Good work in getting the Configurator also with template model. As >>>>>> you have mentioned, now we can process only few files. If we are to add >>>>>> new >>>>>> files, just writing *.jinja file is enough or do we need to configure >>>>>> something about this file somewhere like in puppet we mentioned in the >>>>>> manifests? >>>>>> >>>>>> Thanks, >>>>>> Reka >>>>>> >>>>>> On Tue, May 5, 2015 at 5:43 PM, Anuruddha Liyanarachchi < >>>>>> anurudd...@wso2.com> wrote: >>>>>> >>>>>>> Hi Devs, >>>>>>> >>>>>>> I have created the $subject using python and Jinja2. Configurator is >>>>>>> now capable of generating axis2.xml, Carbon.xml and catalina-server.xml >>>>>>> based on clustering configurations. Following structure was used to >>>>>>> create >>>>>>> the configurator. Currently these configurations are read from a file. >>>>>>> >>>>>>> I will update the thread as I move on. >>>>>>> . >>>>>>> ├── Configurator.iml >>>>>>> ├── Constants.py >>>>>>> ├── Constants.pyc >>>>>>> ├── Main.py >>>>>>> ├── Output >>>>>>> | ├── axis2.xml >>>>>>> | ├── carbon.xml >>>>>>> | └── catalina-server.xml >>>>>>> └── Templates >>>>>>> └── AppServer >>>>>>> └── conf >>>>>>> ├── axis2.jinja >>>>>>> ├── carbon.jinja >>>>>>> └── catalina-server.jinja >>>>>>> >>>>>>> >>>>>>> On Thu, Apr 30, 2015 at 12:05 PM, Anuruddha Liyanarachchi < >>>>>>> anurudd...@wso2.com> wrote: >>>>>>> >>>>>>>> Hi , >>>>>>>> >>>>>>>> I am working on $subject. I am trying create a shell script which >>>>>>>> generate carbon server configuration based on parameters provided by >>>>>>>> different run times. >>>>>>>> >>>>>>>> Configurator is basically configuring perviously used puppet >>>>>>>> templates using shell. >>>>>>>> Please refer mail thread subject as "[PPaaS] Private PaaS 4.1.0 >>>>>>>> Release Plan" for more info. >>>>>>>> >>>>>>>> I will provide more information as I progress. >>>>>>>> >>>>>>>> -- >>>>>>>> *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 >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *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 >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Dev mailing list >>>>>>> Dev@wso2.org >>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Reka Thirunavukkarasu >>>>>> Senior Software Engineer, >>>>>> WSO2, Inc.:http://wso2.com, >>>>>> Mobile: +94776442007 >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Rajkumar Rajaratnam >>>> Committer & PMC Member, Apache Stratos >>>> Software Engineer, WSO2 >>>> >>>> Mobile : +94777568639 >>>> Blog : rajkumarr.com >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *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 >>> >>> >> >> >> -- >> *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 >> > > > > -- > *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 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev