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

additional_remotes after_restart before_migrate before_restart before_symlink branch copy_exclude create_dirs_before_symlink current_path deploy_to depth destination enable_submodules environment git_ssh_wrapper group migrate migration_command new purge_before_symlink remote repo repository repository_cache restart restart_command revision role rollback_on_error scm_provider shallow_clone shared_path ssh_wrapper svn_arguments svn_force_export svn_info_args svn_password svn_username symlink_before_migrate symlinks user

### Public Class methods

new(name, run_context=nil)

### Public Instance methods

additional_remotes(arg=nil)
after_restart(arg=nil, &block)

Callback fires after restart

before_migrate(arg=nil, &block)

Callback fires before migration is run.

before_restart(arg=nil, &block)

Callback fires before restart

before_symlink(arg=nil, &block)

Callback fires before symlinking

branch(arg=nil)

Alias for revision

copy_exclude(arg=nil)
create_dirs_before_symlink(arg=nil)

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"]

current_path()

where the deployed version of your code goes

deploy_to(arg=nil)

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

depth()
destination()

where the checked out/cloned code goes

enable_submodules(arg=nil)
environment(arg=nil)
git_ssh_wrapper(arg=nil)
group(arg=nil)
migrate(arg=nil)
migration_command(arg=nil)
purge_before_symlink(arg=nil)

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"]

remote(arg=nil)
repo(arg=nil)
repository(arg=nil)

Alias for repo

repository_cache(arg=nil)
restart(arg=nil, &block)

Alias for restart_command

restart_command(arg=nil, &block)
revision(arg=nil)
role(arg=nil)
rollback_on_error(arg=nil)
scm_provider(arg=nil)
shallow_clone(arg=nil)
shared_path()

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

ssh_wrapper(arg=nil)

Alias for git_ssh_wrapper

svn_arguments(arg=nil)
svn_force_export(arg=nil)
svn_info_args(arg=nil)
svn_password(arg=nil)
svn_username(arg=nil)
symlink_before_migrate(arg=nil)

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"}

symlinks(arg=nil)

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"}

user(arg=nil)

[Validate]