File: migration.txt

# migration.txt

Path: | doco/migration.txt
Last Update: | Mon Mar 17 09:28:34 -0600 2008

## Converting from Capistrano

- ‘set scm’ is removed. Vlad.load :scm => :something if you don‘t use subversion.
- ‘task’ blocks are renamed to ‘remote_task’.
- Most variables are the same. See variables.txt for details.
- No `with_command` / `sudo` / `via` wonkiness
- Uses real ssh so env vars and the like are not a problem
  - no `with_env` as a result.
- Vlad doesn‘t use ’:no_release’ or ’:primary’.
  - If you have a task that needs to run on only one host from a role, you should declare a new role for that host:

          role :master_db, "master.example.com"

    ..and then override the role for the task you want to limit:

          Rake::Task["mytask"].options[:roles] = :master_db

- The ‘host’ method can be used to consolidate multiple ‘role’ calls.
  - host "www.example.com", :app, :web, :db specifies a host with three roles.
- migrate_env is now migrate_args.
- Vlad doesn‘t have before/after magic add-on tasks.

## BEFORE:

      set :application, "rubyholic"
      set :domain,      "zenspider.textdriven.com"
      set :repository,  "svn://svn.example.com/rubyholic/branches/stable"
      set :deploy_to,   "/users/home/zenspider/domains/new.rubyholic.com"

      set :user,        "zenspider"
      set :use_sudo,    false

      role :web, domain
      role :app, domain
      role :db,  domain, :primary => true

## AFTER:

      set :domain,      "zenspider.textdriven.com"
      set :repository,  "svn://svn.example.com/rubyholic/branches/stable"
      set :deploy_to,   "/users/home/zenspider/domains/new.rubyholic.com"

[Validate]