No commit activity in last 3 years
No release in over 3 years
Get ip addresses of AWS EC2 instances filtered by their tags.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0

Runtime

 Project Readme

Capistrano::Ec2Tagged

Get IP addresses of AWS EC2 instances filtered by their tags.

Requirements

  • aws-sdk-v1
  • capistrano ~> 3.0

Installation

Add this line to your application's Gemfile:

gem 'capistrano-ec2_tagged'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-ec2_tagged

Usage

Add this line to your application's Capfile:

require 'capistrano/ec2_tagged'

And set credentials with AmazonEC2ReadOnlyAccess permission in config/deploy.rb as:

set :aws_access_key_id, "YOUR ACCESS KEY ID"
set :aws_secret_access_key, "YOUR SECRET ACCESS KEY"
set :aws_region, "ap-northeast-1"

Then call ec2_tagged method in each stage files like config/deploy/production.rb as:

role :web, ec2_tagged("Name" => "my-web-server")
role :app, ec2_tagged("Name" => "my-app-server")
role :db,  ec2_tagged("Name" => "my-db-server")

Contributing

  1. Fork it ( http://github.com/a2ikm/capistrano-ec2_tagged/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request