<p>No, it is not, the chef-repo is the legacy way back to chef 10.</p>

<p>Knife allows working on multiples directory with the -o option. Berks work from current directory.</p>

<p>You can also work around the default .chef directory by using the <code>KNIFE_HOME</code> environment variable too. </p>

<p>The current recomendations is indeed a repo per cookbook (or alongside another app) </p>

CC BY-SA 3.0
2017-09-14T17:00:20.587Z
But there is still a [page about it in the docs](https://docs.chef.io/chef_repo.html). Am I reading the right docs? Also, by any change, maybe you know, if I use [Vagrant and Chef Zero](https://www.vagrantup.com/docs/provisioning/chef_zero.html) to manually test my cookbooks, how do I manage [data bags](https://www.vagrantup.com/docs/provisioning/chef_zero.html#data_bags_path), [cookbooks](https://www.vagrantup.com/docs/provisioning/chef_zero.html#cookbooks_path) and other policies then?
madhead
CC BY-SA 3.0
2017-09-14T17:50:53.350Z
The docs are not always up to date, I'm afraid the way to manage things would be better discussed on chef's slack btw
Tensibai
CC BY-SA 3.0
2017-09-14T18:01:34.967Z
@madhead I just realized I had forgot a point, I've updated the answer and the slack channel join page is here http://community-slack.chef.io (please forgive the formatting, I'm on phone)
Tensibai
CC BY-SA 3.0
2017-09-14T18:23:10.713Z
Man, you've answered almost all the question I had recently. I understood more about Chef then in previous year. Thanks for that!
madhead
CC BY-SA 3.0
2017-09-14T18:37:16.217Z
@madhead feel free to join the slack channel, I'm there too but there's people far more advanced than me and some folks from Chef company also who are really helpful :)
Tensibai
CC BY-SA 3.0
2017-09-14T16:11:20.080Z
2017-09-14T17:59:42.860Z
2017-09-14T17:59:42.860Z
Tensibai
<p>Is it 100% required to store all the cookbooks under <code>chef-repo</code>? This seems a little bit inconvenient for me, I'd prefer to store solution cookbooks in the application codebase, or just as a standalone git repos.</p>

<p>I know that tools like <code>knife</code> rely on configuration files to be present in <code>.chef</code>, and it frustrates me a little bit too.</p>

<chef><repository>
Organizing Chef cookbooks
madhead
# Organizing Chef cookbooks

(Asked by: username_0 on 2017-09-14)

Is it 100% required to store all the cookbooks under `chef-repo`? This seems a little bit inconvenient for me, I'd prefer to store solution cookbooks in the application codebase, or just as a standalone git repos.

I know that tools like `knife` rely on configuration files to be present in `.chef`, and it frustrates me a little bit too.

**Tags:** chef, repository


---

## 1 answers

### Answer by username_1 on 2017-09-14. Score: 5 | Accepted answer

No, it is not, the chef-repo is the legacy way back to chef 10.

Knife allows working on multiples directory with the -o option. Berks work from current directory.

You can also work around the default .chef directory by using the `KNIFE_HOME` environment variable too.

The current recomendations is indeed a repo per cookbook (or alongside another app)

> **Comments:**
> **username_0**: But there is still a [page about it in the docs](https://docs.chef.io/chef_repo.html). Am I reading the right docs? Also, by any change, maybe you know, if I use [Vagrant and Chef Zero](https://www.vagrantup.com/docs/provisioning/chef_zero.html) to manually test my cookbooks, how do I manage [data bags](https://www.vagrantup.com/docs/provisioning/chef_zero.html#data_bags_path), [cookbooks](https://www.vagrantup.com/docs/provisioning/chef_zero.html#cookbooks_path) and other policies then?  
> **username_1**: The docs are not always up to date, I'm afraid the way to manage things would be better discussed on chef's slack btw  
> **username_1**: @username_0 I just realized I had forgot a point, I've updated the answer and the slack channel join page is here http://community-slack.chef.io (please forgive the formatting, I'm on phone)  
> **username_0**: Man, you've answered almost all the question I had recently. I understood more about Chef then in previous year. Thanks for that!  
> **username_1**: @username_0 feel free to join the slack channel, I'm there too but there's people far more advanced than me and some folks from Chef company also who are really helpful :)  

---

