I have this... node test_node inherits basenode_centos_5 { include yum include yum-priority include mysql_client include mysql_server } Puppet seems to be executing stuff from the mysql_client and mysql_server modules before the yum module. I had assumed that modules were executed in the order that they where included, but this seems not to be the case. I guess you could use requires() all over the place in the mysql modules to make sure that yum had completed doing it''s thing first, but that seems horribly complicated to me. Is there a better way? Since having your yum repositories is critical to software being installed, it should always be done first. Please don''t tell me I have to do it with requires.... :( That would mean EVERY package() statement would need a requires => class[''yum''], right? Doug. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
There''s two ways you can go about this. 1) One dirty little secret of puppet is that inheritance is always done in order. So if you move the includes for yum and yum-priority to the node basenode_centos_5, they will processed first. I''m not sure if this is still true in 0.25 though. 2) Set up a package default in the base node. Package{ require => [ Class["yum"], Class["yum-priority"] ]; } I''m sure there''s other ways to go about this, so other feel free to pitch in :) On Oct 23, 2009, at 3:12 PM, Douglas Garstang wrote:> > I have this... > > node test_node inherits basenode_centos_5 { > include yum > include yum-priority > include mysql_client > include mysql_server > } > > Puppet seems to be executing stuff from the mysql_client and > mysql_server modules before the yum module. I had assumed that modules > were executed in the order that they where included, but this seems > not to be the case. I guess you could use requires() all over the > place in the mysql modules to make sure that yum had completed doing > it''s thing first, but that seems horribly complicated to me. Is there > a better way? Since having your yum repositories is critical to > software being installed, it should always be done first. > > Please don''t tell me I have to do it with requires.... :( That would > mean EVERY package() statement would need a requires => class[''yum''], > right? > > Doug. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Awesome info. Thanks Carl! On Fri, Oct 23, 2009 at 1:18 PM, Carl Caum <carl.caum@gmail.com> wrote:> > There''s two ways you can go about this. > > 1) One dirty little secret of puppet is that inheritance is always > done in order. So if you move the includes for yum and yum-priority > to the node basenode_centos_5, they will processed first. I''m not > sure if this is still true in 0.25 though. > > 2) Set up a package default in the base node. > > Package{ > require => [ Class["yum"], Class["yum-priority"] ]; > } > > I''m sure there''s other ways to go about this, so other feel free to > pitch in :) > > On Oct 23, 2009, at 3:12 PM, Douglas Garstang wrote: > >> >> I have this... >> >> node test_node inherits basenode_centos_5 { >> include yum >> include yum-priority >> include mysql_client >> include mysql_server >> } >> >> Puppet seems to be executing stuff from the mysql_client and >> mysql_server modules before the yum module. I had assumed that modules >> were executed in the order that they where included, but this seems >> not to be the case. I guess you could use requires() all over the >> place in the mysql modules to make sure that yum had completed doing >> it''s thing first, but that seems horribly complicated to me. Is there >> a better way? Since having your yum repositories is critical to >> software being installed, it should always be done first. >> >> Please don''t tell me I have to do it with requires.... :( That would >> mean EVERY package() statement would need a requires => class[''yum''], >> right? >> >> Doug. >> >> > > > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Actually, that doesn''t seem to be what''s happening Carl. I have this... node tst_basenode { # Do not include any modules here, other than yum, that require software # or they will fail! If you include other modules in this node definition, # there is no guarantee that yum will be completed before them. include yum } node tst_basenode_centos inherits tst_basenode { include yum-priority include ntp include ldap_client include syslog_ng } node test_node inherits tst_basenode_centos { include mysql_client include mysql_server } ... and I am DEFINITELY seeing puppet try and install objects from ldap, mysql and yum-priority BEFORE the yum module is complete. Douglas. On Fri, Oct 23, 2009 at 1:22 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> Awesome info. Thanks Carl! > > On Fri, Oct 23, 2009 at 1:18 PM, Carl Caum <carl.caum@gmail.com> wrote: >> >> There''s two ways you can go about this. >> >> 1) One dirty little secret of puppet is that inheritance is always >> done in order. So if you move the includes for yum and yum-priority >> to the node basenode_centos_5, they will processed first. I''m not >> sure if this is still true in 0.25 though. >> >> 2) Set up a package default in the base node. >> >> Package{ >> require => [ Class["yum"], Class["yum-priority"] ]; >> } >> >> I''m sure there''s other ways to go about this, so other feel free to >> pitch in :) >> >> On Oct 23, 2009, at 3:12 PM, Douglas Garstang wrote: >> >>> >>> I have this... >>> >>> node test_node inherits basenode_centos_5 { >>> include yum >>> include yum-priority >>> include mysql_client >>> include mysql_server >>> } >>> >>> Puppet seems to be executing stuff from the mysql_client and >>> mysql_server modules before the yum module. I had assumed that modules >>> were executed in the order that they where included, but this seems >>> not to be the case. I guess you could use requires() all over the >>> place in the mysql modules to make sure that yum had completed doing >>> it''s thing first, but that seems horribly complicated to me. Is there >>> a better way? Since having your yum repositories is critical to >>> software being installed, it should always be done first. >>> >>> Please don''t tell me I have to do it with requires.... :( That would >>> mean EVERY package() statement would need a requires => class[''yum''], >>> right? >>> >>> Doug. >>> >>> > >> >> >> >> >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Interesting. That''s worked for me in the past. Well outside of creating a package resource default, you''ll need to just put requires in the classes that require other classes to be run first. Really, that''s not a bad idea at all since relationships should be explicit if not just for readability. Remember that puppet should be your executable documentation. You might be able to do something like: if defined(Class["yum"]) { require yum } But I''ve never tried that. If it works, then it will only define a relationship if the class is actually being used. Just keep that this will not work in 0.25 since require is broken. It will work in 0.25.1 though. On Oct 23, 2009, at 4:18 PM, Douglas Garstang wrote:> > Actually, that doesn''t seem to be what''s happening Carl. > > I have this... > > node tst_basenode { > > # Do not include any modules here, other than yum, that require > software > # or they will fail! If you include other modules in this node > definition, > # there is no guarantee that yum will be completed before them. > include yum > > } > > node tst_basenode_centos inherits tst_basenode { > include yum-priority > include ntp > include ldap_client > include syslog_ng > } > > node test_node inherits tst_basenode_centos { > include mysql_client > include mysql_server > } > > ... and I am DEFINITELY seeing puppet try and install objects from > ldap, mysql and yum-priority BEFORE the yum module is complete. > > Douglas. > > > On Fri, Oct 23, 2009 at 1:22 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: >> Awesome info. Thanks Carl! >> >> On Fri, Oct 23, 2009 at 1:18 PM, Carl Caum <carl.caum@gmail.com> >> wrote: >>> >>> There''s two ways you can go about this. >>> >>> 1) One dirty little secret of puppet is that inheritance is always >>> done in order. So if you move the includes for yum and yum-priority >>> to the node basenode_centos_5, they will processed first. I''m not >>> sure if this is still true in 0.25 though. >>> >>> 2) Set up a package default in the base node. >>> >>> Package{ >>> require => [ Class["yum"], Class["yum-priority"] ]; >>> } >>> >>> I''m sure there''s other ways to go about this, so other feel free to >>> pitch in :) >>> >>> On Oct 23, 2009, at 3:12 PM, Douglas Garstang wrote: >>> >>>> >>>> I have this... >>>> >>>> node test_node inherits basenode_centos_5 { >>>> include yum >>>> include yum-priority >>>> include mysql_client >>>> include mysql_server >>>> } >>>> >>>> Puppet seems to be executing stuff from the mysql_client and >>>> mysql_server modules before the yum module. I had assumed that >>>> modules >>>> were executed in the order that they where included, but this seems >>>> not to be the case. I guess you could use requires() all over the >>>> place in the mysql modules to make sure that yum had completed >>>> doing >>>> it''s thing first, but that seems horribly complicated to me. Is >>>> there >>>> a better way? Since having your yum repositories is critical to >>>> software being installed, it should always be done first. >>>> >>>> Please don''t tell me I have to do it with requires.... :( That >>>> would >>>> mean EVERY package() statement would need a requires => class >>>> [''yum''], >>>> right? >>>> >>>> Doug. >>>> >>>>> >>> >>> >>>>> >>> >> >> >> >> -- >> Regards, >> >> Douglas Garstang >> http://www.linkedin.com/in/garstang >> Email: doug.garstang@gmail.com >> Cell: +1-805-340-5627 >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Weird. You''d think this would be common problem number 1 in people trying to use modules with puppet... On Fri, Oct 23, 2009 at 2:36 PM, Carl Caum <carl.caum@gmail.com> wrote:> > Interesting. That''s worked for me in the past. Well outside of > creating a package resource default, you''ll need to just put requires > in the classes that require other classes to be run first. Really, > that''s not a bad idea at all since relationships should be explicit > if not just for readability. Remember that puppet should be your > executable documentation. > > You might be able to do something like: > > if defined(Class["yum"]) { > require yum > } > > But I''ve never tried that. If it works, then it will only define a > relationship if the class is actually being used. Just keep that this > will not work in 0.25 since require is broken. It will work in 0.25.1 > though. > > > On Oct 23, 2009, at 4:18 PM, Douglas Garstang wrote: > >> >> Actually, that doesn''t seem to be what''s happening Carl. >> >> I have this... >> >> node tst_basenode { >> >> # Do not include any modules here, other than yum, that require >> software >> # or they will fail! If you include other modules in this node >> definition, >> # there is no guarantee that yum will be completed before them. >> include yum >> >> } >> >> node tst_basenode_centos inherits tst_basenode { >> include yum-priority >> include ntp >> include ldap_client >> include syslog_ng >> } >> >> node test_node inherits tst_basenode_centos { >> include mysql_client >> include mysql_server >> } >> >> ... and I am DEFINITELY seeing puppet try and install objects from >> ldap, mysql and yum-priority BEFORE the yum module is complete. >> >> Douglas. >> >> >> On Fri, Oct 23, 2009 at 1:22 PM, Douglas Garstang >> <doug.garstang@gmail.com> wrote: >>> Awesome info. Thanks Carl! >>> >>> On Fri, Oct 23, 2009 at 1:18 PM, Carl Caum <carl.caum@gmail.com> >>> wrote: >>>> >>>> There''s two ways you can go about this. >>>> >>>> 1) One dirty little secret of puppet is that inheritance is always >>>> done in order. So if you move the includes for yum and yum-priority >>>> to the node basenode_centos_5, they will processed first. I''m not >>>> sure if this is still true in 0.25 though. >>>> >>>> 2) Set up a package default in the base node. >>>> >>>> Package{ >>>> require => [ Class["yum"], Class["yum-priority"] ]; >>>> } >>>> >>>> I''m sure there''s other ways to go about this, so other feel free to >>>> pitch in :) >>>> >>>> On Oct 23, 2009, at 3:12 PM, Douglas Garstang wrote: >>>> >>>>> >>>>> I have this... >>>>> >>>>> node test_node inherits basenode_centos_5 { >>>>> include yum >>>>> include yum-priority >>>>> include mysql_client >>>>> include mysql_server >>>>> } >>>>> >>>>> Puppet seems to be executing stuff from the mysql_client and >>>>> mysql_server modules before the yum module. I had assumed that >>>>> modules >>>>> were executed in the order that they where included, but this seems >>>>> not to be the case. I guess you could use requires() all over the >>>>> place in the mysql modules to make sure that yum had completed >>>>> doing >>>>> it''s thing first, but that seems horribly complicated to me. Is >>>>> there >>>>> a better way? Since having your yum repositories is critical to >>>>> software being installed, it should always be done first. >>>>> >>>>> Please don''t tell me I have to do it with requires.... :( That >>>>> would >>>>> mean EVERY package() statement would need a requires => class >>>>> [''yum''], >>>>> right? >>>>> >>>>> Doug. >>>>> >>>>>> >>>> >>>> >>>>>> >>>> >>> >>> >>> >>> -- >>> Regards, >>> >>> Douglas Garstang >>> http://www.linkedin.com/in/garstang >>> Email: doug.garstang@gmail.com >>> Cell: +1-805-340-5627 >>> >> >> >> >> -- >> Regards, >> >> Douglas Garstang >> http://www.linkedin.com/in/garstang >> Email: doug.garstang@gmail.com >> Cell: +1-805-340-5627 >> >> > > > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hello, ----- "Douglas Garstang" <doug.garstang@gmail.com> wrote:> Weird. You''d think this would be common problem number 1 in people > trying to use modules with puppet...It is not a problem at all. The requirement to clearly specify all your requirements, orders and dependencies is integral to the design of Puppet. Look in the language tutorial how to set defaults for resources, this works well and is what most people do. Additionally if you lay your modules out well with this in mind it really is not hard to do this well, I wrote a blog post about this, it''s not perfect but perhaps it will give you some ideas. http://www.devco.net/archives/2009/09/28/simple_puppet_module_structure.php -- R.I.Pienaar --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Including modules in a specific order would be nice too. It''s certainly easier to read and more intuitive. :) On Fri, Oct 23, 2009 at 2:50 PM, <rip@devco.net> wrote:> > hello, > > ----- "Douglas Garstang" <doug.garstang@gmail.com> wrote: > >> Weird. You''d think this would be common problem number 1 in people >> trying to use modules with puppet... > > It is not a problem at all. > > The requirement to clearly specify all your requirements, orders and dependencies is integral to the design of Puppet. > > Look in the language tutorial how to set defaults for resources, this works well and is what most people do. > > Additionally if you lay your modules out well with this in mind it really is not hard to do this well, I wrote a blog post about this, it''s not perfect but perhaps it will give you some ideas. > > http://www.devco.net/archives/2009/09/28/simple_puppet_module_structure.php > > -- > R.I.Pienaar > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Especially, since now I am getting this crap.. Oct 23 15:06:10 gumby puppetd[2867]: Could not apply complete catalog: Found dependency cycles in the following relationships: Package[centos-release] => Yumrepo[CentOS-Updates], Package[yum] => Package[yum -priorities], Yumrepo[CentOS-Updates] => Package[yum], Package[yum-priorities] => Package[yum], Package[yum] => Package[yum], Yumrepo[CentOS-Base] => Package[yum], Exec[yum_clean] => Package[yum], Package[c entos-release] => Package[yum], File[/etc/yum/pluginconf.d/priorities.conf] => Package[yum], Package[centos-release] => Yumrepo[CentOS-Base], Yumrepo[CentOS-Updates] => Exec[yum_clean], Yumrepo[CentOS-Updat es] => Exec[yum_clean], Yumrepo[CentOS-Base] => Exec[yum_clean], Yumrepo[CentOS-Base] => Exec[yum_clean], Package[yum-priorities] => File[/etc/yum/pluginconf.d/priorities.conf], Yumrepo[CentOS-Updates] => P ackage[centos-release], Package[yum-priorities] => Package[centos-release], Package[yum] => Package[centos-release], Yumrepo[CentOS-Base] => Package[centos-release], Exec[yum_clean] => Package[centos-releas e], Package[centos-release] => Package[centos-release], File[/etc/yum/pluginconf.d/priorities.conf] => Package[centos-release] when I put this into my yum module: Package { require => [ Class["yum"], Class["yum-priority"] ] } GRRRR On Fri, Oct 23, 2009 at 3:03 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> Including modules in a specific order would be nice too. It''s > certainly easier to read and more intuitive. :) > > On Fri, Oct 23, 2009 at 2:50 PM, <rip@devco.net> wrote: >> >> hello, >> >> ----- "Douglas Garstang" <doug.garstang@gmail.com> wrote: >> >>> Weird. You''d think this would be common problem number 1 in people >>> trying to use modules with puppet... >> >> It is not a problem at all. >> >> The requirement to clearly specify all your requirements, orders and dependencies is integral to the design of Puppet. >> >> Look in the language tutorial how to set defaults for resources, this works well and is what most people do. >> >> Additionally if you lay your modules out well with this in mind it really is not hard to do this well, I wrote a blog post about this, it''s not perfect but perhaps it will give you some ideas. >> >> http://www.devco.net/archives/2009/09/28/simple_puppet_module_structure.php >> >> -- >> R.I.Pienaar >> >> >> >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If you have packages in your yum class the. You shouldn''t have package resources require the yum class. Then you have a cycle because the class requires itself which requires itself which.... On Oct 23, 2009, at 5:07 PM, Douglas Garstang wrote:> > Especially, since now I am getting this crap.. > > Oct 23 15:06:10 gumby puppetd[2867]: Could not apply complete catalog: > Found dependency cycles in the following relationships: > Package[centos-release] => Yumrepo[CentOS-Updates], Package[yum] => > Package[yum > -priorities], Yumrepo[CentOS-Updates] => Package[yum], > Package[yum-priorities] => Package[yum], Package[yum] => Package[yum], > Yumrepo[CentOS-Base] => Package[yum], Exec[yum_clean] => Package[yum], > Package[c > entos-release] => Package[yum], > File[/etc/yum/pluginconf.d/priorities.conf] => Package[yum], > Package[centos-release] => Yumrepo[CentOS-Base], > Yumrepo[CentOS-Updates] => Exec[yum_clean], Yumrepo[CentOS-Updat > es] => Exec[yum_clean], Yumrepo[CentOS-Base] => Exec[yum_clean], > Yumrepo[CentOS-Base] => Exec[yum_clean], Package[yum-priorities] => > File[/etc/yum/pluginconf.d/priorities.conf], Yumrepo[CentOS-Updates] > => P > ackage[centos-release], Package[yum-priorities] => > Package[centos-release], Package[yum] => Package[centos-release], > Yumrepo[CentOS-Base] => Package[centos-release], Exec[yum_clean] => > Package[centos-releas > e], Package[centos-release] => Package[centos-release], > File[/etc/yum/pluginconf.d/priorities.conf] => Package[centos-release] > > when I put this into my yum module: > > Package { > require => [ Class["yum"], Class["yum-priority"] ] > } > > GRRRR > > On Fri, Oct 23, 2009 at 3:03 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: >> Including modules in a specific order would be nice too. It''s >> certainly easier to read and more intuitive. :) >> >> On Fri, Oct 23, 2009 at 2:50 PM, <rip@devco.net> wrote: >>> >>> hello, >>> >>> ----- "Douglas Garstang" <doug.garstang@gmail.com> wrote: >>> >>>> Weird. You''d think this would be common problem number 1 in people >>>> trying to use modules with puppet... >>> >>> It is not a problem at all. >>> >>> The requirement to clearly specify all your requirements, orders >>> and dependencies is integral to the design of Puppet. >>> >>> Look in the language tutorial how to set defaults for resources, >>> this works well and is what most people do. >>> >>> Additionally if you lay your modules out well with this in mind it >>> really is not hard to do this well, I wrote a blog post about >>> this, it''s not perfect but perhaps it will give you some ideas. >>> >>> http://www.devco.net/archives/2009/09/28/simple_puppet_module_structure.php >>> >>> -- >>> R.I.Pienaar >>> >>>>> >>> >> >> >> >> -- >> Regards, >> >> Douglas Garstang >> http://www.linkedin.com/in/garstang >> Email: doug.garstang@gmail.com >> Cell: +1-805-340-5627 >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 > > >--~--~---------~--~----~------------~-------~--~----~ 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 Oct 23, 5:07 pm, Douglas Garstang <doug.garst...@gmail.com> wrote:> Especially, since now I am getting this crap.. > > Oct 23 15:06:10 gumby puppetd[2867]: Could not apply complete catalog: > Found dependency cycles in the following relationships:[...] Many programmers and sysadmins used to procedural languages such as C or shell script have trouble adjusting to declarative languages such as Puppet''s. The lack of order-of-execution control seems to leave them a bit disoriented. When such people start with Puppet they need to grasp the fact that you don''t tell Puppet what to do; rather, you describe the goals you want it to achieve. At the core, those goals amount to a achieving a specific states for each resource in a collection of resources. Puppet chooses for itself what steps to take, in what order, to achieve those goals efficiently. Where there are dependencies among the managed resources, Puppet will choose a path that accommodates them, as long as you describe the dependencies accurately. Sometimes you can luck out with underspecified dependencies, and sometimes overspecified dependencies are (mostly) harmless, but both those situations are brittle and better avoided. In your particular case, you may be able to take advantage of the fact that Puppet resource defaults are not global (unless declared at global scope; see http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#resource-defaults). You probably need to think a bit about the actual relationships, though. You have an inherently tricky situation because you are using yum to manage itself. For this to work manually, you need to make some assumptions: that some version of yum is already present, that the starting repository configuration is sufficient to bootstrap, and perhaps others. For it to work under Puppet, then, you need to enable Puppet to make equivalent assumptions. --~--~---------~--~----~------------~-------~--~----~ 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 Tue, Oct 27, 2009 at 3:45 AM, jcbollinger wrote:> Where there are dependencies among the managed resources, Puppet will > choose a path that accommodates them, as long as you describe the > dependencies accurately. Sometimes you can luck out with > underspecified dependencies, and sometimes overspecified dependencies > are (mostly) harmless, but both those situations are brittle and > better avoided.I think it can be very helpful for beginners to be able to see the diagram of their dependencies, and where there is a cycle or an ordering problem, usually seeing it in graphical form makes it clear what the relationships should be. I wrote a blog post on the ''--graph'' option for drawing dependency graphs which was touched on here a few months ago. If anyone doesn''t know how to do this, or would like to see some example diagrams, have a look: http://bitfieldconsulting.com/puppet-dependency-graphs John -- http://bitfieldconsulting.com/ http://twitter.com/bitfield --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---