Hi Chamila, Thanks you for the prompt reply. Will check with Hiera and revert.
Thanks, Suhan On Fri, Nov 28, 2014 at 2:39 PM, Chamila De Alwis <[email protected]> wrote: > Hi Suhan, > > nodes.pp file can contain the generic information that are used by almost > all of the modules. However, as far as I understand, you can go for a > better pattern using Puppet's Hiera key value store[1]. Its main purpose is > to separate data from the manifests, so in your case you can store config > data per node in Hiera. > > [1] - https://docs.puppetlabs.com/hiera/1/complete_example.html > > > Regards, > Chamila de Alwis > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > > On Fri, Nov 28, 2014 at 1:41 PM, Suhan Dharmasuriya <[email protected]> > wrote: > >> Hi, >> >> We are setting up a simple WSO2 Application Server cluster with one >> master node and one worker node. This is done via spawning instances in >> OpenStack cloud via python NovaClient API. >> >> After spawning instances we need to get their ip addresses and use them >> to fill puppet template values. (say master's ip address under members tag >> of axis2.xml file in worker node [1]) But to copy template values, the >> instances must be up and running. >> >> We tackled this successfully with xml configuration file with a >> combination of suspending and resuming newly spawned VM appserver instances >> via python. The xml file contained all the configuration values required to >> fill the puppet templates (axis2.xml.erb, carbon.xml.erb, etc...). >> >> Now we have to try it without xml configuration and by only using puppet >> configuration files. Our configuration information should be kept inside >> puppet files. >> >> We have a module called appserver inside /etc/puppet/modules/ in the >> current setup. >> >> current site.pp file contents in /etc/puppet/manifests >> >> import 'appserver' >> node 'appserver-mgr' { >> include appserver::config_mgr} >> >> node 'appserver-wkr' { >> include appserver::config_wkr} >> >> inside /etc/puppet/modules/appserver/manifests/ there are two >> configuration files >> >> config_mgr.pp >> config_wkr.pp >> >> We have not used init.pp. >> >> 1. How do we retrieve and keep ip addresses of newly spawned instances? >> Is there a standard way? >> >> 2. What should be our approach in keeping cluster configuration data? >> >> >> - Should we keep our cluster configuration inside *nodes.pp* file >> itself? >> - If so how to import the configuration to site.pp? >> >> >> - Or should we keep our config information in *params.pp* file in >> /modules/appserver/manifests location? >> - If we follow this approach where should we keep the central >> configuration file, if we use a mix of product clusters (AS and ESB)? >> >> Please be kind enough to guide us through this scenario. >> >> [1] >> https://docs.wso2.com/display/CLUSTER420/Configuring+the+Worker+Node#ConfiguringtheWorkerNode-Settingupclusterconfigurationsfortheworkernodes >> Thanks, >> Suhan >> -- >> Suhan Dharmasuriya >> Software Engineer - Test Automation >> >> *WSO2, Inc. * >> >> lean . enterprise . middleware >> Tel: +94 112 145345 >> Mob: +94 779 869138 >> Blog: http://suhan-opensource.blogspot.com/ >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > -- Suhan Dharmasuriya Software Engineer - Test Automation *WSO2, Inc. * lean . enterprise . middleware Tel: +94 112 145345 Mob: +94 779 869138 Blog: http://suhan-opensource.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
