capistrano-ec2 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/capistrano/ec2/capistrano_monkey_patch.rb +6 -1
- data/lib/capistrano/ec2/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ade641a736b75057363c695506044ce6d43423b1
|
4
|
+
data.tar.gz: 5529079ece7660d3f6b005ef77b36d4d2154c3e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ff70b25f147cf4e413caaa796eaaf10b558be61f470cf624975c6fb7366b1fab3b423182731c24a0d5179a5fec29e4c57753bb32177759b681fd636a912342
|
7
|
+
data.tar.gz: 19ddbb15384f1ea46422eb64bb0a7a3f5cd50c372fab7058631cd540e497edf87dbb2df8c6408915346fc0c990141ac8214fd370ce136c92ae2e665040ce36c2
|
data/README.md
CHANGED
@@ -37,6 +37,9 @@ default:
|
|
37
37
|
aws_secret_access_key: <YOUR_SECRET_ACCESS_KEY>
|
38
38
|
```
|
39
39
|
|
40
|
+
As an alternative to directly using credentials, you can also use IAM instance profiles by
|
41
|
+
setting `:use_iam_profile` to `true` in the deploy configuration.
|
42
|
+
|
40
43
|
**Usage:**
|
41
44
|
|
42
45
|
Tag your EC2 instances so you can target specific servers in your Capistrano configuration.
|
@@ -3,11 +3,16 @@ require 'fog/aws'
|
|
3
3
|
module Capistrano
|
4
4
|
class Configuration
|
5
5
|
def for_each_ec2_server(ec2_env:, ec2_role:, &block)
|
6
|
-
ec2 = Fog::Compute.new
|
6
|
+
ec2 = Fog::Compute.new \
|
7
|
+
provider: 'AWS',
|
8
|
+
region: fetch(:region),
|
9
|
+
use_iam_profile: fetch(:use_iam_profile, false)
|
7
10
|
|
8
11
|
filters = { "tag:ec2_env" => ec2_env, "tag:role" => ec2_role }
|
9
12
|
|
10
13
|
ec2.servers.all(filters).map.with_index do |ec2_server, index|
|
14
|
+
next unless ec2_server.ready?
|
15
|
+
|
11
16
|
yield ec2_server, index
|
12
17
|
end
|
13
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Vries
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.5.2
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: A Capistrano patch to simplify deployment to Amazon EC2.
|