如何将 Chef Server 中的更改引入本地存储库?

发布于 2024-11-14 20:16:43 字数 273 浏览 6 评论 0原文

因此,我们首次在 Opscode 平台上设置 Chef 来管理重要的集群部署。我们设置了客户端、将完整的 Chef-repo 签入 Git 的开发环境等。Knife 非常适合将内容从存储库上传到服务器。

Chef 管理控制台有点不错。它可以让您在线编辑几乎所有内容。但问题就在这里:我们已经在线进行了更改,但不知道如何将它们下载回本地存储库,以便可以将它们签入源代码管理。

我们是否缺少一个刀命令?或者任何其他可重复的方法来执行此操作,无需编写脚本来列出每个角色和环境并将它们通过管道传输到文件中?

So we're setting up Chef on the Opscode platform for the first time to manage a significant cluster deployment. We have the client set up, the development environment with a full chef-repo checked into Git, etc. Knife works great for uploading things from the repo into the server.

The Chef management console is sort of nice. It lets you edit almost anything online. But therein lies the problem: we've made changes online, and can't figure out how to download them back down into the local repository so that they can be checked into source control.

Is there a knife command we're missing? Or any other repeatable way to do this, short of writing a script to list each role and environment and pipe them into files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

强者自强 2024-11-21 20:16:44

您可能还想查看这篇文章。我面临着类似的问题。

使用 Knife 从 ChefServer 下载角色和食谱

you might also want to check out this post. I was facing a similar problem.

download roles and cookbooks from ChefServer with knife

煞人兵器 2024-11-21 20:16:44

knife download [PATTERN...](选项)

示例全部取自我上面链接到的文档页面。

下载整个厨师存储库:

knife download /

下载食谱(目录):

knife download Cookbooks

下载环境(目录):

knife downloadenvironments

knife download [PATTERN...] (options)

Examples are all taken from the doc page to which I linked above.

Download the entire chef repo:

knife download /

Download cookbooks (directory):

knife download cookbooks

Download environments (directory):

knife download environments

梦里南柯 2024-11-21 20:16:43

不确定您是否仍在寻找这个,但此存储库中有一个备份插件:

https://github .com/stevendanna/knife-hacks

我用它来将我们的服务器转储到我们的存储库中。

Not sure if you are still looking for this, but there is a backup plugin in this repo:

https://github.com/stevendanna/knife-hacks

which I've used to dump our server into our repository.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文