On Mon, Apr 11, 2016 at 12:47 PM, Gayan Gunarathne <[email protected]> wrote: > > > I think we can make this with with Defined Types[1][2] without creating > duplicate set of YAML files for each platform. We can do the same as the > example given in the document. > > Thanks Gayan! It is not very clear how defined types can be used for solving this. AFAIU a defined type is a function in puppet, the problem we have here is related to the Hiera hierarchy. More specifically how to restructure the data structure in Hiera by introducing a factor variable to handle platforms.
On Mon, Apr 11, 2016 at 1:07 PM, Isuru Haththotuwa <[email protected]> wrote: > > I do not think we need to duplicate the yaml files here. Sorry that the > sample in the first reply sent by me implied so. What we can do is refactor > out the hiera data so that data which is changing according to the platform > (ex.: clustering section) can be moved to a different yaml file(s). For an > example, clustering for kubernetes scenario can be included in > *puppet-modules/hieradata/dev/wso2/kubernetes/clustering.yaml*. Here, > 'kubernetes' is the value of the facter which is used to identify the > environment. Similarly, other such data can be refactored out. > A good suggestion Isuru! May be we can try this out and later refine as needed. Thanks > [1]https://docs.puppet.com/puppet/latest/reference/lang_defined_types.html > [2]http://puppetlunch.com/puppet/hiera.html > > >> >>>>> Thanks >>>>> >>>>>> >>>>>> Thanks, >>>>>> Gayan >>>>>> >>>>>> >>>>>> On Sat, Apr 9, 2016 at 8:28 AM, Imesh Gunaratne <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> On Fri, Apr 8, 2016 at 7:48 PM, Isuru Haththotuwa <[email protected]> >>>>>>> wrote: >>>>>>>> >>>>>>>> >>>>>>>> hieradata >>>>>>>> |--- dev >>>>>>>> |--- wso2 >>>>>>>> |---- <product_name> >>>>>>>> |--- <product_version> >>>>>>>> |-- *vm* >>>>>>>> |-- >>>>>>>> default.yaml >>>>>>>> |-- >>>>>>>> manager.yaml >>>>>>>> |-- >>>>>>>> worker.yaml >>>>>>>> |--* docker* >>>>>>>> |-- >>>>>>>> default.yaml >>>>>>>> |-- >>>>>>>> manager.yaml >>>>>>>> |-- >>>>>>>> worker.yaml >>>>>>>> |-- >>>>>>>> *kubernetes* >>>>>>>> |-- >>>>>>>> default.yaml >>>>>>>> |-- >>>>>>>> manager.yaml >>>>>>>> |-- >>>>>>>> worker.yaml >>>>>>>> >>>>>>>> >>>>>>> +1 for the suggestion Isuru, will proceed with this. We can add >>>>>>> other platforms such as OpenShift, Mesos, Cloud Foundry on the same >>>>>>> level. >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Imesh Gunaratne* >>>>>>>>> Senior Technical Lead >>>>>>>>> WSO2 Inc: http://wso2.com >>>>>>>>> T: +94 11 214 5345 M: +94 77 374 2057 >>>>>>>>> W: http://imesh.io >>>>>>>>> Lean . Enterprise . Middleware >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks and Regards, >>>>>>>> >>>>>>>> Isuru H. >>>>>>>> +94 716 358 048* <http://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.io >>>>>>> Lean . Enterprise . Middleware >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Dev mailing list >>>>>>> [email protected] >>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Gayan Gunarathne >>>>>> Technical Lead, WSO2 Inc. (http://wso2.com) >>>>>> Committer & PMC Member, Apache Stratos >>>>>> email : [email protected] | mobile : +94 775030545 <%2B94%20766819985> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Dev mailing list >>>>>> [email protected] >>>>>> 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.io >>>>> Lean . Enterprise . Middleware >>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> 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.io >>> Lean . Enterprise . Middleware >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Lakmal Warusawithana >> Director - Cloud Architecture; WSO2 Inc. >> Mobile : +94714289692 >> Blog : http://lakmalsview.blogspot.com/ >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > > Gayan Gunarathne > Technical Lead, WSO2 Inc. (http://wso2.com) > Committer & PMC Member, Apache Stratos > email : [email protected] | mobile : +94 775030545 <%2B94%20766819985> > > > > _______________________________________________ > Dev mailing list > [email protected] > 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.io Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
