Capistrano 2.2.0 Preview
Alright, I’m almost ready to unleash this monster on the world, but I’d like a few brave souls to kick the tires. Especially, if you use git or bzr with Capistrano, you might want to give this new version a spin, since it includes a few changes to those SCM modules.
Grab the latest beta gem thus:
gem install --source http://gems.rubyonrails.org capistrano
The significant changes in this release:
FEATURE: Thanks to James Duncan Davidson, Cap 2.2.0 will sport an additional way to define roles. If you have servers that overlap roles, this can DRY things up:
server "host.name", :web, :app
FEATURE: Rob Holland submitted a patch that makes cap play more nicely with very large numbers of servers. If you had too many, cap would bog down, and you may even get errors from having too many simultaneous connections. You can now specify a
:max_hosts option, and if a task needs to operate on more than that number of servers at once, the server list will be chopped up and fed through the task in pieces.
FEATURE: David Masover gave us a way to define roles dynamically, by passing a block to the role macro:
1 2 3
role :app do ["host1", "host2"] end
This means that if you have a recipe that knows the roles, but won’t know the hosts until runtime (think EC2 and such), you can more easily code for it.
GIT: The git SCM module has the following changes:
- Distributed git support for better operability with remote_cache strategy
- Use checkout instead of merge for git SCM [nuttycom]
- Add support for :git_enable_submodules variable, to enable submodules with the git SCM
And, of course, there are quite a few other smaller changes, too. Check out the CHANGELOG for the full list.
So, kick the tires and report back. If all looks good by the middle of next week or so, we’ll see an official release.