How does Capistrano work by default?

Ok, before you downvote, hear me out… There are lots of walkthroughs online for deploying cakePHP/Wordpress/Drupal/Symfony via Capistrano and the projects own document is pretty good, but there’s not a lot of coverage over what Capistrano actually does by default. Specifically, do a git checkout to folder /timestamp, /most-recent-timestamp to /current, webroot having previously been symlinked to /current.

I ask this question because we have a non-standard, hacked capistrano deploy process for a few legacy reasons and I’d like to bring us into alignment with the default behavior. In order to do so, I’d like background in what, exactly capistrano’s default behavior actually is.

  • Deploying a Git subdirectory in Capistrano
  • Error writing to authentication socket on deploy with capistrano3
  • Capistrano 3 runs every command twice (new install) - Configuration issue
  • ssh key file unprotected private key file error every time after reboot
  • Capistrano + Git - “unable to find”
  • Why am I getting a “Permission Denied” when trying to cap deploy?
  • cp -Ra /home/username/deploy/shared/./ /home/username/deploy/releases/20121026170156/: this command takes forever to complete and I don’t see anydocumentation of /shared being used this way: what is the typical role played by /shared?

  • How can I modify the file path in a set of Git patches?
  • How can I do git merges in such a way that they are easy to roll back?
  • What are the advantages of using git-svn over the normal svn client?
  • GIt Deployment + Configuration Files + Heroku
  • Git Error; RPC failed; result=22, HTTP code = 401
  • Git push takes forever
  • One Solution collect form web for “How does Capistrano work by default?”

    While probably only the start to the answer, one of the best ways to understand any FOSS project is via the source.

    Coming from the PHP world, you may be unfamiliar about how a Ruby Gem is composed. Gems are made available to the system path [as an executable] by the presence of file in the /bin dir of the gem. Capistrano’s is here – and from this you can see where begins the process of calling cap production deploy.

    require 'capistrano/cli'

    In this case it loads the CLI library, and then calls a command therein. Start there to trace what you need.

    Git Baby is a git and github fan, let's start git clone.