what's the purpose of chef repository?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 03:13:06

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/14662848/whats-the-purpose-of-chef-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!