[chef] Re: Re: Re: Re: chef-solo runs break on server searches


Chronological Thread 
  • From: Guy Matz < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: chef-solo runs break on server searches
  • Date: Mon, 13 Jan 2014 17:08:22 -0500

Yeah, I think this is exactly what I was looking for!

Thanks for the pointer!


On Mon, Jan 13, 2014 at 4:48 PM, Daniel DeLeo < " target="_blank"> > wrote:
local mode is an option for chef-client, it spins up a chef-zero server in the background so there’s no communication to an outside chef-server.

-- 
Daniel DeLeo

On Monday, January 13, 2014 at 1:39 PM, Guy Matz wrote:

Thanks!  There doesn't seem to be a local-mode for my chef-solo:

keys]$ sudo -E chef-solo --help
Usage: /usr/bin/chef-solo (options)
    -f, --[no-]fork                  Fork client
        --[no-]color                 Use colored output, defaults to enabled
    -c, --config CONFIG              The configuration file to use
    -d, --daemonize                  Daemonize the process
    -E, --environment ENVIRONMENT    Set the Chef Environment on the node
        --force-formatter            Use formatter output instead of logger output
        --force-logger               Use logger output instead of formatter output
    -F, --format FORMATTER           output format to use
    -g, --group GROUP                Group to set privilege to
    -i, --interval SECONDS           Run chef-client periodically, in seconds
    -j JSON_ATTRIBS,                 Load attributes from a JSON file or URL
        --json-attributes
    -l, --log_level LEVEL            Set the log level (debug, info, warn, error, fatal)
    -L, --logfile LOGLOCATION        Set the log file location, defaults to STDOUT
    -N, --node-name NODE_NAME        The node name for this client
    -o RunlistItem,RunlistItem...,   Replace current run list with specified items
        --override-runlist
    -r, --recipe-url RECIPE_URL      Pull down a remote gzipped tarball of recipes and untar it to the cookbook cache.
    -s, --splay SECONDS              The splay time for running at intervals, in seconds
    -u, --user USER                  User to set privilege to
    -v, --version                    Show chef version
    -W, --why-run                    Enable whyrun mode
    -h, --help                       Show this message
keys]$ chef-solo --version
Chef: 11.8.2



On Mon, Jan 13, 2014 at 4:12 PM, Ranjib Dey < " target="_blank"> > wrote:
have you looked at --local-mode ? . I am not up to date, but i can recall this being discussed on the mailing lists, so it might be already there.

i can think of following:

1) write a library that exposes a custom search method (say x_search) that uses chef api to do searching. include this in chef recipes. you have to drop additional client cert for the x_search library.

2) use chef zero to upload the searchable data and then search against it. (this will be considerably slow, as you are spawning the chef zero server on demand).  you have to sort out how to distribute the search data., you'll need a wrapper library here as well. ..but this will allow you to grab data, upload it in chef-zero and search against it.


cheers
ranjib





On Mon, Jan 13, 2014 at 12:57 PM, Guy Matz < " target="_blank"> > wrote:
Hi!  Anyone know of a way to get ch-solo to work when a chef cookbook does a earch on the server?  Is it possible to have a chef-solo run use cookbooks locally, but run it's searches on the server?  Is it possible to download the data as a json file and point search queries at that?

Any thoughts/recommendations are appreciated!!

Thanks a lot,
Guy







Archive powered by MHonArc 2.6.16.

§