Capistrano 1.3.1

Posted by jamis January 06, 2007 @ 04:54 AM

I’ve been remiss in announcing recent Capistrano releases, so I’m making up for lost time now. Capistrano 1.3.1 is now available!

Capistrano, for those of you that are late to the game, is a utility for executing commands in parallel on multiple remote machines. It comes with support for vastly simplifying the deployment process of Rails applications, but can be customized to work with virtually any environment.

Since 1.2.0, the following enhancements and changes have been made:

  • You can encode the username and port for a host in the host string. Does one machine require a different user than another? A non-standard port for SSH access? It’s as simple as:
role :app,  "app1.host.com" 
role :web,  "webuser@web1.host.com" 
role :db,   "db1.host.com:1234" 
role :file, "fileuser@file1.host.com:1234" 
  • You can pass an :as option to sudo, to specify which user a command should be run as:
sudo "spinner", :as => "app" 
  • If you define a ”.caprc” file in your home directory, Capistrano will automatically load that file on every invocation. (It has the same format as any other Capistrano recipe file.)
  • Assets in the images, javascripts, and stylesheets directories are now touched after updating the code, to ensure that Rails’ asset timestamping feature works correctly.
  • Make sure new setups and checkouts are group-writable.
  • Do not run the cleanup task on servers marked “no_release”.
  • Rake integration is now deprecated. You should be invoking ‘cap’ directly. A future release will remove rake integration altogether.

Feel free to read the changelog several other fixes and tweaks. It might be a few hours before the 1.3.1 gem reaches all the mirrors, but when it gets there, a simple “gem install capistrano” ought to do the trick!

Posted in Releases | 7 comments

Comments

  1. topfunky on 07 Jan 03:39:

    I made a 10 minute (free) screencast that shows you how to install a full Rails stack on Ubuntu using Capistrano.

    Available here:

    http://peepcode.com/products/capistrano-concepts

    There’s also a paid screencast that walks you through the basics of Capistrano and shows you how to write your own tasks.

    Capistrano has made my life much easier. I automate almost all my SSH tasks now…thanks Jamis!

  2. Ryan Heneise on 07 Jan 05:28:

    You guys are both amazing and have done much to bring ease and pleasure to my professional life. Jamis – thanks for continuing to improve Capistrano. Geoffrey, thanks for helping people figure all this out!

  3. phil76 on 07 Jan 17:19:

    specifying the port in the role configuration allowed us to use capistrano in our deployment environment. thanks a lot (to jamis and ezra, i guess) for adding that!

  4. Lake on 08 Jan 17:21:

    Capistrano is so sexy. Great Work and thanks for the update.

  5. David Balatero on 23 Jan 01:19:

    Dear god, yes. I’ve been waiting for username specification in the role configuration for months now!

  6. beej on 23 Jan 21:08:

    userid specification really allows capistrano do what many real world users will need it to do.

    But I’m having a problem that I’ve been pulling my hair out about now for two days.

    I can deploy fine with version 1.2, however when I deploy the same app with 1.3.1 I get a blank page in production or the Application failed to start properly message in the development environment. Most distressingly of all NOTHING SHOWS UP IN THE LOGS.

    Any ideas oh wise ones? I am not worthy.

  7. confused on 30 Jan 07:33:

    Is there updated documentation?