John Hawkes-Reed
2011-Jul-21 14:57 UTC
[Puppet Users] Semi-architectural question - data inside code-tree.
Hello. As part of our Puppet rig, we manage a number of zonefiles with NSD. This means that there''s a directory of datafiles under ../puppet/modules/nsd/files/zones/ (and something somewhat similar for the Postfix virtual domains). It seems to me that mixing code and data like that might be a bad idea, and was wondering if anyone else had a better one. -- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526 -- Future Publishing Limited (registered company number 2008885) is a wholly owned subsidiary of Future plc (registered company number 3757874), both of which are incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please reply to this email and then delete it. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print. -- 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.
vagn scott
2011-Jul-22 07:27 UTC
Re: [Puppet Users] Semi-architectural question - data inside code-tree.
On 07/21/2011 10:57 AM, John Hawkes-Reed wrote:> It seems to me that mixing code and data like that might be a bad idea, and was wondering if anyone else had a better one. > >It would be cool if puppet knew about svn, git, and so on. A file could have a URI and revision, when the revision changed, puppet could refetch the file and push it out. That would let you do configuration management on your data separate from your modules. I suppose you could fake it by doing a checkout to a staging directory and sourcing your data from there. Thank you for that question. I think you just gave me the subject of my next set of experiments. -- vagn -- 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.
Michael Knox
2011-Jul-22 21:14 UTC
Re: [Puppet Users] Semi-architectural question - data inside code-tree.
On 22/07/11 12:57 AM, John Hawkes-Reed wrote:> Hello. > > As part of our Puppet rig, we manage a number of zonefiles with NSD. This means that there''s a directory of datafiles under ../puppet/modules/nsd/files/zones/ (and something somewhat similar for the Postfix virtual domains). > > It seems to me that mixing code and data like that might be a bad idea, and was wondering if anyone else had a better one. >Hi, Data can be sourced from VCS repos, rather than your Puppet manifests/modules in at least 2 ways. 1. directory structures such as DNS zones file, or apps that are housed in VCS repos are managed through the vcsrepo type [1] 2. For an individual files content, we currently have something like: file{''/blah'': inline_template("<%= `/usr/bin/svn cat http://repo.domain/somefile` %>"), } This should be moved into a function with some code to manage failure conditions such as being unable to contact the repository to ensure that such a failure doesn''t cause corruption. [1] http://forge.puppetlabs.com/puppetlabs/vcsrepo -- 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.
John Hawkes-Reed
2011-Jul-25 13:52 UTC
Re: [Puppet Users] Semi-architectural question - data inside code-tree.
On 22 Jul 2011, at 22:14, Michael Knox wrote:> On 22/07/11 12:57 AM, John Hawkes-Reed wrote: >> Hello. >> >> As part of our Puppet rig, we manage a number of zonefiles with NSD. This means that there''s a directory of datafiles under ../puppet/modules/nsd/files/zones/ (and something somewhat similar for the Postfix virtual domains). >> >> It seems to me that mixing code and data like that might be a bad idea, and was wondering if anyone else had a better one. >> > Hi, > Data can be sourced from VCS repos, rather than your Puppet > manifests/modules in at least 2 ways. > > 1. directory structures such as DNS zones file, or apps that are housed > in VCS repos are managed through the vcsrepo type [1] > 2. For an individual files content, we currently have something like: > file{''/blah'': > inline_template("<%= `/usr/bin/svn cat http://repo.domain/somefile` > %>"), > } > This should be moved into a function with some code to manage failure > conditions such as being unable to contact the repository to ensure that > such a failure doesn''t cause corruption. > > [1] http://forge.puppetlabs.com/puppetlabs/vcsrepoCoo. That''s rather neat. I shall go and have a play - thanks for the pointer. -- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526 -- Future Publishing Limited (registered company number 2008885) is a wholly owned subsidiary of Future plc (registered company number 3757874), both of which are incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please reply to this email and then delete it. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print. -- 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.