I'm currently setting up a new production environment for a Rails application which includes multiple, load-balanced application servers (currently only two, but this will increase over time).
I'd like to handle deployment of the app to all these servers in a single command using Capistrano (which I already use for my existing, single server). The only way I can see of doing this is to use capistrano-ext
(which I actually already use to deploy to my test and staging environments), by defining a new 'environment' for each application server (app1
, app2
and so on) and performing a deployment using something like:
cap app1 app2 app3 deploy
Is this the recommended way of doing it or is there a better approach?