Skip to content

Fewbytes/chef-lightweight-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Description

This cookbook is deprecated in favor of partial_search introduced in chef 11 API

LightWeight search is a wrapper library around Chef's built-in search which casts node objects to memory efficient "Lightweight Node" objects. The LightWeightNode object contains a subset of the original node object attribute and pre-merges attributes to save RAM. This is handy when you have recipes performing searches with a big result set.

This cookbooks will only help with chef-client RAM consumption. Fixing the server side of the search will require changes to the API.

The amount of RAM saved varies wildly due to Ruby's GC. This really should be fixed on the server side.

Usage

In your recipes, use lightweight_node_search function instead of search. Function signature:


lightweight_node_search(query, whitelist)
  • query - The search query
  • whitelist - attributes to include in the lightweight node object. This can be an array or a (nested) hash of arrays/strings/symbols

About

Lightweight search for Chef

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages