Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
103 lines (63 sloc) 4.69 KB
h2. Capsize : The Capistrano Plugin for EC2
h2. → 'capsize'
h2. About
Amazon Web Services offers a compute power on demand capability known as the Elastic Compute Cloud (EC2). Using the current API's the compute resources in the cloud can be provisioned on demand by making SOAP or HTTP Query API calls to EC2.
<b>Legal Stuff : This project is in no way affiliated nor does it represent, Amazon Web Services, or the Amazon Web Services Elastic Compute Cloud service.</b>
This gem provides a plugin for the fantastic "Capistrano 2": deployment and server management tool written by Jamis Buck. With this gem, and Capistrano installed, you will be able to issue commands and script your interaction with Amazon's Elastic Compute Cloud (EC2) service. This gem depends on the installation of the newly updated "amazon-ec2": Ruby Gem which is an interface library that can be used to interact with the Amazon EC2 system.
h2. Project Info
This project is managed as a RubyForge project which you can find at "": and this is always the best place to find the latest news, report any bugs, submit feature requests, or provide patches.
h2. Documentation
You can browse the complete RDoc generated documentation at:
h2. Installing
This gem follows the standard conventions for installation on any system with Ruby and RubyGems installed. If you have worked with gems before this will look very familiar.
h3. Installation pre-requisites
Before you can make use of this gem you will need an "Amazon Web Services developer account": This account must also be specifically enabled for Amazon EC2 usage. AWS will provide you with an 'AWS Access Key ID' and a 'Secret Access Key' which will allow you to authenticate any API calls you make and ensure correct billing to you for usage of the service. Take note of these (and keep them secret!).
h3. Installing the gem
<pre syntax="ruby">sudo gem install capsize</pre>
h2. Getting Started
<pre syntax="ruby">
Edit the file config/deploy.rb and find something like the following:
<pre syntax="ruby">
set :application, "foobar"
require 'capsize'
IMPORTANT : Ensure that the "require 'capsize'" line comes AFTER the line in your configuration where you set your application name. Capsize will not work properly if this is not done!
Once the Capsize section of deploy.rb is just how you'd like it you should be able to run 'cap -T' to show all available Capistrano commands:
<pre syntax="ruby">
# cap -T
cap ec2:console:output # Show instance console output.
cap ec2:images:show # Describe machine images you...
cap ec2:instances:show # Info about your instances.
cap ec2:instances:reboot # Reboot an EC2 instance.
cap ec2:instances:run # Runs an instance of :image_...
cap ec2:instances:ssh # Open an SSH shell to instan...
cap ec2:instances:terminate # Terminate an EC2 instance.
cap ec2:keypairs:create # Create and store a new keyp...
cap ec2:keypairs:delete # Delete a keypair.
cap ec2:keypairs:show # Describes your keypairs.
cap ec2:security_groups:authorize_ingress # Authorize firewall ingress ...
cap ec2:security_groups:create # Create a security group.
cap ec2:security_groups:create_with_standard_ports # in deploy.
cap ec2:security_groups:delete # Delete a security group.
cap ec2:security_groups:revoke_ingress # Revoke firewall ingress for...
cap ec2:setup # Initialize the Capsize conf...
You should now see a group of tasks that start in the namespace 'ec2:' similar to what you see above.
Finally, run the following Capsize command which will generate your initial Capsize config files and show you a help document that will take you through the remaining configuration steps and get you up and running with your first Capsize controlled EC2 instance.
<pre syntax="ruby">
cap ec2:setup
h3. Project Tools
h3. Related Project Websites
"Capistrano 2":