[ANN] Capistrano 2.2.0

4 views
Skip to first unread message

Jamis Buck

unread,
Feb 27, 2008, 11:21:27 PM2/27/08
to capis...@googlegroups.com
Capistrano 2.2.0 is now available (well, it's released, anyway, you
might need to wait for the file to propagate to the gem mirrors).

gem install capistrano

Version 2.2.0 sports the following changes:

*FEATURE*: Dynamic role definition. The role() method now accepts a
block, which should return either a host name, a
Capistrano::ServerDefinition object, an array of host names, or an
array of Capistrano::ServerDefinition objects. This can be used to
describe the servers in a role at runtime.

*FEATURE*: Alternative server-centric role definitions, using the
server() method:

role :app, "server"
role :web, "server"

# the above is the same as this:
server "server", :app, :web

*FEATURE*: Support for a :max_hosts option in tasks, that restricts
the task so that it is only executed in <max_hosts> hosts at a time,
in chunks. This helps people who use Capistrano with very large
numbers of servers, and prevents them running into connection caps and
from running out of memory.

task :ping, :max_hosts => 100 do
# anything here will only run against 100 hosts at a time
end

# alternatively, you can pass :max_hosts to the run command itself
for
# finer granularity
task :pong do
# this will run on ALL hosts at once
run "something"

# this will run on no more than 100 hosts at a time
run "something-else", :max_hosts => 100
end

*ENHANCEMENT*: Improved Git support! Not being a git user myself
(yet), I can't really speak intelligently about what the changes are,
but if you use git chances are you aren't afraid to dig into the code
and read it. For those of you that use git, I'd encourage you to blog
about the changes, to assuage some of my embarrassment about releasing
code that I can't describe intelligently!

*ENHANCEMENT*: Password prompt support in the Mercurial SCM.

*ENHANCEMENT*: Implement Bzr#next_revision so that pending changes can
be reported correctly, and use checkout --lightweight instead of branch.

*ENHANCEMENT*: Bring back the :p4sync_flags and :p4client_root
variables for perforce SCM.

Additionally, there are several minor bugs and typos that have been
fixed. You can see the CHANGELOG (http://svn.rubyonrails.org/rails/tags/capistrano_2-2-0/CHANGELOG
) for all the gory details.

As ever, please report bugs via the Rails trac, at http://dev.rubyonrails.org
.

- Jamis

John Joseph Bachir

unread,
Feb 28, 2008, 5:59:14 PM2/28/08
to capis...@googlegroups.com
On Wed, Feb 27, 2008 at 11:21 PM, Jamis Buck <ja...@37signals.com> wrote:
> Capistrano 2.2.0 is now available (well, it's released, anyway, you
> might need to wait for the file to propagate to the gem mirrors).

Thank you Jamis for your work on Capistrano, making the lives of
hundreds or maybe thousands of engineers around the world considerably
more pleasant!


--
John Joseph Bachir
http://blog.johnjosephbachir.org
http://lyceum.ibiblio.org
http://dissent.cc
http://jjb.cc

jeremy...@gmail.com

unread,
Mar 19, 2008, 6:15:36 PM3/19/08
to Capistrano
Hi,

Can you set the :db role on the same line ?
If yes, how do you treat the ":primary => true" param ?

Thanks

Jamis Buck

unread,
Mar 20, 2008, 10:27:07 AM3/20/08
to capis...@googlegroups.com
You can pass an option hash as the last argument to server(), and it
will apply to all servers on that line. Thus, you'll need to declare
the :primary db server on its own, meaning it's about the same whether
you use the server() macro or the role() macro:

role :db, "server", :primary => true
# or
server "server", :db, :primary => true

- Jamis

> --~--~---------~--~----~------------~-------~--~----~
> To unsubscribe from this group, send email to capistrano-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/capistrano
> -~----------~----~----~----~------~----~------~--~---
>

Jérémy Lecour

unread,
Mar 20, 2008, 10:50:50 AM3/20/08
to capis...@googlegroups.com
Thanks, I'll try that

On Thu, Mar 20, 2008 at 3:27 PM, Jamis Buck <ja...@37signals.com> wrote:
> You can pass an option hash as the last argument to server(), and it
> will apply to all servers on that line. Thus, you'll need to declare
> the :primary db server on its own, meaning it's about the same whether
> you use the server() macro or the role() macro:
>
> role :db, "server", :primary => true
> # or
> server "server", :db, :primary => true
>
> - Jamis
>
>
>
> On Mar 19, 2008, at 4:15 PM, jeremy...@gmail.com wrote:
>
> >
> > Hi,
> >
> > Can you set the :db role on the same line ?
> > If yes, how do you treat the ":primary => true" param ?
> >
> > Thanks
> >
> > On 28 fév, 05:21, Jamis Buck <ja...@37signals.com> wrote:
> >
> >> *FEATURE*: Alternative server-centric role definitions, using the
> >> server() method:
> >>
> >> role :app, "server"
> >> role :web, "server"
> >>
> >> # the above is the same as this:
> >> server "server", :app, :web
> >
> > > >
>
>

--
Jérémy Lecour : <mailto:jeremy...@gmail.com>
webdesigner, webmaster et développeur web
Provence Linux User Group : http://www.plugfr.org/

Reply all
Reply to author
Forward
0 new messages