cap-ec2 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/cap-ec2/capistrano.rb +1 -0
- data/lib/cap-ec2/ec2-handler.rb +3 -13
- data/lib/cap-ec2/status-table.rb +6 -4
- data/lib/cap-ec2/utils.rb +15 -0
- data/lib/cap-ec2/version.rb +1 -1
- metadata +25 -4
- checksums.yaml +0 -15
data/CHANGELOG.md
CHANGED
data/lib/cap-ec2/capistrano.rb
CHANGED
data/lib/cap-ec2/ec2-handler.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
module CapEC2
|
2
2
|
class EC2Handler
|
3
|
+
include CapEC2::Utils
|
3
4
|
|
4
5
|
def initialize(ec2_config = "config/ec2.yml")
|
5
6
|
@ec2_config = YAML.load_file ec2_config
|
@@ -15,7 +16,8 @@ module CapEC2
|
|
15
16
|
|
16
17
|
def status_table
|
17
18
|
CapEC2::StatusTable.new(
|
18
|
-
defined_roles.map {|r| get_servers_for_role(r)}.flatten.uniq {|i| i.instance_id}
|
19
|
+
defined_roles.map {|r| get_servers_for_role(r)}.flatten.uniq {|i| i.instance_id},
|
20
|
+
@ec2_config
|
19
21
|
)
|
20
22
|
end
|
21
23
|
|
@@ -47,18 +49,6 @@ module CapEC2
|
|
47
49
|
Capistrano::Configuration.env.fetch(:application).to_s
|
48
50
|
end
|
49
51
|
|
50
|
-
def project_tag
|
51
|
-
@ec2_config["project_tag"] || "Project"
|
52
|
-
end
|
53
|
-
|
54
|
-
def roles_tag
|
55
|
-
@ec2_config["roles_tag"] || "Roles"
|
56
|
-
end
|
57
|
-
|
58
|
-
def stages_tag
|
59
|
-
@ec2_config["stages_tag"] || "Stages"
|
60
|
-
end
|
61
|
-
|
62
52
|
def tag(tag_name)
|
63
53
|
"tag:#{tag_name}"
|
64
54
|
end
|
data/lib/cap-ec2/status-table.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module CapEC2
|
2
2
|
class StatusTable
|
3
|
+
include CapEC2::Utils
|
3
4
|
|
4
|
-
def initialize(instances)
|
5
|
+
def initialize(instances, ec2_config)
|
5
6
|
@instances = instances
|
7
|
+
@ec2_config = ec2_config
|
6
8
|
output
|
7
9
|
end
|
8
10
|
|
@@ -15,7 +17,7 @@ module CapEC2
|
|
15
17
|
"DNS".bold,
|
16
18
|
"Zone".bold,
|
17
19
|
"Roles".bold,
|
18
|
-
"
|
20
|
+
"Stages".bold
|
19
21
|
]
|
20
22
|
end
|
21
23
|
|
@@ -42,8 +44,8 @@ module CapEC2
|
|
42
44
|
instance.instance_type.cyan,
|
43
45
|
instance.contact_point.blue.bold,
|
44
46
|
instance.availability_zone.magenta,
|
45
|
-
instance.tags[
|
46
|
-
instance.tags[
|
47
|
+
instance.tags[roles_tag].yellow,
|
48
|
+
instance.tags[stages_tag].yellow
|
47
49
|
]
|
48
50
|
end
|
49
51
|
end
|
data/lib/cap-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
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.4
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Andy Sykes
|
@@ -13,6 +14,7 @@ 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
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: aws-sdk
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: capistrano
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :runtime
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: terminal-table
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ! '>='
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :runtime
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ! '>='
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,6 +94,7 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: colored
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
@@ -90,6 +102,7 @@ dependencies:
|
|
90
102
|
type: :runtime
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
@@ -114,30 +127,38 @@ files:
|
|
114
127
|
- lib/cap-ec2/instance.rb
|
115
128
|
- lib/cap-ec2/status-table.rb
|
116
129
|
- lib/cap-ec2/tasks/ec2.rake
|
130
|
+
- lib/cap-ec2/utils.rb
|
117
131
|
- lib/cap-ec2/version.rb
|
118
132
|
homepage: https://github.com/forward3d/cap-ec2
|
119
133
|
licenses:
|
120
134
|
- MIT
|
121
|
-
metadata: {}
|
122
135
|
post_install_message:
|
123
136
|
rdoc_options: []
|
124
137
|
require_paths:
|
125
138
|
- lib
|
126
139
|
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
127
141
|
requirements:
|
128
142
|
- - ! '>='
|
129
143
|
- !ruby/object:Gem::Version
|
130
144
|
version: '0'
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
hash: 4028895032890582237
|
131
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
132
150
|
requirements:
|
133
151
|
- - ! '>='
|
134
152
|
- !ruby/object:Gem::Version
|
135
153
|
version: '0'
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
hash: 4028895032890582237
|
136
157
|
requirements: []
|
137
158
|
rubyforge_project:
|
138
|
-
rubygems_version:
|
159
|
+
rubygems_version: 1.8.23
|
139
160
|
signing_key:
|
140
|
-
specification_version:
|
161
|
+
specification_version: 3
|
141
162
|
summary: Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon EC2
|
142
163
|
instance tags, dynamically building the list of servers to be deployed to.
|
143
164
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
MzU3OWQxZWU3OTAxMmE0MjUyMWU4MTFhOTM0NWJkNTcxNTY4NzYwYQ==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MWJiODFiNDUyMzQ1YzU2MTM3MDRmOWE5ZmMwODM5NWU0NDI5NjZiNg==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NmJiNWE2MTZlYTA1Mjk3Y2VlMWFmYzg0OWI1NDNiNjJlMDgxNDFjZGQwODg4
|
10
|
-
MTM2OTJjMGUxMzM3ODFkMzQ4OTMzNTIxNzY2MDUyZmEwNGY1NWNmZmQ1OTZi
|
11
|
-
OWQ1MTdmZWFkODgxMjkwNTQ0ZmM4YzRiM2RiZWVlNmVmZmRkNWY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTQyNmY3OWM0ZGE5Zjg4NzE4NjNlNTdlMzFmMGExMmMzNTZkMTE2NGU4ZTE3
|
14
|
-
ODU5MmJjNjJiZDk5NzczZjRhNTQ1NGEwNDE2OWUxZDE3NmYyYmY0MjQzOWYw
|
15
|
-
OWJkMDM3M2I1OWZmNTVmMmU3NTEwYTRlZWY3ZjM1ZTdlNmYzNDE=
|