Derpy
This gem provides a number of tasks which are useful for deploying Drupal projects with Capistrano.
Derpy features
- deploy Drupal project from scratch
- update Drupal project with the latest code
- pull/push databases
- pull/push files
- NO support for Drupal multi-site configurations!
Installation
gems must be installed on your system first.
From RubyGems.org
$ gem install derpy
From Github
$ git clone git://github.com/3sign/derpy.git
$ cd derpy
$ gem build derpy.gemspec
$ gem install derpy-{version}.gem
Configuration
Derpify
The command "derpify" will setup the necessary configuration files for a new Drupal project. You can alter these config files to suit your needs. Beware that some of these settings are specific to 3SIGN's workflow.
$ derpify .
[add] writing './Capfile'
[add] making directory './config'
[add] writing './config/deploy.rb'
[add] making directory './config/deploy'
[add] writing './config/deploy/staging.rb'
[add] writing './config/deploy/production.rb'
[done] derpified!
After editing your config files just run: "derpy deploy:cold" to setup from scratch. After that you can do incremental updates with: "derpy deploy"
Derpy
The command "derpy install" can be used to install a new Drupal site with the 3SIGN makefile and profile.
$ derpy install [sitename]
All other arguments for "derpy" are aliases that call the required Capistrano tasks, just to be fancy. Specify the "-T" parameter to get a list of all available tasks.
$ derpy -T
cap deploy # Deploys your Drupal site, runs drush:update.
cap deploy:check # Test deployment dependencies.
cap deploy:cleanup # Removes old releases and corresponding DB backups.
cap deploy:cold # Setup a drupal site from scratch
cap deploy:create_symlink # Updates the symlink to the most recently deployed...
cap deploy:pending # Displays the commits since your last deploy.
cap deploy:pending:diff # Displays the `diff' since your last deploy.
cap deploy:rollback # Go back to the previous release (code and database)
cap deploy:rollback:code # Rolls back to the previously deployed version.
cap deploy:setup # Prepares one or more servers for deployment.
cap deploy:symlink # Deprecated API.
cap deploy:update # Copies your project and updates the symlink.
cap deploy:update_code # Copies your project to the remote servers.
cap deploy:upload # Copy files to the currently deployed version.
cap drush:backupdb # Backup the database
cap drush:cache_clear # Clear the drupal cache
cap drush:feature_revert # Revert feature
cap drush:get # Gets drush and installs it
cap drush:site_offline # Set the site offline
cap drush:site_online # Set the site online
cap drush:updatedb # Run Drupal database migrations if required
cap files:pull # Pull drupal sites files (from remote to local)
cap files:push # Push drupal sites files (from local to remote)
cap git:push_deploy_tag # Place release tag into Git and push it to origin ...
cap invoke # Invoke a single command on the remote servers.
cap manage:block_robots # Block bots via robots.txt
cap manage:pull_dump # Dump remote database and restore locally
cap manage:push_dump # Dump local database and restore remote
cap multistage:prepare # Stub out the staging config files.
cap production # Set the target stage to `production'.
cap shell # Begin an interactive Capistrano session.
cap staging # Set the target stage to `staging'.
Credits
Inspired by capdrupal and didi.
Made by 3SIGN.