Introduction

Capistrano-S3 is a capistrano deployment strategy that will:

* svn export locally
* make a tarball (named after the svn revision) of the release
* push the tarball to S3
* each server pulls that tarball from S3

This allows one to use an svn repository not exposed to the outside world, save time pushing out of a poky cable modem, and have new EC2 instances pull directly from S3 on startup.

If the tarball is already in S3 (from a previous deployment, say to a staging instance) the checkout is skipped.

Installation

gem install capistrano_s3

Usage

Please read carefully if upgrading from 0.1 as the options have changed.

To use it, specify properties in config/deploy.rb:

set :deploy_via, :s3_bucket
s3_config = YAML::load(ERB.new(IO.read("secret/s3.yml")).result) # Follow this pattern and don't ckin your secrets
# s3_config = { 
#   'access_key_id' => 'ABCDEFGHIJKLMNOPQRST', 
#   'secret_access_key' => 'abcdefghijklmnopqrstuvwxyz01234567890ABC' ,
#   'bucket_name' => 'com.example.releases' # The name of the S3 bucket that should get releases
# }
set :s3_config, s3_config

Now regular capistrano deployment tasks will go through S3

About

GitHub Project

github.com/Viximo/capistrano-s3

Authors

Bill Kirtley - bill.kirtley at [nospam] gmail dt com Matt Griffin - [email protected]

License

Distributed under MIT License

Copyright

2008 Bill Kirtley, Virosity Inc.