厨师的部署? [英] chef deployment?

查看:130
本文介绍了厨师的部署?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的是从Capistrano的切换到厨师,但我有把所有的拼在一起的几个问题。

I'm interested in switching from Capistrano to Chef, but am having a few issues putting all the pieces together.

我已经按照 HTTP://wiki.ops$c$ c.com/display/chef/Quick+Start 和我能够启动EC2实例与。至于code部署,它看起来好像我想要做什么是在的 HTTP://wiki.ops$c$c.com/display/chef/Deploy+Resource ,唯一的问题是,无处该网页上未提及在什么目录/文件部署 /到/路径 code座应该去。

I've followed http://wiki.opscode.com/display/chef/Quick+Start and am able to start EC2 instances with knife. As far as code deployment, it looks as though I want to be doing what's in http://wiki.opscode.com/display/chef/Deploy+Resource, the only problem is, nowhere on that page does it mention in what directory/file the deploy /to/path code block should go.

另一个问题,我有是了解如何在服务器已经设置了部署code的变化。也许我只是用我目前的工作流程(混帐推&功放;&安培;帽部署),但最好的,我可以告诉的是,在我提交我的变化,我应该ssh到服务器并运行 sudo的厨师客户端?一些事情,感觉错了。有没有上限相同,即厨师部署

Another issue I'm having is understanding how to deploy code changes after the server has been set up. Perhaps I'm just used to my current 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?

最后(也许这是有点难度),我期待到多个Rails应用部署到一台服务器。这似乎谨慎地保持某种每个应用程序中描述其部署的详情回购厨师的配置文件,但我不确定如何将随后与厨师回购/托管的服务器进行交互。将每个应用程序是一个角色?而从我对事物的工作方式的理解,我也有点不安的想法,厨师客户端会尝试部署时,所有的应用程序运行。随着混帐推&功放;&安培;帽部署我敢肯定的就是我部署。而其他的一些应用程序回购可能无法在一个可部署状态。会不会有一种方法来部署这个集合起来只是一个单一的应用程序?

Finally (and perhaps this is a bit more difficult), I'm looking to deploy multiple rails apps to a single server. It seems prudent to keep some sort of chef config file in the repo of each app describing the particulars of its deployment, but I'm uncertain how that would then interact with the chef-repo / hosted server. Would each app be a role? And from my understanding of the way things work, I'm also a little uneasy with the idea that 'chef-client' would be trying to deploy all applications when run. With git push && cap deploy I'm certain of what I'm deploying. Whereas some of the other application repos might not be in a deployable state. Would there be a way to deploy just a single app in this set up?

推荐答案

那么刀其实是能够做Capistrano的式的任务 - 具体而言,运行在多个服务器的指令

So knife is actually capable of doing capistrano-esque tasks - specifically, running a command across multiple servers.

要部署应用程序到您的所有应用服务器,假设你遵循了OPS code rails应用菜谱的路径,你可以只做到以下几点:

To deploy your app to all of your app servers, assuming you followed the opscode rails application cookbook path, you could just do the following:

knife ssh role:t<appserver-role> chef-client -xroot -P<pass>

这将运行厨师客户端上以root所有的应用服务器。它采用的厨师搜索API找到所有与该角色,并运行在他们指挥节点。

That will run chef-client as root on all of your app servers. It uses chef search API to find all the nodes with that role and run that command on them.

这是pretty的强大。

It's pretty powerful.

这篇关于厨师的部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆