cap-ec2 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/cap-ec2/tasks/ec2.rake +5 -5
- data/lib/cap-ec2/utils.rb +10 -10
- data/lib/cap-ec2/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4bbb116bfecc7c7bbe859dcaac7ece035a536f4
|
4
|
+
data.tar.gz: cb31dd71930db40f5199aadcbcc7455d7f1f4d01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1832d4c81a4572db12ea5e0a62cdb4ff5112988a50bc6c41d879d140510229e447dbdfe294dc65a0a54ed7acf53ff18d26288eb1d3c02433cf609f537f888cc
|
7
|
+
data.tar.gz: 2abbaa814e856240ae4c0cc6e27eda3794be56f35ef2e75ae4a8a8b2a1f51fc18a8870b92a858c2a7136e624f22dd99fb14e79b7d93f6723a7ccba8ce581ab81
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -96,9 +96,9 @@ access_key_id: "YOUR ACCESS KEY"
|
|
96
96
|
secret_access_key: "YOUR SECRET KEY"
|
97
97
|
regions:
|
98
98
|
- 'eu-west-1'
|
99
|
-
|
100
|
-
|
101
|
-
|
99
|
+
project_tag: "Project"
|
100
|
+
roles_tag: "Roles"
|
101
|
+
stages_tag: "Stages"
|
102
102
|
```
|
103
103
|
|
104
104
|
|
data/lib/cap-ec2/tasks/ec2.rake
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
namespace :ec2 do
|
2
|
-
|
2
|
+
|
3
3
|
desc "Show all information about EC2 instances that match this project"
|
4
4
|
task :status do
|
5
5
|
ec2_handler.status_table
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
desc "Show EC2 server names that match this project"
|
9
9
|
task :server_names do
|
10
10
|
ec2_handler.server_names
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
desc "Show EC2 instance IDs that match this project"
|
14
14
|
task :instance_ids do
|
15
15
|
ec2_handler.instance_ids
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
end
|
19
19
|
|
20
20
|
|
@@ -26,7 +26,7 @@ namespace :load do
|
|
26
26
|
set :ec2_project_tag, 'Project'
|
27
27
|
set :ec2_roles_tag, 'Roles'
|
28
28
|
set :ec2_stages_tag, 'Stages'
|
29
|
-
|
29
|
+
|
30
30
|
set :ec2_access_key_id, nil
|
31
31
|
set :ec2_secret_access_key, nil
|
32
32
|
set :ec2_region, %w{}
|
data/lib/cap-ec2/utils.rb
CHANGED
@@ -3,19 +3,19 @@ module CapEC2
|
|
3
3
|
def project_tag
|
4
4
|
fetch(:ec2_project_tag)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def roles_tag
|
8
8
|
fetch(:ec2_roles_tag)
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def stages_tag
|
12
12
|
fetch(:ec2_stages_tag)
|
13
|
-
end
|
14
|
-
|
13
|
+
end
|
14
|
+
|
15
15
|
def self.contact_point(instance)
|
16
16
|
instance.public_dns_name || instance.public_ip_address || instance.private_ip_address
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def load_config
|
20
20
|
config_location = File.expand_path(fetch(:ec2_config), Dir.pwd) if fetch(:ec2_config)
|
21
21
|
if config_location && File.exists?(config_location)
|
@@ -24,22 +24,22 @@ module CapEC2
|
|
24
24
|
set :ec2_project_tag, config['project_tag'] if config['project_tag']
|
25
25
|
set :ec2_roles_tag, config['roles_tag'] if config['roles_tag']
|
26
26
|
set :ec2_stages_tag, config['stages_tag'] if config['stages_tag']
|
27
|
-
|
27
|
+
|
28
28
|
set :ec2_access_key_id, config['access_key_id'] if config['access_key_id']
|
29
29
|
set :ec2_secret_access_key, config['secret_access_key'] if config['secret_access_key']
|
30
30
|
set :ec2_region, config['regions'] if config['regions']
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
def get_regions(regions_array=nil)
|
36
|
-
unless regions_array.empty?
|
36
|
+
unless regions_array.nil? || regions_array.empty?
|
37
37
|
return regions_array
|
38
38
|
else
|
39
39
|
@ec2 = ec2_connect
|
40
40
|
@ec2.regions.map(&:name)
|
41
41
|
end
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
end
|
45
|
-
end
|
45
|
+
end
|
data/lib/cap-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Sykes
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -137,10 +137,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.2.
|
140
|
+
rubygems_version: 2.2.2
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon EC2
|
144
144
|
instance tags, dynamically building the list of servers to be deployed to.
|
145
145
|
test_files: []
|
146
|
-
has_rdoc:
|