- From: Liam Kirsher <
>
- To: "
" <
>
- Subject: [chef] chef-solo-search not working
- Date: Fri, 08 Aug 2014 14:24:48 -0700
- Openpgp: id=7011F7B7; url=http://liam.numenet.com/pgp/
Hi --
Any ideas on this one? It used to work. I know there were some
changes going from Chef 10 to 11, so I suspect it has something to
do with that. For testing I added chef-solo-search to the dna.json
file
{"run_list":
["recipe[chef-solo-search]","role[slave]"] }
But it was already in the recipe metatdata.rb file as a dependency.
if Chef::Config[:solo]
37: # This is using chef-solo-search, which looks in data
bag node/master.json
38: master_node = search(:node, 'name:master').first
39: if master_node.nil?
40>> raise "Master node not found!"
41: end
The solo.rb file has
base = File.expand_path('..', __FILE__)
nodes_path File.join(base, 'nodes')
role_path File.join(base, 'roles')
data_bag_path File.join(base, 'data_bags')
encrypted_data_bag_secret File.join(base, 'data_bag_key')
environment_path File.join(base, 'environments')
environment "_default"
cookbook_path []
cookbook_path << File.join(base, 'cookbooks-1') #
/home/liam/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1/gems/knife-solo-0.4.0/lib/knife-solo/resources/patch_cookbooks
cookbook_path << File.join(base, 'cookbooks-2') #
/home/liam/Documents/Client/chef-repo/cookbooks
cookbook_path << File.join(base, 'cookbooks-3') #
/home/liam/Documents/Client/chef-repo/site-cookbooks
The <base>/data_bags/ directory:
data_bags/node:
master.json
The master.json file
{
"id": "master",
"name": "master",
"chef_environment": "_default",
"json_class": "Chef::Node",
"normal": {
},
"chef_type": "node",
<snip>
So,
--
Liam Kirsher
PGP: http://liam.numenet.com/pgp/
|
- [chef] chef-solo-search not working, Liam Kirsher, 08/08/2014
Archive powered by MHonArc 2.6.16.