如何使用厨师的部署资源来部署更改?

发布于 2024-11-27 22:05:17 字数 396 浏览 4 评论 0 原文

我在 chef 部署? 上还有另一个问题,范围可能有点太宽泛了。所以我会在这里问一个更具体的问题:

如何使用厨师的 Deploy 部署代码更改服务器设置后的资源。也许我只是习惯了当前的 capistrano 工作流程(“git push && cap deploy”)...但我能说的最好的是,在我提交更改后,我应该 ssh 进入服务器并运行“须藤厨师-客户”?感觉有些不对劲。是否没有相当于“厨师部署”的上限?

I've got another question at chef deployment? that is perhaps a little too broad in scope. so i'll ask a more specific question here:

how do i deploy code changes with chef's Deploy Resource after the server has been set up. perhaps i'm just used to my current capistrano workflow ("git push && cap deploy") ... but the best i can tell is that after i commit my changes i'm supposed to ssh into the server and run "sudo chef-client"? something about that feels wrong. is there no cap equivalent, i.e. "chef deploy"?

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

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

发布评论

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

评论(1

帥小哥 2024-12-04 22:05:17

如果您使用的是 Chef 服务器,则可以使用 knife ssh 搜索要通过 SSH 访问的节点子集并运行 Chef 客户端。

% knife ssh "role:my_app" "sudo chef-client"

您还可以将 Chef Client 作为守护程序或 cron 作业按一定时间间隔运行。您可能对 chef-client应用程序 食谱。

If you're using a Chef Server, you can use knife ssh to search for a subset of nodes to SSH to and run Chef Client.

% knife ssh "role:my_app" "sudo chef-client"

You can also run Chef Client on an interval as a daemon, or a cron job. You may be interested in the chef-client and application cookbooks by Opscode for these topics.

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