hi all, i started using puppet month before. i am playing with puppet , configured with LDAP. according to my requirement , i need to configure two nodes node 1. where tomcat an releted services to be deployed through puppet . node 2. where java processs that will point to tomcat services. for i had created two puppet classes in two different module tomcat.pp and process.pp. and two node created in LDAP pointing to these puppet classes. able to fullfill above scenario with puppet . as U can visualise node 2 should be configured after node1. what i need is , both the configuration to be done one node . mean both tomcat and java services to be deployed on same machine rather than two diff machine. i want to give customised option .... option 1) deploy on same machine. option 2) deploy on two diff machine. Ques : how can i implement this with puppet reusing existing puppet (module & class ) ? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
hi all , adding more details to it. i tried to implement this in two ways, way 1) created a new module with new puppet class in manifest that contains configuration of both puppet class tomcat.pp & process.pp. problem with approach is that there is code replication , means that if any changes (new file /template/ services to be deployed) is required , then need to be done in two places. way 2) created a new node in LDAP that points to both puppet classes tomcat.pp & process.pp but with this there is problem of dependency,means that how can i ensure that tomcat.pp must be triggered before process.pp.? means that tomcat and services to be deployed before runing any java processes that would point to these services. guide me with best practice to implement this scenario.!!!! how can i implement this use case? thanks, sanjiv singh impetus india (iLabs). On Dec 23, 12:16 am, "sanjiv.singh" <sanjiv.si...@impetus.co.in> wrote:> hi all, > i started using puppet month before. > i am playing with puppet , configured with LDAP. > > according to my requirement , i need to configure two nodes > node 1. where tomcat an releted services to be deployed through > puppet . > node 2. where java processs that will point to tomcat services. > > for i had created two puppet classes in two different module > tomcat.pp and process.pp. > > and two node created in LDAP pointing to these puppet classes. > > able to fullfill above scenario with puppet . > > as U can visualise node 2 should be configured after node1. > > what i need is , > both the configuration to be done one node . > mean both tomcat and java services to be deployed on same machine > rather than two diff machine. > > i want to give customised option .... > option 1) deploy on same machine. > option 2) deploy on two diff machine. > > Ques : how can i implement this with puppet reusing existing puppet > (module & class ) ?-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 22, 1:16 pm, "sanjiv.singh" <sanjiv.si...@impetus.co.in> wrote:> hi all, > i started using puppet month before. > i am playing with puppet , configured with LDAP. > > according to my requirement , i need to configure two nodes > node 1. where tomcat an releted services to be deployed through > puppet . > node 2. where java processs that will point to tomcat services. > > for i had created two puppet classes in two different module > tomcat.pp and process.pp. > > and two node created in LDAP pointing to these puppet classes. > > able to fullfill above scenario with puppet . > > as U can visualise node 2 should be configured after node1.No, I don''t visualize that at all. Do not confuse operational dependencies between your nodes (which clearly you have) with configuration dependencies between them (of which i see no evidence). Puppet is focused on the configuration side.> what i need is , > both the configuration to be done one node . > mean both tomcat and java services to be deployed on same machine > rather than two diff machine. > > i want to give customised option .... > option 1) deploy on same machine. > option 2) deploy on two diff machine. > > Ques : how can i implement this with puppet reusing existing puppet > (module & class ) ?This should be very easy, provided your classes do not conflict. A node can include any number of classes, so all you have to do is change this: ===node node1 { include <tomcat_class_name> } node node2 { include <process_class_name> } === to this: ===node node3 { include <tomcat_class_name> include <process_class_name> } === If your classes do conflict (for example, they define the same resource) then you will have to refactor them to make them compatible. Depending on the nature of the conflict(s), that might be either very simple or rather tricky. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 22, 1:39 pm, "sanjiv.singh" <sanjiv.si...@impetus.co.in> wrote:> hi all , > adding more details to it. > > i tried to implement this in two ways, > > way 1) created a new module with new puppet class in manifest that > contains configuration of both puppet class tomcat.pp & process.pp.Are you using the word "module" in the Puppet sense of the term (http://docs.puppetlabs.com/guides/modules.html)? It sounds like not, and that''s going to confuse people around here -- or at least it will confuse me. Are you assuming some significance to the file names of your manifests (tomcat.pp and process.pp) beyond their use with the import statement and their relevance to class autoloading? For most purposes, it''s the names of the classes themselves that matter.> problem with approach is that there is code replication , means that > if any changes (new file /template/ services to be deployed) is > required , then need to be done in two places.There should be no need to create a new class as a combination of the declarations found in other classes.> way 2) created a new node in LDAP that points to both puppet classes > tomcat.pp & process.pp > > but with this there is problem of dependency,means that how can i > ensure that tomcat.pp must be triggered before process.pp.? > means that tomcat and services to be deployed before runing any java > processes that would point to these services.First, consider whether you really need that. Just because there is a functional dependency between the processes does not necessarily mean that one must be configured before the other, or even that one must be started before the other. You might indeed need that, but if you don''t then you shouldn''t waste your time.> guide me with best practice to implement this scenario.!!!! > > how can i implement this use case?If you really do need to model dependencies between resources and classes, then use resources'' "require" metaparameter, and / or their "subscribe" or "notify" metaparameters. A resource can "require" a whole class, but usually it is better for them to "require" a small set of individual resources. There is a lot of information on this topic in the archives of this group, and of course it''s covered in the Puppet documentation (http://docs.puppetlabs.com/ http://docs.puppetlabs.com/guides/language_tutorial.html). You are likely to get more specific help if you ask a more specific question, preferrably accompanied by simple sample code. Good luck, John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> This should be very easy, provided your classes do not conflict. A > node can include any number of classes, so all you have to do is > change this: > > ===> node node1 { > include <tomcat_class_name> > > } > > node node2 { > include <process_class_name>} > > ===> > to this: > > ===> node node3 { > include <tomcat_class_name> > include <process_class_name>} > > ===============>hi jcbollinger, thankx for reply . first for all I had configured puppet with LDAP. there is one node entry in Ldap for per host to be configured. and node in LDAP have a variable pointing to pupppet class like tomcat.pp to be triggered for that node . what i can do , add two variable in ldap node one pointing to tomcat.pp and other pointing to process.pp. as i know puppet decides order of resource execution in own way , unless explicitly mentioned in class. how can I ensure that tomcat.pp must be triggered before process.pp. ? is include <class> ensures order of execution as in order included ?> If your classes do conflict (for example, they define the same > resource) then you will have to refactor them to make them > compatible. Depending on the nature of the conflict(s), that might be > either very simple or rather tricky. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 23, 2010, at 6:39 AM, sanjiv.singh wrote:> >> This should be very easy, provided your classes do not conflict. A >> node can include any number of classes, so all you have to do is >> change this: >> >> ===>> node node1 { >> include <tomcat_class_name> >> >> } >> >> node node2 { >> include <process_class_name>} >> >> ===>> >> to this: >> >> ===>> node node3 { >> include <tomcat_class_name> >> include <process_class_name>} >> >> ===============>> > hi jcbollinger, > thankx for reply . > > first for all I had configured puppet with LDAP. > there is one node entry in Ldap for per host to be configured. > > and node in LDAP have a variable pointing to pupppet class like > tomcat.pp to be triggered for that node . > > what i can do , add two variable in ldap node > one pointing to tomcat.pp and other pointing to process.pp. > > > as i know puppet decides order of resource execution in own way , > unless explicitly mentioned in class. > > > how can I ensure that tomcat.pp must be triggered before > process.pp. ?You need to stop thinking this way. Files don''t have a logical meaning in puppet. The question you want to ask is, "how do I ensure that the class "tomcat" is applied before the class "process".> is include <class> ensures order of execution as in order included ?No. Here''s one way to do it. I don''t know if the "include" is needed, but it doesn''t hurt.: class first { include second require(second) } class second { } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.