Using Capistrano to Bundle Amazon EC2 Images
Using Capistrano to Bundle Amazon EC2 Images Ive found the following bit of Capistrano script to be useful when tinkering with EC2 images. I can make a change and then bundle the image with just one command: cap admin:bundle The most difficult part of this script was finding out how to upload files to the remote instance using scp . The rest is fairly straightforward. I am only posting this script because I havent seen this functionality posted anywhere else. # capfile for Amazon EC2 Bundling. Normally, a yaml file would be # hold configuration parameters. I am using environment # variables because they are also used by the EC2 # programs - why have the information in two places? # This script assumes that you are only bundling one # instance at a time. # EC2 Instance Hostname to be bundled. ec2_hostname = ENV[BUNDLE_EC2_HOSTNAME] # S3 Bucket Name (where the bundle is uploaded) s3_bucket_name = ENV[BUNDLE_S3_BUCKET_NAME] # If you are using ElasticFox (and if not, why not?) that # you...