Recently in RubyHitSquad Category

One Line Multi-Stage Deployment for Vlad:

Kernel.load "config/deploy_#{ENV['to']}.rb" if ENV['to']

Making this elegant line possible:

% rake vlad:deploy to=qa

Coming Soon™ to a Vlad near you!

Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1/10th the complexity. Vlad integrates seamlessly with Rake, and uses familiar and standard tools like ssh and rsync.

Impale your application on the heartless spike of the Deployer.

FEATURES/PROBLEMS:

  • Full deployment automation stack.
  • Turnkey deployment for mongrel+apache+svn.
  • Supports single server deployment with just 3 variables defined.
  • Built on rake. Easy. Engine is small.
  • Very few dependencies. All simple.
  • Uses ssh with your ssh settings already in place.
  • Uses rsync for efficient transfers.
  • Run remote commands on one or more servers.
  • Mix and match local and remote tasks.
  • Compatible with all of your tab completion shell script rake-tastic goodness.
  • Ships with tests that actually pass in 0.028 seconds!
  • Does NOT support Windows right now (we think). Coming soon in 1.2.

Changes:

1.1.1 / 2008-01-14

  • 5 major enhancements:

    • Support for Rake 0.8. Should still work for Rake 0.7.
    • Added git support (contributed by Garry Dolley).
    • Reviewed for accuracy by Evan Phoenix.
    • Added lighttpd.rb
    • Added automatic client setup for perforce.
    • Added mercurial SCM support patch. Closes ticket 13475.
  • 6 minor enhancements:

    • Added #put method that wraps up Tempfile/rsync pattern.
    • Added automatic p4 client setup for perforce.
    • Added vladdemo.sh
    • Moved everything over to put.
    • Moved generic app setup to core from mongrel.
    • Parameterized 'head' into 'revision' variable (with head as default).
  • 1 bug fix

    • Fixed cleanup to actually properly clean up.
  • http://rubyhitsquad.com/

  • http://rubyforge.org/projects/hitsquad/

Vlad Hanging on you?

| | Comments (0)

I just finished writing up a lighttpd plugin for Vlad so I can switch my textdrive projects over. I had a problem where firing up lighttpd would hang. I knew there wasn't any IO it was actually waiting on, it was just hanging...

After googling I found a similar bug regarding capistrano having the same problem and the workaround offered works beautifully!

The solution/workaround is to forcibly detach all IO from the process:

#{web_command} -f #{lighttpd_conf} </dev/null >/dev/null 2>&1

For non-unix geeks, this:

  • merges stdout and stderr (2>&1)
  • redirects stdout to /dev/null
  • redirects/attaches /dev/null to stdin

By doing this, ssh doesn't hang around waiting for more stuff to happen. This is specific to lighttpd, but I'm guessing there are other daemons out there with similar problems.

Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1/10th the complexity. Vlad integrates seamlessly with Rake, and uses familiar and standard tools like ssh and rsync.

Impale your application on the heartless spike of the Deployer.

FEATURES/PROBLEMS:

  • Full deployment automation stack.
  • Turnkey deployment for mongrel+apache+svn.
  • Supports single server deployment with just 3 variables defined.
  • Built on rake. Easy. Engine is small.
  • Very few dependencies. All simple.
  • Uses ssh with your ssh settings already in place.
  • Uses rsync for efficient transfers.
  • Run remote commands on one or more servers.
  • Mix and match local and remote tasks.
  • Compatible with all of your tab completion shell script rake-tastic goodness.
  • Ships with tests that actually pass in 0.028 seconds!
  • Does NOT support Windows right now (we think). Coming soon in 1.2.

Changes:

1.1.0 / 2007-09-12

  • 3 major enhancements:
    • Vlad.load now takes a hash of recipe overrides, eg: Vlad.load :web => :nginx. See rdoc for defaults.
    • Removed vlad_tasks.rb and split into vlad/apache.rb, vlad/mongrel.rb, and vlad/core.rb.
    • The flog ratio between capistrano+deps / vlad+deps is pi (or, damn close)!
  • 12 minor enhancements:
    • Added $TRACE to make it more available and cleaner to read.
    • Added :svn_cmd variable.
    • Added Rake.clear_tasks *str_or_regexp
    • Added debug and mana_from_heaven tasks to Rakefile.
    • Added more documentation.
    • Added :rsync_cmd and :rsync_flags.
    • Added :ssh_cmd and :ssh_flags.
    • Added variable expansion to vlad:debug task.
    • Removed :scm variable. Now a Vlad.load component/flavor/need-a-word-here.
    • Removed :application var. Use it if you want it. We don't require it.
    • Renamed :p4cmd to :p4_cmd.
    • Renamed :rake var to :rake_cmd.
  • 2 (important) bug fixes:

    • HUGE: Fixed sudo hang bug #13072. Fix suggested by Chris Van Pelt.
    • HUGE: Vlad.load calls user config last, allowing variable overrides. ACK! Sorry!
  • http://rubyhitsquad.com/

  • http://rubyforge.org/projects/hitsquad/

Comparing flog scores of the upcoming Vlad 1.1 + dependencies to capistrano + dependencies:

vlad  = 801.703121839339 + 2852.62383908144
cap   = 11480.3919695285
ratio = cap / vlad
      = 3.141588613252   # <-- zomg! look here!!!

ratio - Math::PI
= -4.04033779499713e-06

target = cap / Math::PI
= 3654.32226116592

target - vlad
= -0.00469975485839313

EDIT: Cleaned up for the terminally ADD. You'd think arithmetic was hard...

ADDED: From Wilson:

"What I'm seeing here is that the endless cycle of creation and destruction cried out for a hero... and Vlad answered the call"

"The Ruby Hit Squad has been activated"... that was the message I sent people, and less than 2 weeks later, it happened.

From Saturday, August 4th to Tuesday, August 7th, the Ruby Hit Squad was in full effect. We flew in the prodigious Wilson Bilkovich from Florida, holed ourselves up, and 4 days later we had an all but polished product: Vlad the Deployer.

Severely tired, it took a little while to get the last of it polished off, but we finally got Vlad out the door. We did 94 commits in the first 4 days, and another 42 following to get the release polished up and out the door. It is probably the best that Eric or I have done wrt spit and polish on a 1.0 release, with impl, tests, a fairly complete website, and rdoc. I'm quite happy with it.

I had sooo much fun doing this. I hope that the hit squad can be activated again soon... Right after my nap.

Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1/10th the complexity. Vlad integrates seamlessly with Rake, and uses familiar and standard tools like ssh and rsync.

Impale your application on the heartless spike of the Deployer.

FEATURES/PROBLEMS:

  • Full deployment automation stack.
  • Supports single server deployment with just 4 variables defined.
  • Very few dependencies. All simple.
  • Uses ssh with your ssh settings already in place.
  • Uses rsync for efficient transfers.
  • Run remote commands on one or more servers.
  • Syncs files to one or more servers.
  • Mix and match local and remote tasks.
  • Built on rake. easy.
  • Compatible with all of your tab completion shell script rake-tastic goodness.
  • Ships with tests that actually pass.
  • Engine is under 500 lines of code.
  • Super uper simple.
  • Does NOT support Windows right now. Coming soon in 1.1.
  • This is 1.0.0... expect rough edges.

Changes:

1.0.0 / 2007-08-04