I am a beginner on chef and want to automate deployment process. To test a simple script, I have downloaded chefdk. I have created repositories, cookbooks and recipies. Now, I want to run a recipe, I am using the following command:
chef-client -z -r 'recipe[example::default]'
This command works fine whenever executed from inside the ../repository/ directory. However, when I try to execute it from outside that directory, it fails saying it is unable to find the cookbook.
From the documentation (which hasn't helped much, to be honest) I found that we can configure cookbook path in knife.rb file, but in my case, there is no such file (as I am just trying to run chef client locally). Is there any other way to pass cookbook path at runtime, along with chef-client command?