>
>
>From: Haselwanter Edmund [mailto:[email protected]] 
>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, [email protected] 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?


>
>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.


>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, [email protected], http://edmund.haselwanter.com/
>http://www.iteh.at | http://facebook.com/iTeh.solutions | 
>http://at.linkedin.com/in/haselwanteredmund 
>
>
>

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

Reply via email to