title: What's the difference between chef app and chef repo
body: <p>I found there are 2 ways to generate chef repo, and be confused by their similarity. I wonder which one is the recommended way, and why chef provide those commands. Maybe they are used in different context?</p>
  
  <pre><code>$ chef generate app chef-app
  $ chef generate repo chef-repo
  $ diff chef-app chef-repo | colordiff
  Only in chef-app: .git
  diff chef-app/.gitignore chef-repo/.gitignore
  1,8c1
  &lt; .vagrant
  &lt; Berksfile.lock
  &lt; *~
  &lt; *#
  &lt; .#*
  &lt; \#*#
  &lt; .*.sw[a-z]
  &lt; *.un~
  ---
  &gt; .rake_test_cache
  10,16c3,7
  &lt; # Bundler
  &lt; Gemfile.lock
  &lt; bin/*
  &lt; .bundle/*
  &lt;
  &lt; .kitchen/
  &lt; .kitchen.local.yml
  ---
  &gt; ###
  &gt; # Ignore Chef key files and secrets
  &gt; ###
  &gt; .chef/*.pem
  &gt; .chef/encrypted_data_bag_secret
  Only in chef-app: .kitchen.yml
  Only in chef-repo: LICENSE
  diff chef-app/README.md chef-repo/README.md
  1c1,2
  &lt; # chef-app
  ---
  &gt; Overview
  &gt; ========
  3c4
  &lt; TODO: Enter the cookbook description here.
  ---
  &gt; Every Chef installation needs a Chef Repository. This is the place where cookbooks, roles, config files and other artifacts for managing systems with Chef will live. We strongly recommend storing this repository in a version control system such as Git and treat it like source code.
  4a6,66
  &gt; While we prefer Git, and make this repository available via GitHub, you are welcome to download a tar or zip archive and use your favorite version control system to manage the code.
  &gt;
  &gt; Repository Directories
  &gt; ======================
  &gt;
  &gt; This repository contains several directories, and each directory contains a README file that describes what it is for in greater detail, and how to use it for managing your systems with Chef.
  &gt;
  &gt; * `certificates/` - SSL certificates generated by `rake ssl_cert` live here.
  &gt; * `config/` - Contains the Rake configuration file, `rake.rb`.
  &gt; * `cookbooks/` - Cookbooks you download or create.
  &gt; * `data_bags/` - Store data bags and items in .json in the repository.
  &gt; * `roles/` - Store roles in .rb or .json in the repository.
  &gt;
  &gt; Rake Tasks
  &gt; ==========
  &gt;
  &gt; The repository contains a `Rakefile` that includes tasks that are installed with the Chef libraries. To view the tasks available with in the repository with a brief description, run `rake -T`.
  &gt;
  &gt; The default task (`default`) is run when executing `rake` with no arguments. It will call the task `test_cookbooks`.
  &gt;
  &gt; The following tasks are not directly replaced by knife sub-commands.
  &gt;
  &gt; * `bundle_cookbook[cookbook]` - Creates cookbook tarballs in the `pkgs/` dir.
  &gt; * `install` - Calls `update`, `roles` and `upload_cookbooks` Rake tasks.
  &gt; * `ssl_cert` - Create self-signed SSL certificates in `certificates/` dir.
  &gt; * `update` - Update the repository from source control server, understands git and svn.
  &gt;
  &gt; The following tasks duplicate functionality from knife and may be removed in a future version of Chef.
  &gt;
  &gt; * `metadata` - replaced by `knife cookbook metadata -a`.
  &gt; * `new_cookbook` - replaced by `knife cookbook create`.
  &gt; * `role[role_name]` - replaced by `knife role from file`.
  &gt; * `roles` - iterates over the roles and uploads with `knife role from file`.
  &gt; * `test_cookbooks` - replaced by `knife cookbook test -a`.
  &gt; * `test_cookbook[cookbook]` - replaced by `knife cookbook test COOKBOOK`.
  &gt; * `upload_cookbooks` - replaced by `knife cookbook upload -a`.
  &gt; * `upload_cookbook[cookbook]` - replaced by `knife cookbook upload COOKBOOK`.
  &gt;
  &gt; Configuration
  &gt; =============
  &gt;
  &gt; The repository uses two configuration files.
  &gt;
  &gt; * config/rake.rb
  &gt; * .chef/knife.rb
  &gt;
  &gt; The first, `config/rake.rb` configures the Rakefile in two sections.
  &gt;
  &gt; * Constants used in the `ssl_cert` task for creating the certificates.
  &gt; * Constants that set the directory locations used in various tasks.
  &gt;
  &gt; If you use the `ssl_cert` task, change the values in the `config/rake.rb` file appropriately. These values were also used in the `new_cookbook` task, but that task is replaced by the `knife cookbook create` command which can be configured below.
  &gt;
  &gt; The second config file, `.chef/knife.rb` is a repository specific configuration file for knife. If you're using the Opscode Platform, you can download one for your organization from the management console. If you're using the Open Source Chef Server, you can generate a new one with `knife configure`. For more information about configuring Knife, see the Knife documentation.
  &gt;
  &gt; http://docs.opscode.com/knife.html
  &gt;
  &gt; Next Steps
  &gt; ==========
  &gt;
  &gt; Read the README file in each of the subdirectories for more information about what goes in those directories.
  Only in chef-repo: Rakefile
  Only in chef-repo: certificates
  Only in chef-repo: chefignore
  Only in chef-repo: config
  Common subdirectories: chef-app/cookbooks and chef-repo/cookbooks
  Only in chef-repo: data_bags
  Only in chef-repo: environments
  Only in chef-repo: roles
  </code></pre>