[chef] Re: Re: Re: Re: Re: Re: searching cookbook versions


Chronological Thread 
  • From: "Julian C. Dunn" < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: searching cookbook versions
  • Date: Fri, 17 Jan 2014 00:42:20 -0500

You may be able to adapt/abuse the cookbook_versions_handler to save the cookbook versions to the node itself where they would be searchable:


- Julian

On Jan 16, 2014, at 8:41 PM, Elvin Abordo < "> > wrote:

heh. ever since i passed 1k nodes. knife ssh doesnt scale very well. 

that is a creative suggestion though. might have to work with that. thanks!

Sent from Mailbox for iPhone


On Thu, Jan 16, 2014 at 8:38 PM, Stephen Delano < " target="_blank"> > wrote:

Aha, well that's a very different problem than searching cookbook data. In that case, you'd want to be searching the node data, but unfortunately the node data doesn't keep track of which versions of which cookbooks ran in the latest run list.

You could probably do something with knife ssh:

knife ssh '*:*' 'sudo grep version /var/chef/cache/cookbooks/COOKBOOK_NAME/metadata.rb'

Not sure if that scales for you though.



On Thu, Jan 16, 2014 at 3:22 PM, Elvin Abordo < "> > wrote:
im trying to figure out what nodes have what version of a cookbook. 

Sent from Mailbox for iPhone


On Thu, Jan 16, 2014 at 5:54 PM, Stephen Delano < "> > wrote:

Like Seth said, cookbook version data is not searchable.

From a use case perspective, what is it about the cookbooks that you'd like to search on? Maybe there's another way of going about the problem you're trying to solve.

For historical reference, the chef server used to index cookbook version information in Solr, but never exposed an API endpoint to search across that data. When the server was ported to Erlang, the cookbook indexing was removed (because it wasn't ever exposed).

-Stephen


On Thu, Jan 16, 2014 at 2:50 PM, Stephen Delano < "> > wrote:
Like Seth said, cookbook version data is not searchable.

From a use case perspective, what is it about the cookbooks that you'd like to search on? Maybe there's another way of going about the problem you're trying to solve.

For historical reference, the chef server used to index cookbook version information in Solr, but never exposed an API endpoint to search across that data. When the server was ported to Erlang, the cookbook indexing was removed (because it wasn't ever exposed).

-Stephen


On Thu, Jan 16, 2014 at 12:37 PM, Seth Falcon < "> > wrote:

"> writes:
> I must be missing something, but i can't seem to find a decent way of
> executing a knife search against a specific version of a cookbook. I've
> tried looking everywhere and can't seem to find anything related.
>
> Anybody have any ideas?

cookbook version data is not indexed and so not searchable.

One simple approach: use `knife download` to obtain a full set of all
cookbook versions (put `versioned_cookbooks true` in your
knife.rb). Then you can grep/ack, etc.

+ seth

--
Seth Falcon | Development Lead | CHEF | http://www.getchef.com/ | @sfalcon




--
Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104




--
Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail




Archive powered by MHonArc 2.6.16.

§