Wasteful? Perhaps. But it's a lot more convenient for everyone involved if you assume that you blast the entire app to all servers. If that bothers you (and it might bother some people, and might even bother them for valid reasons), then you are, of course, welcome to write your own deployment tasks that pick and choose what gets deployed where. Capistrano can make that easy.
As for the :db role: anything in a :db role will be deployed to. Why? Because you might have batch processes that run on your db slave servers (we do). You don't? Well, no worries, then. Just don't define your slaves in your deploy.rb. :)
If your database servers are off-limits, simply define one of your app servers to be :primary => true in the :db role and be done with it. A lot of people do it this way.
I fully acknowledge that questions like these come up because of the lack of documentation for Capistrano. I really, really apologize for that. If I could take the next month off and catch up on all the projects I'm juggling, I'd do it in a heartbeat, but that's not possible. For now, the Capistrano documentation effort is making slow- but-steady progress, and I'm as anxious as the next guy to see what comes of it. :)
Cheers, - Jamis On Feb 8, 2008, at 10:05 AM, David Masover wrote:
Still doesn't answer how :web is actually used. Would code be loaded to it, but never run? That would kind of make sense, given most webservers will be able to serve static files out of that tree.And so long as they weren't run simultaneously, I'm not sure migrations from multiple servers would be an issue, as the version is stored in the database. But I suppose one of the major features of cap is to run these things concurrently.But in that case, what's the rest of :db used for? Does deploy do anything with a non-primary :db?On 2/8/08, Jamis Buck <[EMAIL PROTECTED]> wrote: Yup, you're right on all three counts. :app is for where the mongrelor fastcgi listeners will be running. :web is where your webserver is. :db is where your migrations will be run from. Specifically, :db with :primary => true -- you should only run your migrations from a single server, or things will get nasty. - Jamis On Feb 7, 2008, at 6:11 PM, David Masover wrote: > How are each of the Rails deploy roles used? (:app, :web, and :db) > > I imagine :app is where the application code is pushed to, and where > Rails is actually run. > > Is :db where the migrations are run from? (Or are they run from > everywhere in :app? I'd assume they would work from there...) > > Does :web do anything out of the box? (Could put nginx on a separate > machine from the actual app servers. In this case, is :web the nginx > machine?) > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature
