No commit activity in last 3 years
No release in over 3 years
capistrano-ec2tag is a Capistrano plugin designed to simplify the task of deploying to infrastructure hosted on Amazon EC2. It was completely inspired by the capistrano-ec2group plugin, to which all credit is due.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.8.5
>= 2.15.5
 Project Readme

Introduction

capistrano-ec2tag is a Capistrano plugin designed to simplify the task of deploying to infrastructure hosted on Amazon EC2. It was inspired by the capistrano-ec2group plugin, to which all credit is due.

While the original capistrano-ec2group plugin served me well, I started to run into cases where I wanted more flexibility. More specifically, in order to change security groups, instances have to be restarted.

I created capistrano-ec2tag to bypass this limitation. Now, modifying the list of instances that are deployable is as easy as modifying tags.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-ec2tag'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-ec2tag

Configuration

Tag your instances, using deploy as the key. For example:

tag-example

The tag value can be any string, but I suggest using something like APP-ENVIRONMENT.

Usage

Add this to the top of your deploy.rb:

require 'capistrano/ec2tag'

Then supply your AWS credentials with the environment variables (default):

# aws
export AWS_ACCESS_KEY_ID='...'
export AWS_SECRET_ACCESS_KEY='...'

Or in your deploy.rb with capistrano variables:

set :aws_access_key_id, '...'
set :aws_secret_access_key, '...'
# old & busted
server 'web1.example.com', :web

# new hotness
tag 'github-staging', :web

License

capistrano-ec2tag is copyright 2013 by Douglas Jarquin, released under the MIT License (see LICENSE for details).`