capistrano-ec2elb 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in capistrano-ec2elb.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (C) 2011 by Phillip Goldenburg
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.markdown ADDED
@@ -0,0 +1,80 @@
1
+ # capistrano-ec2elb
2
+
3
+ A Capistrano plugin aimed at easing the pain of deploying to Amazon EC2
4
+ instances by using an ELB name.
5
+
6
+ ## Introduction
7
+
8
+ capistrano-ec2tag is a [Capistrano](https://github.com/capistrano/capistrano) plugin designed to simplify the
9
+ task of deploying to infrastructure hosted on [Amazon EC2](http://aws.amazon.com/ec2/). It was
10
+ completely inspired by the [capistrano-ec2group](https://github.com/logandk/capistrano-ec2group) plugin, to which all credit is due.
11
+
12
+ While the original [capistrano-ec2group](https://github.com/logandk/capistrano-ec2group) plugin served me well, I didn't want to rely on security groups for deployment as I used cloudformation more. I also wanted to transition to the aws-sdk gem.
13
+
14
+ ## Installation
15
+
16
+ ### Set the Amazon AWS Credentials
17
+
18
+ In order for the plugin to list out hostnames of your EC2 instances, it
19
+ will need access to the Amazon EC2 API. Specify the following in your
20
+ Capistrano configuration:
21
+
22
+ ```ruby
23
+ AWS.config(:access_key_id => '...', :secret_access_key => '...')
24
+ ```
25
+
26
+ ### Get the gem
27
+
28
+ The plugin is distributed as a Ruby gem.
29
+
30
+ **Ruby Gems**
31
+
32
+ ```bash
33
+ gem install capistrano-ec2elb
34
+ ```
35
+
36
+ **Bundler**
37
+
38
+ Using [bundler](http://gembundler.com/)?
39
+
40
+ ```bash
41
+ gem install bundler
42
+ ```
43
+
44
+ Then add the following to your Gemfile:
45
+
46
+ ```ruby
47
+ source "http://rubygems.org"
48
+ gem "capistrano-ec2elb"
49
+ ```
50
+
51
+ Install the gems in your manifest using:
52
+
53
+ ```bash
54
+ bundle install
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ### Configure Capistrano
60
+
61
+ ```ruby
62
+ require 'capistrano/ec2elb'
63
+
64
+ task :production do
65
+ tag "production-loadbalancer-web", :web
66
+ tag "production-loadbalancer-job", :job
67
+ logger.info "Deploying to the PRODUCTION environment!"
68
+ end
69
+
70
+ task :staging do
71
+ tag "staging-loadbalancer-web", :web
72
+ tag "staging-loadbalancer-job", :job
73
+ logger.info "Deploying to the STAGING environment!"
74
+ end
75
+ ```
76
+
77
+ ## License
78
+
79
+ capistrano-ec2elb is copyright 2011 by [Phillip Goldenburg], released under the MIT License (see LICENSE for details).
80
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "capistrano-ec2elb"
6
+ s.version = "0.0.1"
7
+ s.authors = ["Phillip Goldenburg"]
8
+ s.email = [""]
9
+ s.homepage = "https://github.com/phillip/capistrano-ec2elb"
10
+ s.summary = "A Capistrano plugin aimed at easing the pain of deploying to Amazon EC2 instances by using a ELB name."
11
+ s.description = "capistrano-ec2elb 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 and capistrano-ec2tag plugins, to which all credit is due."
12
+
13
+ s.rubyforge_project = "capistrano-ec2elb"
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency "capistrano", ">=2.1.0"
21
+ s.add_dependency "aws-sdk"
22
+ end
@@ -0,0 +1 @@
1
+ require "capistrano/ec2elb"
@@ -0,0 +1,26 @@
1
+ require 'aws-sdk'
2
+
3
+ unless Capistrano::Configuration.respond_to?(:instance)
4
+ abort "capistrano/ec2elb requires Capistrano >= 2"
5
+ end
6
+
7
+ module Capistrano
8
+ class Configuration
9
+ module ELBGroups
10
+
11
+ def elb_group(which, *args)
12
+ @elb ||= AWS::ELB.new
13
+
14
+ AWS.memoize do
15
+ @elb.load_balancers[which].instances.each do |instance|
16
+ server(instance.dns_name, *args) if instance.status == :running
17
+ end
18
+ end
19
+ end
20
+
21
+ end
22
+
23
+ include ELBGroups
24
+ end
25
+ end
26
+
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-ec2elb
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Phillip Goldenburg
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-10-12 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: capistrano
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 11
29
+ segments:
30
+ - 2
31
+ - 1
32
+ - 0
33
+ version: 2.1.0
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: aws-sdk
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ type: :runtime
49
+ version_requirements: *id002
50
+ description: capistrano-ec2elb 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 and capistrano-ec2tag plugins, to which all credit is due.
51
+ email:
52
+ - ""
53
+ executables: []
54
+
55
+ extensions: []
56
+
57
+ extra_rdoc_files: []
58
+
59
+ files:
60
+ - .gitignore
61
+ - Gemfile
62
+ - LICENSE
63
+ - README.markdown
64
+ - Rakefile
65
+ - capistrano-ec2elb.gemspec
66
+ - lib/capistrano-ec2elb.rb
67
+ - lib/capistrano/ec2elb.rb
68
+ homepage: https://github.com/phillip/capistrano-ec2elb
69
+ licenses: []
70
+
71
+ post_install_message:
72
+ rdoc_options: []
73
+
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ hash: 3
82
+ segments:
83
+ - 0
84
+ version: "0"
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ hash: 3
91
+ segments:
92
+ - 0
93
+ version: "0"
94
+ requirements: []
95
+
96
+ rubyforge_project: capistrano-ec2elb
97
+ rubygems_version: 1.8.11
98
+ signing_key:
99
+ specification_version: 3
100
+ summary: A Capistrano plugin aimed at easing the pain of deploying to Amazon EC2 instances by using a ELB name.
101
+ test_files: []
102
+