Byron Miller
2013-Mar-14 16:04 UTC
[Puppet Users] Help me wrap my head around Yaml/Hiera with erwbgy/system
Trying to figure out the erwbgy/system plugin and just getting stuck.. first run it did some changes, but it ignored parameters for ntp and now its not refreshing if I update the yaml at all, Im slightly lost at what I may be missing :) hiera.yaml --- :hierarchy: - %{certname} - %{environment} - global - %{environment}/common :backends: - yaml :yaml: :datadir: ''/etc/puppet/hieradata'' common.yaml system::packages::schedule: ''never'' system::yumgroups::schedule: ''never'' system::augeas: ''ntp'': context: ''/files/etc/ntp.conf'' changes: - ''set server[0] 0.vmware.pool.ntp.org'' - ''set server[1] 1.vmware.pool.ntp.org'' - ''set server[2] 2.vmware.pool.ntp.org'' first run, it updated to 0.pool.ntp.org and its still doing that, so I missed something important here. Puppet 3.1.1 I noticed all the hiera examples on the site for puppet all say coming soon. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
windowsrefund
2013-Mar-14 20:10 UTC
[Puppet Users] Re: Help me wrap my head around Yaml/Hiera with erwbgy/system
plugin aside, I strongly suggest not settling for YAML as a backend for Hiera since you''re basically ending up with the same problem you were probably trying to solve; managing data in files. Sure, they''re "different" files but still files. You may as well keep the data in your Puppet manifests and manage the data there... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Byron Miller
2013-Mar-14 20:29 UTC
[Puppet Users] Re: Help me wrap my head around Yaml/Hiera with erwbgy/system
On Thursday, March 14, 2013 3:10:01 PM UTC-5, windowsrefund wrote:> > plugin aside, I strongly suggest not settling for YAML as a backend for > Hiera since you''re basically ending up with the same problem you were > probably trying to solve; managing data in files. Sure, they''re "different" > files but still files. You may as well keep the data in your Puppet > manifests and manage the data there... > > > >thanks, that''s what i''m discovering.. while the plugin ads some nice functionality, my resources aren''t as flat as the YAML / plugin schema is designed for. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Keith Burdis
2013-Mar-15 09:13 UTC
Re: [Puppet Users] Help me wrap my head around Yaml/Hiera with erwbgy/system
Hi Byron, Some suggestions: 1) Hiera comes with a handy command-line tool to query your config so try using that first. What does running: # hiera -h system::augeas return? If it returns the ntp hash then your hiera config is good. 2) If not, are /etc/hiera.yaml and /etc/puppet/hiera.yaml the same file? I usually symlink one to the other to avoid issues. 3) Assuming your environment is "production" (the default) based on your hiera.yaml the common.yaml file should be /etc/puppet/hieradata/production/common.yaml. Is this the case? 4) Not the point of your question, but to set NTP servers use system::ntp :-) It does uses Augeas underneath but is easier to use. - Keith On 14 March 2013 16:04, Byron Miller <byronm@gmail.com> wrote:> Trying to figure out the erwbgy/system plugin and just getting stuck.. > first run it did some changes, but it ignored parameters for ntp and now > its not refreshing if I update the yaml at all, Im slightly lost at what I > may be missing :) > > hiera.yaml > --- > :hierarchy: > - %{certname} > - %{environment} > - global > - %{environment}/common > :backends: > - yaml > :yaml: > :datadir: ''/etc/puppet/hieradata'' > > > common.yaml > > system::packages::schedule: ''never'' > system::yumgroups::schedule: ''never'' > system::augeas: > ''ntp'': > context: ''/files/etc/ntp.conf'' > changes: > - ''set server[0] 0.vmware.pool.ntp.org'' > - ''set server[1] 1.vmware.pool.ntp.org'' > - ''set server[2] 2.vmware.pool.ntp.org'' > > first run, it updated to 0.pool.ntp.org and its still doing that, so I > missed something important here. > > Puppet 3.1.1 > > I noticed all the hiera examples on the site for puppet all say coming > soon. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Keith Burdis
2013-Mar-15 09:21 UTC
Re: [Puppet Users] Re: Help me wrap my head around Yaml/Hiera with erwbgy/system
The great thing about Puppet is that it gives you lots of different ways to manage your host data. Personally I am a big fan of hiera and its YAML backend because it is simple for non-Puppet users to understand and allows them to manage the config without having to write or modify Puppet manifests. I also find that using custom facts and different parts of the hierarchy for things like locations, operating systems and host roles it scales quite well for small to medium size setups (depending on what that means to you). If you''re the only one who looks after Puppet config or the team that does are all Puppeteers or you have a simpler setup then going down the pure manifests route will work fine. Most people did this before Puppet 3. However hiera was invented for a reason :-) - Keith On 14 March 2013 20:10, windowsrefund <windowsrefund@gmail.com> wrote:> plugin aside, I strongly suggest not settling for YAML as a backend for > Hiera since you''re basically ending up with the same problem you were > probably trying to solve; managing data in files. Sure, they''re "different" > files but still files. You may as well keep the data in your Puppet > manifests and manage the data there... > > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Byron Miller
2013-Mar-15 12:45 UTC
Re: [Puppet Users] Help me wrap my head around Yaml/Hiera with erwbgy/system
Great info Keith, thanks for replying. I''ll use this to continue seeing if I can make it work on our systems here. What i''d like to do is have something that supports a tiered implementation of a base install, then an app server config for app servers, database for database server and other options for custom servers So with straight up manifests I have "base" then "db" which includes base then I have "base" with "app server" which includes base. Is there a way to achieve similar structure with yaml and your plugin? i tried using calling_class or calling_method or whatever it was to invoke a specific yaml from a specific class to achieve a "layered" build process, but maybe i''m missing something that is much easier (and i couldn''t figure out if the variable was being used to be honest, it only applied the base.yaml, not the calling methods yaml.. is there a way to "Trace" which yaml its walking down? thanks! -byron On Friday, March 15, 2013 4:13:26 AM UTC-5, Keith Burdis wrote:> Hi Byron, > > Some suggestions: > > 1) Hiera comes with a handy command-line tool to query your config so try > using that first. What does running: > > # hiera -h system::augeas > > return? If it returns the ntp hash then your hiera config is good. > > 2) If not, are /etc/hiera.yaml and /etc/puppet/hiera.yaml the same file? > I usually symlink one to the other to avoid issues. > > 3) Assuming your environment is "production" (the default) based on your > hiera.yaml the common.yaml file should be > /etc/puppet/hieradata/production/common.yaml. Is this the case? > > 4) Not the point of your question, but to set NTP servers use system::ntp > :-) It does uses Augeas underneath but is easier to use. > > - Keith > > > On 14 March 2013 16:04, Byron Miller <byr...@gmail.com <javascript:>>wrote: > >> Trying to figure out the erwbgy/system plugin and just getting stuck.. >> first run it did some changes, but it ignored parameters for ntp and now >> its not refreshing if I update the yaml at all, Im slightly lost at what I >> may be missing :) >> >> hiera.yaml >> --- >> :hierarchy: >> - %{certname} >> - %{environment} >> - global >> - %{environment}/common >> :backends: >> - yaml >> :yaml: >> :datadir: ''/etc/puppet/hieradata'' >> >> >> common.yaml >> >> system::packages::schedule: ''never'' >> system::yumgroups::schedule: ''never'' >> system::augeas: >> ''ntp'': >> context: ''/files/etc/ntp.conf'' >> changes: >> - ''set server[0] 0.vmware.pool.ntp.org'' >> - ''set server[1] 1.vmware.pool.ntp.org'' >> - ''set server[2] 2.vmware.pool.ntp.org'' >> >> first run, it updated to 0.pool.ntp.org and its still doing that, so I >> missed something important here. >> >> Puppet 3.1.1 >> >> I noticed all the hiera examples on the site for puppet all say coming >> soon. >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to puppet-users...@googlegroups.com <javascript:>. >> To post to this group, send email to puppet...@googlegroups.com<javascript:> >> . >> Visit this group at http://groups.google.com/group/puppet-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.