Browse the Ruby on Rails Community.

You are here: Forums General Discussion Help w/ a Capistrano Deploymen...

Replytotopic

Help w/ a Capistrano Deployment Strategy!

Posted in Forums : General Discussion

 
Profile

Authority 25
Posting Rating 1
Sign in to rate this post

Being new to Capistrano, I am looking for suggestions on a good capistrano deployment strategy for our needs.

We have a capistrano task to deploy the entire code base as a new release of the application. Works just fine, but in addition we need to be able to frequently (daily, 2-3 days) deploy a set of application files, followed by running a few system commands.

The only requirement is that the server not be restarted. Would we be best served by creating a new capistrano task that deploys the necessary files with the standard setup (current folder linked to the most recent release folder) and then using a symbolic link from within the application (deploy #1) to point to deploy #2’s current?

Any suggestions/comments appreciated.

 
690fb7072e81de37b987598684661f0a

Authority 37
Posting Rating 0
Sign in to rate this post

Another task is the way to go. If the application files are ruby files like models etc you need to restart to load them in otherwise you will get errors. What kind of files are you deploying.

Can l ask why you can’t restart the server? also are you running passenger or ngix?

 
Mahesh_new_image

Authority 37
Posting Rating 94
Sign in to rate this post

Why don’t you restart your server manually through Shell. are you using mongrel ?

 
Ryan

Authority 37
Posting Rating 0
Sign in to rate this post

I could be wrong, but Eric might be referring to data files of some sort and not necessarily code. If this is the case, I’m right there with Michael. Go with a new Capistrano task. That would be the perfect solution in fact, since you can customize each action that is taken by the task.

Another thought about this sorta thing though. If you are indeed talking about periodically moving data into your application, I believe you’d be MUCH better suited with hosting a second application that can serve data through a secure API. That way, you could just have your production Rails app either use a cron job or user interaction to trigger the pulling of data up to your server instead of relying on a regular manual uploading.

Now, if you ARE talking about code, specifically code that would require a restart (such as a model), you definitely should be restarting the server anyway, and I’d say just stick with regular deployments.

 
Profile

Authority 25
Posting Rating 1
Sign in to rate this post

Thanks for the replies. I’ll try to address some of the questions.

The files to be deployed are classes (so code, not data). The code essentially follows the factory pattern, where abstract methods are overwritten. At this point, we are using self.instance_eval to pull in said methods and the classes are registered in a database during the Capistrano task. We considered using Rails’ ability to dynamically load classes, but we warned of memory leak concerns and opted against that choice.

It’s not that we can’t restart the server at deployment, the concern is the frequency at which the server would be being brought down and the impact that might have on our ActiveResource setup (two Rails apps talking to and relying upon one another).

Replytotopic

Other Recent Topics

General Discussion : Hanoi houses, apartments, villas and offices for lease

General Discussion : Sr. Backend ROR Engineer needed in Denver Metro Area.($120k)

General Discussion : Rails Developer($130k) needed in Denver, CO

General Discussion : House’ construction

General Discussion : Looking for full time Rails Web Developer

General Discussion : Free classified Directory (sadiqui999)

General Discussion : Louis Vuitton Damier Ebene brand Canvascheap special offer( www.salecheaplouisvuitton.com )

General Discussion : ROR Development

General Discussion : RoR programmers needed

General Discussion : Required Ruby on Rails Developer

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel