edelight / chef-solo-search

Data bag search for Chef Solo
Apache License 2.0
177 stars 2 forks source link

documentation help #8

Closed coldclimate closed 10 years ago

coldclimate commented 12 years ago

I'm a newbie to using Chef (in Vagrant as it happens) but it would be really helpful if you could explain/expand "In order to use this extension, create a (dummy-) cookbook and add a directory called libraries. Next copy libraries/search.rb to the newly created directory."

tobami commented 12 years ago

Fair enough. The explanation could be more clear.

coldclimate commented 12 years ago

I should probably fork and fix :D

tobami commented 12 years ago

That'd be awesome :+1:

anentropic commented 12 years ago

there's also another file in this repo parser.rb ...should that be copied to the libraries/ dir of my dummy cookbook too?

presumably it has to go somewhere...

leonid-shevtsov commented 12 years ago

Speaking of dependencies, the query parser uses the Treetop gem. Shouldn't it also be listed in the requirements?

amccloud commented 11 years ago

Can someone clarify what "create a (dummy-) cookbook" means?

anentropic commented 11 years ago

I think it just means create a new folder in your cookbooks path

amccloud commented 11 years ago

I've tried that but I'm still getting

[2012-12-30T22:16:19+00:00] WARN: This recipe uses search. Chef Solo does not support search.

I even tried making it a fake cookbook by adding a blank default recipe:

[2012-12-30T22:16:16+00:00] INFO: * Chef 10.14.4 * [2012-12-30T22:16:18+00:00] INFO: Setting the run_list to ["recipe[solo-search]", "recipe[users::sysadmin]"] from JSON ... [2012-12-30T22:16:19+00:00] WARN: This recipe uses search. Chef Solo does not support search.

tobami commented 11 years ago

@amccloud means you create a cookbook directory with any name. Full example:

  1. Create an empty cookbooks/chef_solo_search_lib
  2. Create cookbooks/chef_solo_search_lib/libraries
  3. Copy search.rb and parser.rb to the libraries directory
amccloud commented 11 years ago

@tobami Would cloning this repository into my cookbooks directory suffice?

$ cd cookbooks
$ git clone https://github.com/edelight/chef-solo-search.git solo-search
$ ls -l
drwxr-xr-x   2 amccloud  staff   68 Jan  2 10:25 nginx
drwxr-xr-x  10 amccloud  staff  340 Jan  2 10:24 solo-search

$ ls -l solo-search/libraries
-rw-r--r--   1 amccloud  staff  5567 Jan  2 10:24 parser.rb
-rw-r--r--   1 amccloud  staff  3811 Jan  2 10:24 search.rb
tobami commented 11 years ago

@amccloud it should! doesn't it?

tbassett22030 commented 11 years ago

Hi. When I use this, I am getting the below exception. Any thoughts on why? I have both a data_bags directory and a roles directory.

[Fri, 25 Jan 2013 16:05:35 -0500] FATAL: Chef::Exceptions::InvalidDataBagName: D ataBags must have a name matching /^[-[:alnum:]_]+$/, you gave "node[machinename]"

anentropic commented 11 years ago

@tbassett22030 it's telling you the name can only have alphanumeric, hyphen and underscore chars in it

looks like you have quotes around node[*machinename*] where you really want to use the value of that attribute?

gregkare commented 11 years ago

I don't understand why the instructions say to create a dummy cookbook and copy files (especially now, libraries/parser.rb and libraries/search.rb have been moved). It should just say to install the chef-solo-search cookbook using your preferred tool.

michaelglass commented 10 years ago

believe this is fixed.