# Rails deployment scenarios - capistrano vs application cookbook

**URL:** <https://discourse.chef.io/t/rails-deployment-scenarios-capistrano-vs-application-cookbook/2449>\
**Category:** Chef Infra (archive)\
**Created:** [February 13, 2012, 5:30pm UTC](https://discourse.chef.io/t/rails-deployment-scenarios-capistrano-vs-application-cookbook/2449 "2012-02-13T17:30:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Richards](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ryan_richards/32/745_2.png) [@Ryan\_Richards](https://discourse.chef.io/u/Ryan_Richards)\
**Post date:** [February 13, 2012, 5:30pm UTC](https://discourse.chef.io/t/rails-deployment-scenarios-capistrano-vs-application-cookbook/2449/1 "2012-02-13T17:30:09Z")

</div>

Hello chefs:

Ive been using chef for some time but have yet to use the application cookbook and the deployment resource. Most of the applications i work with are ruby on rails. Traditionally capistrano is the deployment tool of choice but it seems that if you already use chef for managing infrastructure, the ‘application’ cookbook would be good to have in the toolbox.

Im currently working on a project where we use capistrano and the opscode platform. We are starting to cross the boundaries between typical development activities and actions that could benefit from some of the chef ‘intelligence’. Are there many rails apps that use application and chef-deploy to replace capistrano? (i believe you need both resources?)

thanks for any insight  
Ryan

---

<div class="post-metadata">

**Author:** ![Max\_Gorbul](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/max_gorbul/32/665_2.png) [@Max\_Gorbul](https://discourse.chef.io/u/Max_Gorbul)\
**Post date:** [February 13, 2012, 5:44pm UTC](https://discourse.chef.io/t/rails-deployment-scenarios-capistrano-vs-application-cookbook/2449/2 "2012-02-13T17:44:10Z")

</div>

We have chef-client running every 30 minutes. But sometimes deployment need  
to be executed earlier then in 30 minutes. So we use chef/capistrano  
deployment.  
basically cap deploy:setup and some configuration which depends on the  
infrastructure (database, redis etc.) are deployed and managed by chef. The  
code itself is deployed from git repo by capistrano. There is a deployer  
host which holds all the projects and user who is able to run cap deploy  
form there in order to deploy to prod env (regular developers do not have  
access to prod).  
There is a monitor running which checks repo changes or CI successful  
builds every minute and triggers deployment job as soon as one of those  
changes happens.

--max

On Mon, Feb 13, 2012 at 9:30 AM, Ryan Richards [abstractryan@gmail.com](mailto:abstractryan@gmail.com)wrote:

> Hello chefs:
> 
> Ive been using chef for some time but have yet to use the application  
> cookbook and the deployment resource. Most of the applications i work with  
> are ruby on rails. Traditionally capistrano is the deployment tool of  
> choice but it seems that if you already use chef for managing  
> infrastructure, the 'application' cookbook would be good to have in the  
> toolbox.
> 
> Im currently working on a project where we use capistrano and the opscode  
> platform. We are starting to cross the boundaries between typical  
> development activities and actions that could benefit from some of the chef  
> 'intelligence'. Are there many rails apps that use application and  
> chef-deploy to replace capistrano? (i believe you need both resources?)
> 
> thanks for any insight  
> Ryan

---

<div class="post-metadata">

**Author:** ![Ranjib\_Dey](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@Ranjib\_Dey](https://discourse.chef.io/u/Ranjib_Dey)\
**Post date:** [February 13, 2012, 6:18pm UTC](https://discourse.chef.io/t/rails-deployment-scenarios-capistrano-vs-application-cookbook/2449/3 "2012-02-13T18:18:26Z")

</div>

i have worked on several rails project , and used chef deploy resource for  
deployment and mcollective to do realtime orchestration  
On Feb 13, 2012 11:14 PM, "Max Gorbul" [max@gorbul.net](mailto:max@gorbul.net) wrote:

> We have chef-client running every 30 minutes. But sometimes deployment  
> need to be executed earlier then in 30 minutes. So we use chef/capistrano  
> deployment.  
> basically cap deploy:setup and some configuration which depends on the  
> infrastructure (database, redis etc.) are deployed and managed by chef. The  
> code itself is deployed from git repo by capistrano. There is a deployer  
> host which holds all the projects and user who is able to run cap deploy  
> form there in order to deploy to prod env (regular developers do not have  
> access to prod).  
> There is a monitor running which checks repo changes or CI successful  
> builds every minute and triggers deployment job as soon as one of those  
> changes happens.
> 
> --max
> 
> On Mon, Feb 13, 2012 at 9:30 AM, Ryan Richards [abstractryan@gmail.com](mailto:abstractryan@gmail.com)wrote:
> 
> > Hello chefs:
> > 
> > Ive been using chef for some time but have yet to use the application  
> > cookbook and the deployment resource. Most of the applications i work with  
> > are ruby on rails. Traditionally capistrano is the deployment tool of  
> > choice but it seems that if you already use chef for managing  
> > infrastructure, the 'application' cookbook would be good to have in the  
> > toolbox.
> > 
> > Im currently working on a project where we use capistrano and the opscode  
> > platform. We are starting to cross the boundaries between typical  
> > development activities and actions that could benefit from some of the chef  
> > 'intelligence'. Are there many rails apps that use application and  
> > chef-deploy to replace capistrano? (i believe you need both resources?)
> > 
> > thanks for any insight  
> > Ryan
