On 08.03.2013, at 12:15, andi_a...@dell.com wrote:

>> 
>> 
>> From: Haselwanter Edmund [mailto:edm...@haselwanter.com] 
>> Sent: Friday, March 08, 2013 4:51 AM
>> To: Abes, Andi
>> Cc: crowbar
>> Subject: Re: [Crowbar] Attribute injection
>> 
>> 
>> On 07.03.2013, at 02:36, andi_a...@dell.com wrote:
>> In general, each recipe will define a set of attributes that are required 
>> for it to run successfully. These attributes provide the information that 
>> either search or crowbar would have provided. The attributes can be 
>> populated in different ways, depending on the environment in which the 
>> recipes are used:
>> a)      With pure Chef - via the default attributes in the cookbook, the 
>> environments facility of Chef, or roles
>> b)      In Crowbar - crowbar will compute and inject override values for 
>> these attributes, at runtime, via chef  API's.
>> c)       In other deployment systems - in a manner either like a) or b) or 
>> telepathically.
>> 
>> d) a wrapper cookbook setting node attributes
>> 
>> e.g.
>> 
>> node.set['donar']['keystone_server_name'] = get_access_endpoint("keystone", 
>> "keystone", "admin-api")["host"]
>> 
>> get_access_endpoint could be a API call to crowbar
> 
> Hmmm.... interesting, kind of an "application" cookbook - generalizing the 
> opscode community application approach to openstack.
> Edmund, is this how you're deploying?

Yes. application cookbook approach. works nice so far.

>> or a more "interesting" wrapper cookbook change with 
>> chef-rewind(https://github.com/bryanwb/chef-rewind):
>> 
>> chef_gem "chef-rewind"
> 
> Just the other day Judd was talking to me about this, and I forked the repo ;)
> Monkey patching cookbooks sounded a bit weird at first for me, but I can see 
> how it can be very useful.

yes. at first sight it seems like monkeypatching, but is more like 
refining/overriding a setting.

>> require 'chef/rewind'
>> 
>> include_recipe "nova::compute"
>> 
>> if node["nova"]["libvirt"]["virt_type"] == "qemu"
>> rewind "package[nova-compute-qemu]" do
>>   action :nothing
>> end
>> elsif node["nova"]["libvirt"]["virt_type"] == "kvm"
>> rewind "package[nova-compute-kvm]" do
>>   action :nothing
>> end  
>> end
>> 
> 
> I think that w/ the AttrInj cookbooks we could avoid needing to do this... 
> and just have the cookbook have a virt_type attribute that allows the 
> previous methods to set the desired value.
> 
> 
>> cu Edmund
>> -- 
>> DI Edmund Haselwanter, edm...@haselwanter.com, http://edmund.haselwanter.com/
>> http://www.iteh.at | http://facebook.com/iTeh.solutions | 
>> http://at.linkedin.com/in/haselwanteredmund 
>> 
>> 
>> 
> 
> _______________________________________________
> Crowbar mailing list
> Crowbar@dell.com
> https://lists.us.dell.com/mailman/listinfo/crowbar
> For more information: http://crowbar.github.com/

-- 
DI Edmund Siegfried Haselwanter, Leitnergasse 16, 8010 Graz
Tel.  :  +43 - 676 - 3282554, e-mail: mailto:off...@iteh.at, UID: ATU64821134
web: http://www.iteh.at | http://facebook.com/iTeh.solutions | 
http://at.linkedin.com/in/haselwanteredmund

_______________________________________________
Crowbar mailing list
Crowbar@dell.com
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/

Reply via email to