elbas 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e544ce8dcc90dbf23bf58733836d3681fc98527ffd04f6cae4c32751f41b74e5
4
- data.tar.gz: bfcbcf9b0a0dbe759d7f89c68d1242ea86ee807675df9666555dd532956d638e
3
+ metadata.gz: 995fe56e0e1264e2da002e25c2d3987d4100dc0c1e539af8fbed211d3f76706a
4
+ data.tar.gz: d53b2142afe2d59f9b00518f086c147a44a88ead7c0243b606ccf204958034c8
5
5
  SHA512:
6
- metadata.gz: 02a53a716c4477f34e29b08f90f4b98529b618ff1d186441bcc89e0ef413f738449e943c90dda0422924e7b01fcdb119ede5b1c0f26a5cf088bd2ce82584dda9
7
- data.tar.gz: e297a71c2aeb28c9019d8e022befe28cbd9a727ef21346292631a3cba2531e2b6d2314cdb4b6bbcea4aa4d70aba64537032c94af812cd2d4190498e7e619a94f
6
+ metadata.gz: 78b5b6892b5c0e45dfebb25ef9ef3d95df2f357ddc6f68b2f28dbccac1ea3e552558ef10e3840cb412bdb6440d999fcde6f381f2c932a1639702a4b6f95a9c9c
7
+ data.tar.gz: eb179f0ed0f60a9f70cf59f560c04a6ba3f372396ba19b5f4c7e9a35d05c3ad79d1b86eee25f06918488551767d3c4b734b216005bc7ebe694cfa5651aca6127
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.6'
22
+ spec.add_development_dependency 'byebug'
22
23
  spec.add_development_dependency 'rake'
23
24
  spec.add_development_dependency 'rspec'
24
25
  spec.add_development_dependency 'webmock'
@@ -28,9 +28,8 @@ module Elbas
28
28
  def query_instances_by_ids(ids)
29
29
  aws_client
30
30
  .describe_instances(instance_ids: @ids)
31
- .reservations[0]
32
- .instances
31
+ .reservations.flat_map(&:instances)
33
32
  end
34
33
  end
35
34
  end
36
- end
35
+ end
@@ -2,7 +2,7 @@ require 'capistrano/dsl'
2
2
 
3
3
  load File.expand_path("../tasks/elbas.rake", __FILE__)
4
4
 
5
- def autoscale(groupname, *args)
5
+ def autoscale(groupname, properties = {})
6
6
  include Capistrano::DSL
7
7
  include Elbas::Logger
8
8
 
@@ -11,9 +11,14 @@ def autoscale(groupname, *args)
11
11
  asg = Elbas::AWS::AutoscaleGroup.new groupname
12
12
  instances = asg.instances.running
13
13
 
14
- instances.each do |instance|
14
+ instances.each.with_index do |instance, i|
15
15
  info "Adding server: #{instance.hostname}"
16
- server instance.hostname, *args
16
+
17
+ props = nil
18
+ props = yield(instance, i) if block_given?
19
+ props ||= properties
20
+
21
+ server instance.hostname, props
17
22
  end
18
23
 
19
24
  if instances.any?
@@ -1,3 +1,3 @@
1
1
  module Elbas
2
- VERSION = '3.0.1'.freeze
2
+ VERSION = '3.0.2'.freeze
3
3
  end
@@ -1,28 +1,38 @@
1
1
  describe Elbas::AWS::InstanceCollection do
2
2
  subject { Elbas::AWS::InstanceCollection.new ['i-1234567890', 'i-500'] }
3
3
 
4
- before do
5
- webmock :post, %r{ec2.(.*).amazonaws.com\/\z} => 'DescribeInstances.200.xml',
6
- with: Hash[body: /Action=DescribeInstances/]
7
- end
4
+ scenarios = [
5
+ { context: 'Single AWS reservation', mock_response_file: 'DescribeInstances.200.xml' },
6
+ { context: 'Multiple AWS reservation', mock_response_file: 'DescribeInstances_MultipleReservations.200.xml' }
7
+ ]
8
8
 
9
- describe '#instances' do
10
- it 'returns Instance objects with name/hostname/state' do
11
- expect(subject.instances[0].id).to eq 'i-1234567890'
12
- expect(subject.instances[0].hostname).to eq 'ec2-1234567890.amazonaws.com'
13
- expect(subject.instances[0].state).to eq 16
9
+ scenarios.each do |scenario|
10
+ context scenario[:context] do
11
+ before do
12
+ webmock :post, %r{ec2.(.*).amazonaws.com\/\z} => scenario[:mock_response_file],
13
+ with: Hash[body: /Action=DescribeInstances/]
14
+ end
14
15
 
15
- expect(subject.instances[1].id).to eq 'i-500'
16
- expect(subject.instances[1].hostname).to eq 'ec2-500.amazonaws.com'
17
- expect(subject.instances[1].state).to eq 32
18
- end
19
- end
16
+ describe '#instances' do
17
+ it 'returns Instance objects with name/hostname/state' do
18
+ expect(subject.instances[0].id).to eq 'i-1234567890'
19
+ expect(subject.instances[0].hostname).to eq 'ec2-1234567890.amazonaws.com'
20
+ expect(subject.instances[0].state).to eq 16
20
21
 
21
- describe '#running' do
22
- it 'returns only running instances' do
23
- expect(subject.instances.size).to eq 2
24
- expect(subject.running.size).to eq 1
25
- expect(subject.running[0].id).to eq 'i-1234567890'
22
+ expect(subject.instances[1].id).to eq 'i-500'
23
+ expect(subject.instances[1].hostname).to eq 'ec2-500.amazonaws.com'
24
+ expect(subject.instances[1].state).to eq 32
25
+ end
26
+ end
27
+
28
+ describe '#running' do
29
+ it 'returns only running instances' do
30
+ expect(subject.instances.size).to eq 2
31
+ expect(subject.running.size).to eq 1
32
+ expect(subject.running[0].id).to eq 'i-1234567890'
33
+ end
34
+ end
26
35
  end
27
36
  end
28
- end
37
+
38
+ end
@@ -0,0 +1,66 @@
1
+ require 'elbas/capistrano'
2
+
3
+ describe '#autoscale' do
4
+ before do
5
+ Capistrano::Configuration.reset!
6
+ Rake::Task.define_task('deploy') {}
7
+
8
+ webmock :post, %r{autoscaling.(.*).amazonaws.com\/\z} => 'DescribeAutoScalingGroups.200.xml',
9
+ with: Hash[body: /Action=DescribeAutoScalingGroups/]
10
+ end
11
+
12
+ context 'one server' do
13
+ before do
14
+ webmock :post, %r{ec2.(.*).amazonaws.com\/\z} => 'DescribeInstances.200.xml',
15
+ with: Hash[body: /Action=DescribeInstances/]
16
+ end
17
+
18
+ it 'adds the server hostname' do
19
+ autoscale 'test-asg'
20
+ expect(env.servers.count).to eq 1
21
+ expect(env.servers.first.hostname).to eq 'ec2-1234567890.amazonaws.com'
22
+ end
23
+
24
+ it 'passes along the properties' do
25
+ autoscale 'test-asg', roles: [:db], primary: true
26
+ expect(env.servers.first.properties.roles).to match_array [:db]
27
+ expect(env.servers.first.properties.primary).to eq true
28
+ end
29
+ end
30
+
31
+ context 'multiple servers' do
32
+ before do
33
+ webmock :post, %r{ec2.(.*).amazonaws.com\/\z} => 'DescribeInstances_MultipleRunning.200.xml',
34
+ with: Hash[body: /Action=DescribeInstances/]
35
+ end
36
+
37
+ it 'adds multiple server hostnames' do
38
+ autoscale 'test-asg'
39
+ expect(env.servers.count).to eq 2
40
+ expect(env.servers.map(&:hostname)).to match_array ['ec2-1234567890.amazonaws.com', 'ec2-1122334455.amazonaws.com']
41
+ end
42
+
43
+ it 'passes along the properties' do
44
+ autoscale 'test-asg', roles: [:db], primary: true
45
+ count = 0
46
+ env.servers.each do |server|
47
+ count = count + 1
48
+ expect(server.properties.roles).to match_array [:db]
49
+ expect(server.properties.primary).to eq true
50
+ end
51
+ expect(count).to eq 2
52
+ end
53
+
54
+ it 'yields to find properties if a block is given' do
55
+ autoscale 'test-asg', roles: [:web] do |server, i|
56
+ { roles: [:web, :db], primary: true } if i == 0
57
+ end
58
+
59
+ expect(env.servers.to_a[0].properties.roles).to match_array [:web, :db]
60
+ expect(env.servers.to_a[0].properties.primary).to eq true
61
+
62
+ expect(env.servers.to_a[1].properties.roles).to match_array [:web]
63
+ expect(env.servers.to_a[1].properties.keys).to_not include :primary
64
+ end
65
+ end
66
+ end
@@ -1,5 +1,6 @@
1
1
  require 'webmock'
2
2
  require 'capistrano/all'
3
+ require 'byebug'
3
4
 
4
5
  ENV['AWS_REGION'] = 'us-east-1'
5
6
  ENV['AWS_ACCESS_KEY_ID'] = 'test-access'
@@ -19,4 +20,8 @@ require 'webmock-rspec-helper'
19
20
 
20
21
  WebMock.disable_net_connect!
21
22
 
22
- Dir[File.join(File.expand_path('../..', __FILE__), 'spec', 'support', '**', '*.rb')].each { |f| require f }
23
+ Dir[File.join(File.expand_path('../..', __FILE__), 'spec', 'support', '**', '*.rb')].each { |f| require f }
24
+
25
+ RSpec.configure do |c|
26
+ c.include Capistrano::DSL
27
+ end
@@ -0,0 +1,243 @@
1
+ <DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2014-10-01/">
2
+ <requestId>fdcdcab1-ae5c-489e-9c33-4637c5dda355</requestId>
3
+ <reservationSet>
4
+ <item>
5
+ <reservationId>r-1a2b3c4d</reservationId>
6
+ <ownerId>123456789012</ownerId>
7
+ <groupSet>
8
+ <item>
9
+ <groupId>sg-1a2b3c4d</groupId>
10
+ <groupName>my-security-group</groupName>
11
+ </item>
12
+ </groupSet>
13
+ <instancesSet>
14
+ <item>
15
+ <instanceId>i-1234567890</instanceId>
16
+ <imageId>ami-1a2b3c4d</imageId>
17
+ <instanceState>
18
+ <code>16</code>
19
+ <name>running</name>
20
+ </instanceState>
21
+ <privateDnsName/>
22
+ <dnsName>ec2-1234567890.amazonaws.com</dnsName>
23
+ <reason/>
24
+ <keyName>my-key-pair</keyName>
25
+ <amiLaunchIndex>0</amiLaunchIndex>
26
+ <productCodes/>
27
+ <instanceType>c1.medium</instanceType>
28
+ <launchTime>Y2035-02-09T23:17:13Z+0000</launchTime>
29
+ <placement>
30
+ <availabilityZone>us-west-2a</availabilityZone>
31
+ <groupName/>
32
+ <tenancy>default</tenancy>
33
+ </placement>
34
+ <platform>windows</platform>
35
+ <monitoring>
36
+ <state>disabled</state>
37
+ </monitoring>
38
+ <subnetId>subnet-1a2b3c4d</subnetId>
39
+ <vpcId>vpc-1a2b3c4d</vpcId>
40
+ <privateIpAddress>10.0.0.12</privateIpAddress>
41
+ <ipAddress>46.51.219.63</ipAddress>
42
+ <sourceDestCheck>true</sourceDestCheck>
43
+ <groupSet>
44
+ <item>
45
+ <groupId>sg-1a2b3c4d</groupId>
46
+ <groupName>my-security-group</groupName>
47
+ </item>
48
+ </groupSet>
49
+ <architecture>x86_64</architecture>
50
+ <rootDeviceType>ebs</rootDeviceType>
51
+ <rootDeviceName>/dev/sda1</rootDeviceName>
52
+ <blockDeviceMapping>
53
+ <item>
54
+ <deviceName>/dev/sda1</deviceName>
55
+ <ebs>
56
+ <volumeId>vol-1a2b3c4d</volumeId>
57
+ <status>attached</status>
58
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
59
+ <deleteOnTermination>true</deleteOnTermination>
60
+ </ebs>
61
+ </item>
62
+ </blockDeviceMapping>
63
+ <virtualizationType>hvm</virtualizationType>
64
+ <clientToken>ABCDE1234567890123</clientToken>
65
+ <tagSet>
66
+ <item>
67
+ <key>Name</key>
68
+ <value>Windows Instance</value>
69
+ </item>
70
+ </tagSet>
71
+ <hypervisor>xen</hypervisor>
72
+ <networkInterfaceSet>
73
+ <item>
74
+ <networkInterfaceId>eni-1a2b3c4d</networkInterfaceId>
75
+ <subnetId>subnet-1a2b3c4d</subnetId>
76
+ <vpcId>vpc-1a2b3c4d</vpcId>
77
+ <description>Primary network interface</description>
78
+ <ownerId>123456789012</ownerId>
79
+ <status>in-use</status>
80
+ <macAddress>1b:2b:3c:4d:5e:6f</macAddress>
81
+ <privateIpAddress>10.0.0.12</privateIpAddress>
82
+ <sourceDestCheck>true</sourceDestCheck>
83
+ <groupSet>
84
+ <item>
85
+ <groupId>sg-1a2b3c4d</groupId>
86
+ <groupName>my-security-group</groupName>
87
+ </item>
88
+ </groupSet>
89
+ <attachment>
90
+ <attachmentId>eni-attach-1a2b3c4d</attachmentId>
91
+ <deviceIndex>0</deviceIndex>
92
+ <status>attached</status>
93
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
94
+ <deleteOnTermination>true</deleteOnTermination>
95
+ </attachment>
96
+ <association>
97
+ <publicIp>198.51.100.63</publicIp>
98
+ <ipOwnerId>123456789012</ipOwnerId>
99
+ </association>
100
+ <privateIpAddressesSet>
101
+ <item>
102
+ <privateIpAddress>10.0.0.12</privateIpAddress>
103
+ <primary>true</primary>
104
+ <association>
105
+ <publicIp>198.51.100.63</publicIp>
106
+ <ipOwnerId>123456789012</ipOwnerId>
107
+ </association>
108
+ </item>
109
+ <item>
110
+ <privateIpAddress>10.0.0.14</privateIpAddress>
111
+ <primary>false</primary>
112
+ <association>
113
+ <publicIp>198.51.100.177</publicIp>
114
+ <ipOwnerId>123456789012</ipOwnerId>
115
+ </association>
116
+ </item>
117
+ </privateIpAddressesSet>
118
+ </item>
119
+ </networkInterfaceSet>
120
+ </item>
121
+ </instancesSet>
122
+ </item>
123
+ <item>
124
+ <reservationId>r-1a2b3c4d</reservationId>
125
+ <ownerId>123456789012</ownerId>
126
+ <groupSet>
127
+ <item>
128
+ <groupId>sg-1a2b3c4d</groupId>
129
+ <groupName>my-security-group</groupName>
130
+ </item>
131
+ </groupSet>
132
+ <instancesSet>
133
+ <item>
134
+ <instanceId>i-500</instanceId>
135
+ <imageId>ami-1a2b3c4d</imageId>
136
+ <instanceState>
137
+ <code>32</code>
138
+ <name>shutting-down</name>
139
+ </instanceState>
140
+ <privateDnsName/>
141
+ <dnsName>ec2-500.amazonaws.com</dnsName>
142
+ <reason/>
143
+ <keyName>my-key-pair</keyName>
144
+ <amiLaunchIndex>0</amiLaunchIndex>
145
+ <productCodes/>
146
+ <instanceType>c1.medium</instanceType>
147
+ <launchTime>Y2035-02-09T23:17:13Z+0000</launchTime>
148
+ <placement>
149
+ <availabilityZone>us-west-2a</availabilityZone>
150
+ <groupName/>
151
+ <tenancy>default</tenancy>
152
+ </placement>
153
+ <platform>windows</platform>
154
+ <monitoring>
155
+ <state>disabled</state>
156
+ </monitoring>
157
+ <subnetId>subnet-1a2b3c4d</subnetId>
158
+ <vpcId>vpc-1a2b3c4d</vpcId>
159
+ <privateIpAddress>10.0.0.12</privateIpAddress>
160
+ <ipAddress>46.51.219.63</ipAddress>
161
+ <sourceDestCheck>true</sourceDestCheck>
162
+ <groupSet>
163
+ <item>
164
+ <groupId>sg-1a2b3c4d</groupId>
165
+ <groupName>my-security-group</groupName>
166
+ </item>
167
+ </groupSet>
168
+ <architecture>x86_64</architecture>
169
+ <rootDeviceType>ebs</rootDeviceType>
170
+ <rootDeviceName>/dev/sda1</rootDeviceName>
171
+ <blockDeviceMapping>
172
+ <item>
173
+ <deviceName>/dev/sda1</deviceName>
174
+ <ebs>
175
+ <volumeId>vol-1a2b3c4d</volumeId>
176
+ <status>attached</status>
177
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
178
+ <deleteOnTermination>true</deleteOnTermination>
179
+ </ebs>
180
+ </item>
181
+ </blockDeviceMapping>
182
+ <virtualizationType>hvm</virtualizationType>
183
+ <clientToken>ABCDE1234567890123</clientToken>
184
+ <tagSet>
185
+ <item>
186
+ <key>Name</key>
187
+ <value>Windows Instance</value>
188
+ </item>
189
+ </tagSet>
190
+ <hypervisor>xen</hypervisor>
191
+ <networkInterfaceSet>
192
+ <item>
193
+ <networkInterfaceId>eni-1a2b3c4d</networkInterfaceId>
194
+ <subnetId>subnet-1a2b3c4d</subnetId>
195
+ <vpcId>vpc-1a2b3c4d</vpcId>
196
+ <description>Primary network interface</description>
197
+ <ownerId>123456789012</ownerId>
198
+ <status>in-use</status>
199
+ <macAddress>1b:2b:3c:4d:5e:6f</macAddress>
200
+ <privateIpAddress>10.0.0.12</privateIpAddress>
201
+ <sourceDestCheck>true</sourceDestCheck>
202
+ <groupSet>
203
+ <item>
204
+ <groupId>sg-1a2b3c4d</groupId>
205
+ <groupName>my-security-group</groupName>
206
+ </item>
207
+ </groupSet>
208
+ <attachment>
209
+ <attachmentId>eni-attach-1a2b3c4d</attachmentId>
210
+ <deviceIndex>0</deviceIndex>
211
+ <status>attached</status>
212
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
213
+ <deleteOnTermination>true</deleteOnTermination>
214
+ </attachment>
215
+ <association>
216
+ <publicIp>198.51.100.63</publicIp>
217
+ <ipOwnerId>123456789012</ipOwnerId>
218
+ </association>
219
+ <privateIpAddressesSet>
220
+ <item>
221
+ <privateIpAddress>10.0.0.12</privateIpAddress>
222
+ <primary>true</primary>
223
+ <association>
224
+ <publicIp>198.51.100.63</publicIp>
225
+ <ipOwnerId>123456789012</ipOwnerId>
226
+ </association>
227
+ </item>
228
+ <item>
229
+ <privateIpAddress>10.0.0.14</privateIpAddress>
230
+ <primary>false</primary>
231
+ <association>
232
+ <publicIp>198.51.100.177</publicIp>
233
+ <ipOwnerId>123456789012</ipOwnerId>
234
+ </association>
235
+ </item>
236
+ </privateIpAddressesSet>
237
+ </item>
238
+ </networkInterfaceSet>
239
+ </item>
240
+ </instancesSet>
241
+ </item>
242
+ </reservationSet>
243
+ </DescribeInstancesResponse>
@@ -0,0 +1,338 @@
1
+ <DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2014-10-01/">
2
+ <requestId>fdcdcab1-ae5c-489e-9c33-4637c5dda355</requestId>
3
+ <reservationSet>
4
+ <item>
5
+ <reservationId>r-1a2b3c4d</reservationId>
6
+ <ownerId>123456789012</ownerId>
7
+ <groupSet>
8
+ <item>
9
+ <groupId>sg-1a2b3c4d</groupId>
10
+ <groupName>my-security-group</groupName>
11
+ </item>
12
+ </groupSet>
13
+ <instancesSet>
14
+ <item>
15
+ <instanceId>i-1234567890</instanceId>
16
+ <imageId>ami-1a2b3c4d</imageId>
17
+ <instanceState>
18
+ <code>16</code>
19
+ <name>running</name>
20
+ </instanceState>
21
+ <privateDnsName/>
22
+ <dnsName>ec2-1234567890.amazonaws.com</dnsName>
23
+ <reason/>
24
+ <keyName>my-key-pair</keyName>
25
+ <amiLaunchIndex>0</amiLaunchIndex>
26
+ <productCodes/>
27
+ <instanceType>c1.medium</instanceType>
28
+ <launchTime>Y2035-02-09T23:17:13Z+0000</launchTime>
29
+ <placement>
30
+ <availabilityZone>us-west-2a</availabilityZone>
31
+ <groupName/>
32
+ <tenancy>default</tenancy>
33
+ </placement>
34
+ <platform>windows</platform>
35
+ <monitoring>
36
+ <state>disabled</state>
37
+ </monitoring>
38
+ <subnetId>subnet-1a2b3c4d</subnetId>
39
+ <vpcId>vpc-1a2b3c4d</vpcId>
40
+ <privateIpAddress>10.0.0.12</privateIpAddress>
41
+ <ipAddress>46.51.219.63</ipAddress>
42
+ <sourceDestCheck>true</sourceDestCheck>
43
+ <groupSet>
44
+ <item>
45
+ <groupId>sg-1a2b3c4d</groupId>
46
+ <groupName>my-security-group</groupName>
47
+ </item>
48
+ </groupSet>
49
+ <architecture>x86_64</architecture>
50
+ <rootDeviceType>ebs</rootDeviceType>
51
+ <rootDeviceName>/dev/sda1</rootDeviceName>
52
+ <blockDeviceMapping>
53
+ <item>
54
+ <deviceName>/dev/sda1</deviceName>
55
+ <ebs>
56
+ <volumeId>vol-1a2b3c4d</volumeId>
57
+ <status>attached</status>
58
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
59
+ <deleteOnTermination>true</deleteOnTermination>
60
+ </ebs>
61
+ </item>
62
+ </blockDeviceMapping>
63
+ <virtualizationType>hvm</virtualizationType>
64
+ <clientToken>ABCDE1234567890123</clientToken>
65
+ <tagSet>
66
+ <item>
67
+ <key>Name</key>
68
+ <value>Windows Instance</value>
69
+ </item>
70
+ </tagSet>
71
+ <hypervisor>xen</hypervisor>
72
+ <networkInterfaceSet>
73
+ <item>
74
+ <networkInterfaceId>eni-1a2b3c4d</networkInterfaceId>
75
+ <subnetId>subnet-1a2b3c4d</subnetId>
76
+ <vpcId>vpc-1a2b3c4d</vpcId>
77
+ <description>Primary network interface</description>
78
+ <ownerId>123456789012</ownerId>
79
+ <status>in-use</status>
80
+ <macAddress>1b:2b:3c:4d:5e:6f</macAddress>
81
+ <privateIpAddress>10.0.0.12</privateIpAddress>
82
+ <sourceDestCheck>true</sourceDestCheck>
83
+ <groupSet>
84
+ <item>
85
+ <groupId>sg-1a2b3c4d</groupId>
86
+ <groupName>my-security-group</groupName>
87
+ </item>
88
+ </groupSet>
89
+ <attachment>
90
+ <attachmentId>eni-attach-1a2b3c4d</attachmentId>
91
+ <deviceIndex>0</deviceIndex>
92
+ <status>attached</status>
93
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
94
+ <deleteOnTermination>true</deleteOnTermination>
95
+ </attachment>
96
+ <association>
97
+ <publicIp>198.51.100.63</publicIp>
98
+ <ipOwnerId>123456789012</ipOwnerId>
99
+ </association>
100
+ <privateIpAddressesSet>
101
+ <item>
102
+ <privateIpAddress>10.0.0.12</privateIpAddress>
103
+ <primary>true</primary>
104
+ <association>
105
+ <publicIp>198.51.100.63</publicIp>
106
+ <ipOwnerId>123456789012</ipOwnerId>
107
+ </association>
108
+ </item>
109
+ <item>
110
+ <privateIpAddress>10.0.0.14</privateIpAddress>
111
+ <primary>false</primary>
112
+ <association>
113
+ <publicIp>198.51.100.177</publicIp>
114
+ <ipOwnerId>123456789012</ipOwnerId>
115
+ </association>
116
+ </item>
117
+ </privateIpAddressesSet>
118
+ </item>
119
+ </networkInterfaceSet>
120
+ </item>
121
+ <item>
122
+ <instanceId>i-1122334455</instanceId>
123
+ <imageId>ami-1a2b3c4d</imageId>
124
+ <instanceState>
125
+ <code>16</code>
126
+ <name>running</name>
127
+ </instanceState>
128
+ <privateDnsName/>
129
+ <dnsName>ec2-1122334455.amazonaws.com</dnsName>
130
+ <reason/>
131
+ <keyName>my-key-pair</keyName>
132
+ <amiLaunchIndex>0</amiLaunchIndex>
133
+ <productCodes/>
134
+ <instanceType>c1.medium</instanceType>
135
+ <launchTime>Y2035-02-09T23:17:13Z+0000</launchTime>
136
+ <placement>
137
+ <availabilityZone>us-west-2a</availabilityZone>
138
+ <groupName/>
139
+ <tenancy>default</tenancy>
140
+ </placement>
141
+ <platform>windows</platform>
142
+ <monitoring>
143
+ <state>disabled</state>
144
+ </monitoring>
145
+ <subnetId>subnet-1a2b3c4d</subnetId>
146
+ <vpcId>vpc-1a2b3c4d</vpcId>
147
+ <privateIpAddress>10.0.0.12</privateIpAddress>
148
+ <ipAddress>46.51.219.63</ipAddress>
149
+ <sourceDestCheck>true</sourceDestCheck>
150
+ <groupSet>
151
+ <item>
152
+ <groupId>sg-1a2b3c4d</groupId>
153
+ <groupName>my-security-group</groupName>
154
+ </item>
155
+ </groupSet>
156
+ <architecture>x86_64</architecture>
157
+ <rootDeviceType>ebs</rootDeviceType>
158
+ <rootDeviceName>/dev/sda1</rootDeviceName>
159
+ <blockDeviceMapping>
160
+ <item>
161
+ <deviceName>/dev/sda1</deviceName>
162
+ <ebs>
163
+ <volumeId>vol-1a2b3c4d</volumeId>
164
+ <status>attached</status>
165
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
166
+ <deleteOnTermination>true</deleteOnTermination>
167
+ </ebs>
168
+ </item>
169
+ </blockDeviceMapping>
170
+ <virtualizationType>hvm</virtualizationType>
171
+ <clientToken>ABCDE1234567890123</clientToken>
172
+ <tagSet>
173
+ <item>
174
+ <key>Name</key>
175
+ <value>Windows Instance</value>
176
+ </item>
177
+ </tagSet>
178
+ <hypervisor>xen</hypervisor>
179
+ <networkInterfaceSet>
180
+ <item>
181
+ <networkInterfaceId>eni-1a2b3c4d</networkInterfaceId>
182
+ <subnetId>subnet-1a2b3c4d</subnetId>
183
+ <vpcId>vpc-1a2b3c4d</vpcId>
184
+ <description>Primary network interface</description>
185
+ <ownerId>123456789012</ownerId>
186
+ <status>in-use</status>
187
+ <macAddress>1b:2b:3c:4d:5e:6f</macAddress>
188
+ <privateIpAddress>10.0.0.12</privateIpAddress>
189
+ <sourceDestCheck>true</sourceDestCheck>
190
+ <groupSet>
191
+ <item>
192
+ <groupId>sg-1a2b3c4d</groupId>
193
+ <groupName>my-security-group</groupName>
194
+ </item>
195
+ </groupSet>
196
+ <attachment>
197
+ <attachmentId>eni-attach-1a2b3c4d</attachmentId>
198
+ <deviceIndex>0</deviceIndex>
199
+ <status>attached</status>
200
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
201
+ <deleteOnTermination>true</deleteOnTermination>
202
+ </attachment>
203
+ <association>
204
+ <publicIp>198.51.100.63</publicIp>
205
+ <ipOwnerId>123456789012</ipOwnerId>
206
+ </association>
207
+ <privateIpAddressesSet>
208
+ <item>
209
+ <privateIpAddress>10.0.0.12</privateIpAddress>
210
+ <primary>true</primary>
211
+ <association>
212
+ <publicIp>198.51.100.63</publicIp>
213
+ <ipOwnerId>123456789012</ipOwnerId>
214
+ </association>
215
+ </item>
216
+ <item>
217
+ <privateIpAddress>10.0.0.14</privateIpAddress>
218
+ <primary>false</primary>
219
+ <association>
220
+ <publicIp>198.51.100.177</publicIp>
221
+ <ipOwnerId>123456789012</ipOwnerId>
222
+ </association>
223
+ </item>
224
+ </privateIpAddressesSet>
225
+ </item>
226
+ </networkInterfaceSet>
227
+ </item>
228
+ <item>
229
+ <instanceId>i-500</instanceId>
230
+ <imageId>ami-1a2b3c4d</imageId>
231
+ <instanceState>
232
+ <code>32</code>
233
+ <name>shutting-down</name>
234
+ </instanceState>
235
+ <privateDnsName/>
236
+ <dnsName>ec2-500.amazonaws.com</dnsName>
237
+ <reason/>
238
+ <keyName>my-key-pair</keyName>
239
+ <amiLaunchIndex>0</amiLaunchIndex>
240
+ <productCodes/>
241
+ <instanceType>c1.medium</instanceType>
242
+ <launchTime>Y2035-02-09T23:17:13Z+0000</launchTime>
243
+ <placement>
244
+ <availabilityZone>us-west-2a</availabilityZone>
245
+ <groupName/>
246
+ <tenancy>default</tenancy>
247
+ </placement>
248
+ <platform>windows</platform>
249
+ <monitoring>
250
+ <state>disabled</state>
251
+ </monitoring>
252
+ <subnetId>subnet-1a2b3c4d</subnetId>
253
+ <vpcId>vpc-1a2b3c4d</vpcId>
254
+ <privateIpAddress>10.0.0.12</privateIpAddress>
255
+ <ipAddress>46.51.219.63</ipAddress>
256
+ <sourceDestCheck>true</sourceDestCheck>
257
+ <groupSet>
258
+ <item>
259
+ <groupId>sg-1a2b3c4d</groupId>
260
+ <groupName>my-security-group</groupName>
261
+ </item>
262
+ </groupSet>
263
+ <architecture>x86_64</architecture>
264
+ <rootDeviceType>ebs</rootDeviceType>
265
+ <rootDeviceName>/dev/sda1</rootDeviceName>
266
+ <blockDeviceMapping>
267
+ <item>
268
+ <deviceName>/dev/sda1</deviceName>
269
+ <ebs>
270
+ <volumeId>vol-1a2b3c4d</volumeId>
271
+ <status>attached</status>
272
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
273
+ <deleteOnTermination>true</deleteOnTermination>
274
+ </ebs>
275
+ </item>
276
+ </blockDeviceMapping>
277
+ <virtualizationType>hvm</virtualizationType>
278
+ <clientToken>ABCDE1234567890123</clientToken>
279
+ <tagSet>
280
+ <item>
281
+ <key>Name</key>
282
+ <value>Windows Instance</value>
283
+ </item>
284
+ </tagSet>
285
+ <hypervisor>xen</hypervisor>
286
+ <networkInterfaceSet>
287
+ <item>
288
+ <networkInterfaceId>eni-1a2b3c4d</networkInterfaceId>
289
+ <subnetId>subnet-1a2b3c4d</subnetId>
290
+ <vpcId>vpc-1a2b3c4d</vpcId>
291
+ <description>Primary network interface</description>
292
+ <ownerId>123456789012</ownerId>
293
+ <status>in-use</status>
294
+ <macAddress>1b:2b:3c:4d:5e:6f</macAddress>
295
+ <privateIpAddress>10.0.0.12</privateIpAddress>
296
+ <sourceDestCheck>true</sourceDestCheck>
297
+ <groupSet>
298
+ <item>
299
+ <groupId>sg-1a2b3c4d</groupId>
300
+ <groupName>my-security-group</groupName>
301
+ </item>
302
+ </groupSet>
303
+ <attachment>
304
+ <attachmentId>eni-attach-1a2b3c4d</attachmentId>
305
+ <deviceIndex>0</deviceIndex>
306
+ <status>attached</status>
307
+ <attachTime>2035-02-09T23:17:13Z</attachTime>
308
+ <deleteOnTermination>true</deleteOnTermination>
309
+ </attachment>
310
+ <association>
311
+ <publicIp>198.51.100.63</publicIp>
312
+ <ipOwnerId>123456789012</ipOwnerId>
313
+ </association>
314
+ <privateIpAddressesSet>
315
+ <item>
316
+ <privateIpAddress>10.0.0.12</privateIpAddress>
317
+ <primary>true</primary>
318
+ <association>
319
+ <publicIp>198.51.100.63</publicIp>
320
+ <ipOwnerId>123456789012</ipOwnerId>
321
+ </association>
322
+ </item>
323
+ <item>
324
+ <privateIpAddress>10.0.0.14</privateIpAddress>
325
+ <primary>false</primary>
326
+ <association>
327
+ <publicIp>198.51.100.177</publicIp>
328
+ <ipOwnerId>123456789012</ipOwnerId>
329
+ </association>
330
+ </item>
331
+ </privateIpAddressesSet>
332
+ </item>
333
+ </networkInterfaceSet>
334
+ </item>
335
+ </instancesSet>
336
+ </item>
337
+ </reservationSet>
338
+ </DescribeInstancesResponse>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elbas
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-19 00:00:00.000000000 Z
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -172,6 +186,7 @@ files:
172
186
  - spec/aws/instance_spec.rb
173
187
  - spec/aws/launch_template_spec.rb
174
188
  - spec/aws/taggable_spec.rb
189
+ - spec/capistrano_spec.rb
175
190
  - spec/spec_helper.rb
176
191
  - spec/support/stubs/CreateImage.200.xml
177
192
  - spec/support/stubs/CreateLaunchConfiguration.200.xml
@@ -183,6 +198,8 @@ files:
183
198
  - spec/support/stubs/DescribeAutoScalingGroups.200.xml
184
199
  - spec/support/stubs/DescribeImages.200.xml
185
200
  - spec/support/stubs/DescribeInstances.200.xml
201
+ - spec/support/stubs/DescribeInstances_MultipleReservations.200.xml
202
+ - spec/support/stubs/DescribeInstances_MultipleRunning.200.xml
186
203
  - spec/support/stubs/DescribeLaunchConfigurations.200.xml
187
204
  - spec/support/stubs/DescribeSnapshots.200.xml
188
205
  - spec/support/stubs/DescribeTags.200.xml
@@ -207,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
224
  - !ruby/object:Gem::Version
208
225
  version: '0'
209
226
  requirements: []
210
- rubygems_version: 3.0.2
227
+ rubygems_version: 3.0.3
211
228
  signing_key:
212
229
  specification_version: 4
213
230
  summary: Capistrano plugin for deploying to AWS AutoScale Groups.
@@ -218,6 +235,7 @@ test_files:
218
235
  - spec/aws/instance_spec.rb
219
236
  - spec/aws/launch_template_spec.rb
220
237
  - spec/aws/taggable_spec.rb
238
+ - spec/capistrano_spec.rb
221
239
  - spec/spec_helper.rb
222
240
  - spec/support/stubs/CreateImage.200.xml
223
241
  - spec/support/stubs/CreateLaunchConfiguration.200.xml
@@ -229,6 +247,8 @@ test_files:
229
247
  - spec/support/stubs/DescribeAutoScalingGroups.200.xml
230
248
  - spec/support/stubs/DescribeImages.200.xml
231
249
  - spec/support/stubs/DescribeInstances.200.xml
250
+ - spec/support/stubs/DescribeInstances_MultipleReservations.200.xml
251
+ - spec/support/stubs/DescribeInstances_MultipleRunning.200.xml
232
252
  - spec/support/stubs/DescribeLaunchConfigurations.200.xml
233
253
  - spec/support/stubs/DescribeSnapshots.200.xml
234
254
  - spec/support/stubs/DescribeTags.200.xml