cap-ec2 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -0
- data/lib/cap-ec2/ec2-handler.rb +3 -2
- data/lib/cap-ec2/version.rb +1 -1
- metadata +62 -46
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Cap-EC2
|
2
2
|
|
3
|
+
[![Code Climate](https://codeclimate.com/github/forward3d/cap-ec2.png)](https://codeclimate.com/github/forward3d/cap-ec2)
|
4
|
+
|
3
5
|
Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon EC2 instance tags,
|
4
6
|
dynamically building the list of servers to be deployed to.
|
5
7
|
|
@@ -128,6 +130,12 @@ role would apply to `server-3`.
|
|
128
130
|
|
129
131
|
In the "staging" stage, all roles would apply *only* to `server-4`.
|
130
132
|
|
133
|
+
### Servers in multiple stages
|
134
|
+
|
135
|
+
If your use-case requires servers to be in multiple stages, simply specify all the stages you want
|
136
|
+
the server to be in 'Stages' tag, separated by commas. For example, you could place a server in
|
137
|
+
the `production` and `staging` stages by setting the 'Stages' tag to `production,staging`.
|
138
|
+
|
131
139
|
### Passing options to roles
|
132
140
|
|
133
141
|
You can pass options when defining your roles. The options are *exactly* the same as the options that
|
@@ -197,6 +205,11 @@ Example:
|
|
197
205
|
i-abcdefgh
|
198
206
|
i-hgfedcba
|
199
207
|
|
208
|
+
## Acknowledgements
|
209
|
+
|
210
|
+
Thanks to [Rylon](https://github.com/Rylon) for maintaining Capify-EC2 and
|
211
|
+
reviewing my thought processes for this project.
|
212
|
+
|
200
213
|
## Contributing
|
201
214
|
|
202
215
|
1. Fork it
|
data/lib/cap-ec2/ec2-handler.rb
CHANGED
@@ -68,8 +68,9 @@ module CapEC2
|
|
68
68
|
each_region do |ec2|
|
69
69
|
instances = ec2.instances
|
70
70
|
.filter(tag(project_tag), application)
|
71
|
-
|
72
|
-
|
71
|
+
servers << instances.select do |i|
|
72
|
+
i.tags[roles_tag] =~ /,{0,1}#{role}(,|$)/ && i.tags[stages_tag] =~ /,{0,1}#{stage}(,|$)/
|
73
|
+
end
|
73
74
|
end
|
74
75
|
servers.flatten
|
75
76
|
end
|
data/lib/cap-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -1,100 +1,114 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Andy Sykes
|
8
|
-
autorequire:
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
|
-
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '1.3'
|
20
|
-
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
21
26
|
requirements:
|
22
27
|
- - ~>
|
23
28
|
- !ruby/object:Gem::Version
|
24
29
|
version: '1.3'
|
25
|
-
prerelease: false
|
26
|
-
type: :development
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
35
34
|
requirements:
|
36
|
-
- - '>='
|
35
|
+
- - ! '>='
|
37
36
|
- !ruby/object:Gem::Version
|
38
37
|
version: '0'
|
39
|
-
prerelease: false
|
40
38
|
type: :development
|
41
|
-
|
42
|
-
name: aws-sdk
|
39
|
+
prerelease: false
|
43
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
44
42
|
requirements:
|
45
|
-
- - '>='
|
43
|
+
- - ! '>='
|
46
44
|
- !ruby/object:Gem::Version
|
47
45
|
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: aws-sdk
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
49
50
|
requirements:
|
50
|
-
- - '>='
|
51
|
+
- - ! '>='
|
51
52
|
- !ruby/object:Gem::Version
|
52
53
|
version: '0'
|
53
|
-
prerelease: false
|
54
54
|
type: :runtime
|
55
|
-
|
56
|
-
name: capistrano
|
55
|
+
prerelease: false
|
57
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
58
|
requirements:
|
59
|
-
- - '>='
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: capistrano
|
62
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
63
66
|
requirements:
|
64
|
-
- - '>='
|
67
|
+
- - ! '>='
|
65
68
|
- !ruby/object:Gem::Version
|
66
69
|
version: '3.0'
|
67
|
-
prerelease: false
|
68
70
|
type: :runtime
|
69
|
-
|
70
|
-
name: terminal-table
|
71
|
+
prerelease: false
|
71
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
72
74
|
requirements:
|
73
|
-
- - '>='
|
75
|
+
- - ! '>='
|
74
76
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
77
|
+
version: '3.0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: terminal-table
|
76
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
77
82
|
requirements:
|
78
|
-
- - '>='
|
83
|
+
- - ! '>='
|
79
84
|
- !ruby/object:Gem::Version
|
80
85
|
version: '0'
|
81
|
-
prerelease: false
|
82
86
|
type: :runtime
|
83
|
-
|
84
|
-
name: colored
|
87
|
+
prerelease: false
|
85
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
86
90
|
requirements:
|
87
|
-
- - '>='
|
91
|
+
- - ! '>='
|
88
92
|
- !ruby/object:Gem::Version
|
89
93
|
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: colored
|
90
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
91
98
|
requirements:
|
92
|
-
- - '>='
|
99
|
+
- - ! '>='
|
93
100
|
- !ruby/object:Gem::Version
|
94
101
|
version: '0'
|
95
|
-
prerelease: false
|
96
102
|
type: :runtime
|
97
|
-
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
description: Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon
|
111
|
+
EC2 instance tags, dynamically building the list of servers to be deployed to.
|
98
112
|
email:
|
99
113
|
- github@tinycat.co.uk
|
100
114
|
executables: []
|
@@ -116,25 +130,27 @@ files:
|
|
116
130
|
homepage: https://github.com/forward3d/cap-ec2
|
117
131
|
licenses:
|
118
132
|
- MIT
|
119
|
-
|
120
|
-
post_install_message:
|
133
|
+
post_install_message:
|
121
134
|
rdoc_options: []
|
122
135
|
require_paths:
|
123
136
|
- lib
|
124
137
|
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
125
139
|
requirements:
|
126
|
-
- - '>='
|
140
|
+
- - ! '>='
|
127
141
|
- !ruby/object:Gem::Version
|
128
142
|
version: '0'
|
129
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
130
145
|
requirements:
|
131
|
-
- - '>='
|
146
|
+
- - ! '>='
|
132
147
|
- !ruby/object:Gem::Version
|
133
148
|
version: '0'
|
134
149
|
requirements: []
|
135
|
-
rubyforge_project:
|
136
|
-
rubygems_version:
|
137
|
-
signing_key:
|
138
|
-
specification_version:
|
139
|
-
summary: Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon EC2
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 1.8.23
|
152
|
+
signing_key:
|
153
|
+
specification_version: 3
|
154
|
+
summary: Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon EC2
|
155
|
+
instance tags, dynamically building the list of servers to be deployed to.
|
140
156
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 5a25dd0326b87cea692c5705d43f18f0807e0bd4
|
4
|
-
data.tar.gz: b5ac734c1300be5f7c38d5cc1d3b09da10160a94
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 20b475068cfd99dc4cc37a54a1c3e1ad647d2e032a2bbe625d3a291be8648fcb95b839c056b740403fa49697079193f02b1d3334d4bbf48bf7aab1b2280f23af
|
7
|
-
data.tar.gz: 80d4a7e3694dc689ded905de412c40f1991ccb0f362e5a2637c1daea0df0a509965cc92bd7dc5739e7a143694134002221def62b7c55ef77720af6cc6e09975b
|