I have 2 roles, base role has:
run_list “recipe[build-essential]”, “recipe[ohai]”, “recipe[runit]”,
“recipe[openssl]”, “recipe[git]”
webserver role has:
run_list “reciple[nginx]”
So running chef-solo the 1st time worked fine:
chef-solo -j chef.json -c config/solo.rb
Running it again (after 5 minutes) I get:
[Sun, 15 Apr 2012 19:54:41 +0000] INFO: *** Chef 0.10.8 ***
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Setting the run_list to
[“role[base]”, “role[webserver]”] from JSON
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Run List is [role[base],
role[webserver]]
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Run List expands to
[build-essential, ohai, runit, openssl, git, nginx]
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Starting Chef Run for
ip-10-114-78-50.ec2.internal
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Running start handlers
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Start handlers complete.
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Missing gem ‘mysql’
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: ohai plugins will be at:
/etc/chef/ohai_plugins
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Processing
remote_directory[/etc/chef/ohai_plugins] action create (ohai::default line
23)
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Processing
cookbook_file[/etc/chef/ohai_plugins/README] action create (dynamically
defined)
[Sun, 15 Apr 2012 19:54:42 +0000] INFO: Processing
cookbook_file[/etc/chef/ohai_plugins/._README] action create (dynamically
defined)
[Sun, 15 Apr 2012 19:54:42 +0000] ERROR: Running exception handlers
[Sun, 15 Apr 2012 19:54:42 +0000] ERROR: Exception handlers complete
[Sun, 15 Apr 2012 19:54:42 +0000] FATAL: Stacktrace dumped to
/home/ubuntu/chef/chef-stacktrace.out
[Sun, 15 Apr 2012 19:54:42 +0000] FATAL: Errno::ENOENT: No such file or
directory - config/solo.rb
stacktrace.out:
Errno::ENOENT: No such file or directory - config/solo.rb
/home/ubuntu/chef/cookbooks/ohai/recipes/default.rb:37:in read' /home/ubuntu/chef/cookbooks/ohai/recipes/default.rb:37:in
from_file’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/cookbook_version.rb:578:in
load_recipe' /var/lib/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:40:in
include_recipe’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/mixin/language_include_recipe.rb:27:in
each' /var/lib/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in
include_recipe’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/run_context.rb:72:in
load' /var/lib/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:69:in
each’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/run_context.rb:69:in
load' /var/lib/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:195:in
setup_run_context’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/client.rb:159:in run' /var/lib/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/solo.rb:192:in
run_application’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/application/solo.rb:183:in
loop' /var/lib/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/solo.rb:183:in
run_application’
/var/lib/gems/1.8/gems/chef-0.10.8/bin/…/lib/chef/application.rb:67:in
run' /var/lib/gems/1.8/gems/chef-0.10.8/bin/chef-solo:25 /var/lib/gems/1.8/bin/chef-solo:19:in
load’
Why is it having issues locating my config/solo.rb file?
solo.rb has:
home_dir = File.expand_path(File.dirname(FILE) + “/…”)
file_cache_path home_dir
cookbook_path [ “#{home_dir}/cookbooks” ]
role_path “#{home_dir}/roles”