- From: Seth Chisamore <
>
- To: "<
>" <
>
- Subject: [chef] Re: My Wishlist: Better Chef-Solo Support
- Date: Wed, 20 Feb 2013 20:03:18 +0000
- Accept-language: en-US
On Feb 20, 2013, at 1:32 PM, Elliot Murphy
<
>
wrote:
>
On Wed, Feb 20, 2013 at 1:02 PM, Torben Knerr
>
<
>
>
wrote:
>
Sadly, each of these provide different levels of parity with chef-client,
>
e.g. knife-solo adds search via edelight/chef-solo-search, but this is not
>
supported by the other approaches. I guess all of them support data bags.
>
Not sure if anyone of them already supports environments under chef-solo...
>
>
I had been planning some work thinking that chef-solo-search would work in
>
a vagrant environment by just adding the cookbook - does it not work? I
>
haven't tested yet, but if someone else has already been down this route it
>
might save me from going down a dead end.
Have you taken a look at Fletcher Nichol's searchef [0] (and it's associated
cookbook [1])? It allows you to stub out the search request at the HTTP
request level:
# search for nodes
stub_search(:node, "roles:web_node").to_return([
node_stub("web1.example.com"),
node_stub("web2.example.com")
])
# search in data bag
stub_search(:users, 'groups:admin').to_return([
{
"id" => "adam",
"comment" => "Adam Administrator",
"groups" => [
"admin"
],
"ssh_keys" => [],
"shell" => "/bin/bash"
}
])
stub_search(:users, 'groups:admin').to_return([
data_bag_item("users", "adam")
])
We have been using this a bit internally when running our cookbooks in
'development' mode, i.e. in Vagrant.
--
Seth Chisamore
Software Development Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo
[0] -
https://github.com/fnichol/searchef
[1] -
https://github.com/fnichol/chef-searchef
Archive powered by MHonArc 2.6.16.