[Puppet Users] Re: in-module data with hiera

2012-10-01 Thread jcbollinger


On Sunday, September 30, 2012 4:37:29 AM UTC-5, R.I. Pienaar wrote:
>
>
> I propose extending the module layout with a data/ directory that can go 
> into each module and in this data directory would live a hiera config 
> file (optionally) and module specific data: 
>
>
That sounds really attractive, but I'm not in a position to test it right 
now.  Also (separately), I hope you have more distribution plans than just 
gem, because gem is a complete non-starter for me.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/_shrRB45IfkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: in-module data with hiera

2012-10-01 Thread Patrick Roberts
I am looking forward to testing this out in my test lab, as this is 
something I have been looking for for quite a while.  (That, and a good 
deployment mechanism, while waiting for Razor to mature.)

Thank you for putting this out for testing/reflection.

-- 
Patrick Roberts



On Sunday, September 30, 2012 4:37:29 AM UTC-5, R.I. Pienaar wrote:
>
> hello, 
>
> Till now hiera-puppet was the only way I know that allowed hiera data to 
> be loaded from inside a module. 
>
> The problem with this was that it was still subject to the site specific 
> hierarchy which means a module author had a pretty hard time to store 
> his data in a proper way in his module thus perpetuating the use of the 
> params classes pattern. 
>
> Now that Puppet 3 is out and it's gem extensible I can finally try some 
> ideas I had but put off implementing because it was too hard to install 
> and distribute these extensions. 
>
> I propose extending the module layout with a data/ directory that can go 
> into each module and in this data directory would live a hiera config 
> file (optionally) and module specific data: 
>
>your_module 
>├── data 
>│   ├── hiera.json 
>│   └── osfamily 
>│   ├── Debian.json 
>│   └── RedHat.json 
>└── manifests 
>└── init.pp 
>
> Here the data/hiera.json is optional and specifies a hierarchy that the 
> module author chooses and is unique to the specific backend. 
>
> The default contents would be this is the file is absent: 
>
>{"hierarchy": ["osfamily/%{osfamily}", "common"]} 
>
> But a module author can pick anything there, should even be able to rely 
> on facts that is shipped with the module in its lib dir since that'll 
> get pluginsynced out before compile time: 
>
> Now given the data files for Redhat: 
>
>{"apache::package" : "httpd"} 
>   
> ...and Debian: 
>
>{"apache::package" : "apache2"} 
>
> And your main hiera site config being something like: 
>
>:backends: - json 
>   - module_json 
>
> You should be able to just write module code like this: 
>
>class apache($package="apache") { 
>   package{$package: ensure => present} 
>} 
>
> If no data is specified in the site hiera backends then this will use 
> the in-module hierarchy and data and just do the right thing on RedHat 
> and Debian systems but as always the site can still override the data 
> using hard coding, site specific data, ENCs etc. 
>
> So the important thing here is the module author has control over the 
> hierarchy that gets used when the data in his module gets loaded. The 
> site can has its own hierarchy policy but this backend will only use 
> the hierarchy that is recorded in the module by its author. 
>
> If you want to play with this idea on your Puppet 3 install just do 'gem 
> install hiera-module-json' 
>
> So I am looking for feedback from the community on this pattern, will it 
> solve the problem of author-supplied module data better than we have 
> today? I've heard this problem brought up quite a lot so keen to hear 
> feedback. 
>
> I'd imagine eventually a backend like this might be a hard-coded backend 
> shipped with puppet and always there as the lowest priority backend 
> below any that the site might specify in their site wide hiera config so 
> everyone can rely on this being there and with the new lookup helpers 
> this should also be backward compatible - old Puppets or ones who 
> specifically disable the hiera indirector will just not have data and 
> will need to supply it some other way. 
>
> --- 
> R.I.Pienaar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/J0XkwA_MAQUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: in-module data with hiera

2012-12-05 Thread jcbollinger


On Sunday, September 30, 2012 4:37:29 AM UTC-5, R.I. Pienaar wrote:
>
>
> I propose extending the module layout with a data/ directory that can go 
> into each module and in this data directory would live a hiera config 
> file (optionally) and module specific data: 
>
[...] 

> Here the data/hiera.json is optional and specifies a hierarchy that the 
> module author chooses and is unique to the specific backend. 
>
> The default contents would be this is the file is absent: 
>
>{"hierarchy": ["osfamily/%{osfamily}", "common"]} 
>
>
Having thought about this some more, I still think it's a great idea, but 
giving special support to 'osfamily' in the default in-module hierarchy 
seems a bit smelly to me.  I don't doubt that categorizing data by osfamily 
would be a frequent practice, but making a special case for it straight off 
the bat doesn't feel right to me.

Certainly the default osfamily support wouldn't be directly harmful to 
users, inasmuch as they can easily ignore or override it, but I 
nevertheless urge you to keep it simple.  The backlog of open tickets 
attests to the fact that PL doesn't really have enough engineering capacity 
as it is.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Lhdp3eelUZEJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: in-module data with hiera

2012-12-27 Thread ZipKid
Hello,

What is still needed to get this issue 'moving'?
I have 2 customers where i have to start a new Puppet environment starting 
in January 2013 and i would really like to be able to use this 
functionality for those.

Regards,

Stefan - Zipkid - Goethals.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/qpmxRhRUIhsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: in-module data with hiera

2012-10-01 Thread R.I.Pienaar


- Original Message -
> From: "jcbollinger" 
> To: puppet-users@googlegroups.com
> Sent: Monday, October 1, 2012 2:15:22 PM
> Subject: [Puppet Users] Re: in-module data with hiera
> 
> 
> 
> On Sunday, September 30, 2012 4:37:29 AM UTC-5, R.I. Pienaar wrote:
> 
> 
> I propose extending the module layout with a data/ directory that can
> go
> into each module and in this data directory would live a hiera config
> file (optionally) and module specific data:
> 
> 
> That sounds really attractive, but I'm not in a position to test it
> right now. Also (separately), I hope you have more distribution
> plans than just gem, because gem is a complete non-starter for me.

personally the end goal would be to just merge it with hiera or puppet.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: in-module data with hiera

2012-12-05 Thread R.I.Pienaar

On 5 Dec 2012, at 16:43, jcbollinger  wrote:

> 
> 
> On Sunday, September 30, 2012 4:37:29 AM UTC-5, R.I. Pienaar wrote:
>> 
>> 
>> I propose extending the module layout with a data/ directory that can go 
>> into each module and in this data directory would live a hiera config 
>> file (optionally) and module specific data:
> [...] 
>> Here the data/hiera.json is optional and specifies a hierarchy that the 
>> module author chooses and is unique to the specific backend. 
>> 
>> The default contents would be this is the file is absent: 
>> 
>>{"hierarchy": ["osfamily/%{osfamily}", "common"]}
> 
> Having thought about this some more, I still think it's a great idea, but 
> giving special support to 'osfamily' in the default in-module hierarchy seems 
> a bit smelly to me.  I don't doubt that categorizing data by osfamily would 
> be a frequent practice, but making a special case for it straight off the bat 
> doesn't feel right to me.
> 
> Certainly the default osfamily support wouldn't be directly harmful to users, 
> inasmuch as they can easily ignore or override it, but I nevertheless urge 
> you to keep it simple. 

Do you have an alternative default hierarchy you'd prefer?

> The backlog of open tickets attests to the fact that PL doesn't really have 
> enough engineering capacity as it is.

Not sure what the relevance is here..

> 
> 
> John
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/Lhdp3eelUZEJ.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: in-module data with hiera

2012-12-05 Thread Stefan Goethals
Not having any problem with osfamily i agree with John.
A default to 'common' would suffice i believe.

Stefan.

On Wed, Dec 5, 2012 at 3:43 PM, jcbollinger wrote:

>
>
> On Sunday, September 30, 2012 4:37:29 AM UTC-5, R.I. Pienaar wrote:
>
>>
>> I propose extending the module layout with a data/ directory that can go
>> into each module and in this data directory would live a hiera config
>> file (optionally) and module specific data:
>>
> [...]
>
>> Here the data/hiera.json is optional and specifies a hierarchy that the
>> module author chooses and is unique to the specific backend.
>>
>> The default contents would be this is the file is absent:
>>
>>{"hierarchy": ["osfamily/%{osfamily}", "common"]}
>>
>>
> Having thought about this some more, I still think it's a great idea, but
> giving special support to 'osfamily' in the default in-module hierarchy
> seems a bit smelly to me.  I don't doubt that categorizing data by osfamily
> would be a frequent practice, but making a special case for it straight off
> the bat doesn't feel right to me.
>
> Certainly the default osfamily support wouldn't be directly harmful to
> users, inasmuch as they can easily ignore or override it, but I
> nevertheless urge you to keep it simple.  The backlog of open tickets
> attests to the fact that PL doesn't really have enough engineering capacity
> as it is.
>
>
> John
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/Lhdp3eelUZEJ.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: in-module data with hiera

2012-12-05 Thread jcbollinger


On Wednesday, December 5, 2012 8:47:32 AM UTC-6, R.I. Pienaar wrote:
>
>
> On 5 Dec 2012, at 16:43, jcbollinger > 
> wrote:
>
>
> Certainly the default osfamily support wouldn't be directly harmful to 
> users, inasmuch as they can easily ignore or override it, but I 
> nevertheless urge you to keep it simple.  
>
>
> Do you have an alternative default hierarchy you'd prefer?
>


As Stefan said, just "common" would be fine, or some similar single, 
fixed-name file.

The backlog of open tickets attests to the fact that PL doesn't really have 
> enough engineering capacity as it is.
>
>
> Not sure what the relevance is here..
>
>

I probably shouldn't even have brought it up.  My apologies.  My point, 
however, was that new features are not free, even after they are written -- 
every line of code in Puppet has an ongoing maintenance cost.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/aAqr--P3K9EJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: in-module data with hiera

2012-12-05 Thread Jakov Sosic
On 12/05/2012 09:45 PM, Stefan Goethals wrote:
> Not having any problem with osfamily i agree with John. 
> A default to 'common' would suffice i believe.

Agree, common is more than enough as default.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: in-module data with hiera

2012-12-12 Thread R.I.Pienaar


- Original Message -
> From: "Jakov Sosic" 
> To: puppet-users@googlegroups.com
> Sent: Wednesday, December 5, 2012 11:15:57 PM
> Subject: Re: [Puppet Users] Re: in-module data with hiera
> 
> On 12/05/2012 09:45 PM, Stefan Goethals wrote:
> > Not having any problem with osfamily i agree with John.
> > A default to 'common' would suffice i believe.
> 
> Agree, common is more than enough as default.

I've updated my pull request[1] with this feedback and the bugs
Zipkid reported, any testers and more feedback welcome

[1] https://github.com/puppetlabs/puppet/pull/1217

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.