Class Chef::Resource::Deploy
In: lib/chef/resource/deploy.rb
Parent: Chef::Resource

Deploy: Deploy apps from a source control repository.

Callbacks: Callbacks can be a block or a string. If given a block, the code is evaluated as an embedded recipe, and run at the specified point in the deploy process. If given a string, the string is taken as a path to a callback file/recipe. Paths are evaluated relative to the release directory. Callback files can contain chef code (resources, etc.)

Methods

Public Class methods

Public Instance methods

Callback fires before migration is run.

Callback fires before symlinking

branch(arg=nil)

Alias for revision

An array of paths, relative to your app‘s root, where you expect dirs to exist before symlinking. This runs after purge_before_symlink, so you can use this to recreate dirs that you had previously purged. For example, if you plan to use a shared directory for pids, and you want it to be located in $APP_ROOT/tmp/pids, you could purge tmp, then specify tmp here so that the tmp directory will exist when you symlink the pids directory in to the current release. Default: ["tmp", "public", "config"]

where the deployed version of your code goes

note: deploy_to is your application "meta-root."

where the checked out/cloned code goes

The number of old release directories to keep around after cleanup

An array of paths, relative to your app‘s root, to be purged from a SCM clone/checkout before symlinking. Use this to get rid of files and directories you want to be shared between releases. Default: ["log", "tmp/pids", "public/system"]

repository(arg=nil)

Alias for repo

restart(arg=nil, &block)

Alias for restart_command

where shared stuff goes, i.e., logs, tmp, etc. goes here

ssh_wrapper(arg=nil)

Alias for git_ssh_wrapper

A Hash of shared/dir/path => release/dir/path. This attribute determines which files in the shared directory get symlinked to the current release directory and where they go. Unlike map_shared_files, these are symlinked before any migration is run. For a rails/merb app, this is used to link in a known good database.yml (with the production db password) before running migrate. Default {"config/database.yml" => "config/database.yml"}

A Hash of shared/dir/path => release/dir/path. This attribute determines which files and dirs in the shared directory get symlinked to the current release directory, and where they go. If you have a directory $shared/pids that you would like to symlink as $current_release/tmp/pids you specify it as "pids" => "tmp/pids" Default {"system" => "public/system", "pids" => "tmp/pids", "log" => "log"}

[Validate]