recap.rb |
|
---|---|
This is the documentation for recap, a simple, opinionated set of capistrano deployment recipes. Inspired in part by this blog post, these recipes use git’s strengths to deploy applications in a faster, simpler manner than the standard capistrano deployment. Aims and featuresReleases are managed using git. All code is deployed to a single directory, and git tags are
used to manage different released versions. No Deployments do the minimum work possible, using git to determine whether tasks need to run. e.g.
the Applications have their own user and group, owning all of that application’s associated
files and processes. This gives them a dedicated environment, allowing environment variables to
be used for application specific configuration. Tasks such as Personal accounts are used to deploy to the server, distinct from the application user. The right
to deploy an application is granted simply by adding a user to the application group. Most tasks
are run as the application user using %application ALL=NOPASSWD: /sbin/start application* %application ALL=NOPASSWD: /sbin/stop application* %application ALL=NOPASSWD: /sbin/restart application* %application ALL=NOPASSWD: /bin/su – application* %application ALL=NOPASSWD: /bin/su application* Limitations and ConstraintsRecap has been developed and tested using Ubuntu 11.04. It may work well with other flavours of unix, but proceed with caution. Recap also uses a different file layout than other capistrano-based deployments, so other recipes may not work well with it. You can improve compatibility with other recipes using recap/support/compatibility.rb. Getting startedTo use recap you’ll need a project stored in Preparing your projectTo get a project ready to deploy with recap, you’ll need to install the gem, most likely by adding
an entry like the following to the gem ‘recap’, ‘~>1.0.0’ Once the gem is installed, generate a require ‘recap/recipes/rails’ set :application, ‘example-app’ set :repository, ‘git@example.com:example/example-app.git’ server ‘server.example.com’, :app Edit the Preparing the serverThe next step is setting up the server. Running This application account is dedicated to your app, so you can edit its Preparing the appRunning DeployingFinally running Further informationRecap has recipes to deploy static, ruby-based and rails apps which you can find out about in recap/recipes. For more information about all the capistrano tasks recap provides, see recap/tasks. Versioning and Licenserecap uses semantic versioning. The code is available on github and released under the MIT License |
module Recap
module Support
autoload :Compatibility, 'recap/support/compatibility'
autoload :Namespace, 'recap/support/namespace'
autoload :Environment, 'recap/support/environment'
autoload :ShellCommand, 'recap/support/shell_command'
autoload :CLI, 'recap/support/cli'
end
autoload :Version, 'recap/version'
end |