Berkshelf do support multiple cookbooks.
I've experience in managing more than 30 cookbooks in same berkshelf.
Berks can refer cookbooks from local path, git path, github sources and community cookbooks from Chef super market.
Update
Lets take the example of the scenario mentioned in the query. Please carry out the below steps,
- You need to create a project repository with your cookbooks and other stuff.
- Project repo is nothing but a directory containing other directories for Roles, Databags, Cookbooks and Environments.
- Place your cookbooks inside
cookbooks directory.
- Create a
Berksfile in the root of the repo.
Berksfile uses berkshelf. Install latest berkshelf version using gem install berkshelf (I would prefer using bundle install)
Example content of Berksfile
source "https://supermarket.chef.io"
# Mention community cookbooks used, if any
cookbook 'community_cookbook_name'
# Mention cookbook names from your repo
%w(my_cookbook_name_1 my_cookbook_name_2).each do | cookbook_name |
cookbook cookbook_name, path: 'cookbooks/' + cookbook_name
end
Please try the above steps and let me know if it's solved your purpose.
- In case, if you want to upload the content, follow the steps below,
- Create a directory ".chef" inside the project repository
- Copy your Chef server knife/pem files into .chef
Run the command mentioned below from inside the project repo.
berks upload
Your cookbooks will be uploaded to Chef server using the command.
You can use knife upload data_bags and knife upload roles, to upload your databags and roles from the repo.