I am a newbie for Chef. After installing, the document prompt me to clone a chef repository from git. I am wondering what’s the purpose of chef repository. If I only need to use it as a chef client.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The chef repository gives structure to organizing all the artifacts (cookbooks, recipes, roles, etc.) that are used with chef to describe and ultimately configure your infrastructure. The repository is needed at development time when you create your own cookbooks, modify existing ones and upload them to your chef server. Think of the repository as a workspace for implementing your infrastructure as code.
The chef documentation refers to a development machine as a chef workstation. A workstation has one or more repositories for managing the infrastructure artifacts and the knife tool to interact with a chef server.
The repository and knife are not needed on a regular node that is managed by chef. That’s where the chef client is all that’s needed. Conversely, a workstation is used to manage chef. The repository and knife are tools for that.
Some things like roles and databags that you can work on in a repository you could also define with the chef server web UI, but then you’d not have a version controlled history of your work. For cookbooks, even if you don’t need to modify any, you still need to upload them to the server from a repository using knife.
See the chef wiki for more information: workstation, repository, knife.