vagrant-aws 0.6.0 → 0.7.0
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/CHANGELOG.md +8 -1
- data/Gemfile +5 -1
- data/README.md +17 -1
- data/lib/vagrant-aws/action.rb +1 -1
- data/lib/vagrant-aws/action/package_instance.rb +7 -6
- data/lib/vagrant-aws/action/read_ssh_info.rb +1 -1
- data/lib/vagrant-aws/action/run_instance.rb +41 -3
- data/lib/vagrant-aws/action/start_instance.rb +1 -1
- data/lib/vagrant-aws/config.rb +55 -1
- data/lib/vagrant-aws/util/elb.rb +3 -1
- data/lib/vagrant-aws/version.rb +1 -1
- data/locales/en.yml +3 -0
- data/spec/vagrant-aws/config_spec.rb +17 -4
- 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: a1deca95df376c2977458f95179407a4c2e04458
|
4
|
+
data.tar.gz: 9d4a5506219f5f3f8db34ea476d9aa986ae75ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96d998cf0955fab6abfac02fc5b386fb7ee15dcb224e0abbb145970cf14365d6c9881016e8b8ec90088903fb773c2b623277edfe121c7780bf72e7b049309ad9
|
7
|
+
data.tar.gz: 69777208d9687dcf5038a182af1e97258aaba0b630798f4f0b61bab0fb1a473c9809664c18a7e9385e85cee2d6f2e3dcd5d9f3880720699f2533dea4aec985d6
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
# 0.
|
1
|
+
# 0.6.1
|
2
|
+
|
3
|
+
* Added configurable instance state check interval
|
4
|
+
|
5
|
+
# 0.6.0 (December 13, 2014)
|
2
6
|
|
3
7
|
* Support static Elastic IP addresses.
|
8
|
+
* Support for creating AMIs with the `vagrant package`
|
4
9
|
|
5
10
|
# 0.5.0 (June 22, 2014)
|
6
11
|
|
@@ -12,6 +17,8 @@
|
|
12
17
|
* rsyncing folders uses `--delete` flag to better emulate "real shared folders
|
13
18
|
(GH [#194](https://github.com/mitchellh/vagrant-aws/pull/194))
|
14
19
|
* fog gem version bumped to 1.22 (GH [#253](https://github.com/mitchellh/vagrant-aws/pull/253))
|
20
|
+
* Simple ELB support (GH [#88](https://github.com/mitchellh/vagrant-aws/pull/88),
|
21
|
+
GH [#238](https://github.com/mitchellh/vagrant-aws/pull/238))
|
15
22
|
|
16
23
|
# 0.4.1 (December 17, 2013)
|
17
24
|
|
data/Gemfile
CHANGED
@@ -6,5 +6,9 @@ group :development do
|
|
6
6
|
# We depend on Vagrant for development, but we don't add it as a
|
7
7
|
# gem dependency because we expect to be installed within the
|
8
8
|
# Vagrant environment itself using `vagrant plugin`.
|
9
|
-
gem "vagrant", :git => "
|
9
|
+
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git"
|
10
|
+
end
|
11
|
+
|
12
|
+
group :plugins do
|
13
|
+
gem "vagrant-aws" , path: "."
|
10
14
|
end
|
data/README.md
CHANGED
@@ -108,6 +108,8 @@ This provider exposes quite a few provider-specific configuration options:
|
|
108
108
|
the instance. If nil, it will use the default set by Amazon.
|
109
109
|
* `instance_ready_timeout` - The number of seconds to wait for the instance
|
110
110
|
to become "ready" in AWS. Defaults to 120 seconds.
|
111
|
+
* `instance_check_interval` - The number of seconds to wait to check the instance's
|
112
|
+
state
|
111
113
|
* `instance_package_timeout` - The number of seconds to wait for the instance
|
112
114
|
to be burnt into an AMI during packaging. Defaults to 600 seconds.
|
113
115
|
* `instance_type` - The type of instance, such as "m3.medium". The default
|
@@ -116,6 +118,7 @@ This provider exposes quite a few provider-specific configuration options:
|
|
116
118
|
type to support both paravirtualization and hvm AMIs
|
117
119
|
* `keypair_name` - The name of the keypair to use to bootstrap AMIs
|
118
120
|
which support it.
|
121
|
+
* `monitoring` - Set to "true" to enable detailed monitoring.
|
119
122
|
* `session_token` - The session token provided by STS
|
120
123
|
* `private_ip_address` - The private IP address to assign to an instance
|
121
124
|
within a [VPC](http://aws.amazon.com/vpc/)
|
@@ -133,10 +136,23 @@ This provider exposes quite a few provider-specific configuration options:
|
|
133
136
|
with the instance
|
134
137
|
* `subnet_id` - The subnet to boot the instance into, for VPC.
|
135
138
|
* `associate_public_ip` - If true, will associate a public IP address to an instance in a VPC.
|
139
|
+
* `ssh_host_attribute` - If `:public_ip_address`, `:dns_name`, or
|
140
|
+
`:private_ip_address`, will use the public IP address, DNS name, or private
|
141
|
+
IP address, respectively, to SSH to the instance. By default Vagrant uses the
|
142
|
+
first of these (in this order) that is known. However, this can lead to
|
143
|
+
connection issues if, e.g., you are assigning a public IP address but your
|
144
|
+
security groups prevent public SSH access and require you to SSH in via the
|
145
|
+
private IP address; specify `:private_ip_address` in this case.
|
146
|
+
* `tenancy` - When running in a VPC configure the tenancy of the instance. Supports 'default' and 'dedicated'.
|
136
147
|
* `tags` - A hash of tags to set on the machine.
|
148
|
+
* `package_tags` - A hash of tags to set on the ami generated during the package operation.
|
137
149
|
* `use_iam_profile` - If true, will use [IAM profiles](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
|
138
150
|
for credentials.
|
139
151
|
* `block_device_mapping` - Amazon EC2 Block Device Mapping Property
|
152
|
+
* `elb` - The ELB name to attach to the instance.
|
153
|
+
* `unregister_elb_from_az` - Removes the ELB from the AZ on removal of the last instance if true (default). In non default VPC this has to be false.
|
154
|
+
* `terminate_on_shutdown` - Indicates whether an instance stops or terminates
|
155
|
+
when you initiate shutdown from the instance.
|
140
156
|
|
141
157
|
These can be set like typical provider-specific configuration:
|
142
158
|
|
@@ -249,7 +265,7 @@ Vagrant.configure("2") do |config|
|
|
249
265
|
end
|
250
266
|
```
|
251
267
|
|
252
|
-
### Elastic Load Balancers
|
268
|
+
### ELB (Elastic Load Balancers)
|
253
269
|
|
254
270
|
You can automatically attach an instance to an ELB during boot and detach on destroy.
|
255
271
|
|
data/lib/vagrant-aws/action.rb
CHANGED
@@ -73,7 +73,6 @@ module VagrantPlugins
|
|
73
73
|
end
|
74
74
|
|
75
75
|
b2.use Provision
|
76
|
-
b2.use SyncedFolders
|
77
76
|
end
|
78
77
|
end
|
79
78
|
end
|
@@ -143,6 +142,7 @@ module VagrantPlugins
|
|
143
142
|
Vagrant::Action::Builder.new.tap do |b|
|
144
143
|
b.use HandleBox
|
145
144
|
b.use ConfigValidate
|
145
|
+
b.use BoxCheckOutdated
|
146
146
|
b.use ConnectAWS
|
147
147
|
b.use Call, IsCreated do |env1, b1|
|
148
148
|
if env1[:result]
|
@@ -48,7 +48,7 @@ module VagrantPlugins
|
|
48
48
|
|
49
49
|
# Find ami id
|
50
50
|
@ami_id = ami_response.data[:body]["imageId"]
|
51
|
-
|
51
|
+
|
52
52
|
# Attempt to burn the aws instance into an AMI within timeout
|
53
53
|
env[:metrics]["instance_ready_time"] = Util::Timer.time do
|
54
54
|
|
@@ -58,6 +58,9 @@ module VagrantPlugins
|
|
58
58
|
tries = region_config.instance_package_timeout / 2
|
59
59
|
|
60
60
|
env[:ui].info(I18n.t("vagrant_aws.burning_ami", :ami_id => @ami_id))
|
61
|
+
if !region_config.package_tags.empty?
|
62
|
+
server.service.create_tags(@ami_id, region_config.package_tags)
|
63
|
+
end
|
61
64
|
|
62
65
|
# Check the status of the AMI every 2 seconds until the ami burn timeout has been reached
|
63
66
|
begin
|
@@ -69,16 +72,14 @@ module VagrantPlugins
|
|
69
72
|
ami_obj = server.service.images.get(@ami_id)
|
70
73
|
|
71
74
|
# Wait for the server to be ready, raise error if timeout reached
|
72
|
-
server.wait_for(2) {
|
75
|
+
server.wait_for(2) {
|
73
76
|
if ami_obj.state == "failed"
|
74
77
|
raise Errors::InstancePackageError,
|
75
78
|
ami_id: ami_obj.id,
|
76
79
|
err: ami_obj.state
|
77
|
-
return
|
78
|
-
else
|
79
|
-
# Successful AMI burn will result in true here
|
80
|
-
ami_obj.ready?
|
81
80
|
end
|
81
|
+
|
82
|
+
ami_obj.ready?
|
82
83
|
}
|
83
84
|
end
|
84
85
|
rescue Fog::Errors::TimeoutError
|
@@ -33,7 +33,7 @@ module VagrantPlugins
|
|
33
33
|
ssh_host_attribute = machine.provider_config.
|
34
34
|
get_region_config(machine.provider_config.region).ssh_host_attribute
|
35
35
|
# default host attributes to try. NOTE: Order matters!
|
36
|
-
ssh_attrs = [:
|
36
|
+
ssh_attrs = [:dns_name, :public_ip_address, :private_ip_address]
|
37
37
|
ssh_attrs = (Array(ssh_host_attribute) + ssh_attrs).uniq if ssh_host_attribute
|
38
38
|
# try each attribute, get out on first value
|
39
39
|
host_value = nil
|
@@ -42,7 +42,10 @@ module VagrantPlugins
|
|
42
42
|
iam_instance_profile_name = region_config.iam_instance_profile_name
|
43
43
|
monitoring = region_config.monitoring
|
44
44
|
ebs_optimized = region_config.ebs_optimized
|
45
|
+
source_dest_check = region_config.source_dest_check
|
45
46
|
associate_public_ip = region_config.associate_public_ip
|
47
|
+
kernel_id = region_config.kernel_id
|
48
|
+
tenancy = region_config.tenancy
|
46
49
|
|
47
50
|
# If there is no keypair then warn the user
|
48
51
|
if !keypair
|
@@ -73,7 +76,9 @@ module VagrantPlugins
|
|
73
76
|
env[:ui].info(" -- Terminate On Shutdown: #{terminate_on_shutdown}")
|
74
77
|
env[:ui].info(" -- Monitoring: #{monitoring}")
|
75
78
|
env[:ui].info(" -- EBS optimized: #{ebs_optimized}")
|
79
|
+
env[:ui].info(" -- Source Destination check: #{source_dest_check}")
|
76
80
|
env[:ui].info(" -- Assigning a public IP address in a VPC: #{associate_public_ip}")
|
81
|
+
env[:ui].info(" -- VPC tenancy specification: #{tenancy}")
|
77
82
|
|
78
83
|
options = {
|
79
84
|
:availability_zone => availability_zone,
|
@@ -90,8 +95,12 @@ module VagrantPlugins
|
|
90
95
|
:instance_initiated_shutdown_behavior => terminate_on_shutdown == true ? "terminate" : nil,
|
91
96
|
:monitoring => monitoring,
|
92
97
|
:ebs_optimized => ebs_optimized,
|
93
|
-
:associate_public_ip
|
98
|
+
:associate_public_ip => associate_public_ip,
|
99
|
+
:kernel_id => kernel_id,
|
100
|
+
:associate_public_ip => associate_public_ip,
|
101
|
+
:tenancy => tenancy
|
94
102
|
}
|
103
|
+
|
95
104
|
if !security_groups.empty?
|
96
105
|
security_group_key = options[:subnet_id].nil? ? :groups : :security_group_ids
|
97
106
|
options[security_group_key] = security_groups
|
@@ -131,7 +140,7 @@ module VagrantPlugins
|
|
131
140
|
next if env[:interrupted]
|
132
141
|
|
133
142
|
# Wait for the server to be ready
|
134
|
-
server.wait_for(2,
|
143
|
+
server.wait_for(2, region_config.instance_check_interval) { ready? }
|
135
144
|
end
|
136
145
|
rescue Fog::Errors::TimeoutError
|
137
146
|
# Delete the instance
|
@@ -151,14 +160,43 @@ module VagrantPlugins
|
|
151
160
|
do_elastic_ip(env, domain, server, elastic_ip)
|
152
161
|
end
|
153
162
|
|
163
|
+
# Set the source destination checks
|
164
|
+
if !source_dest_check.nil?
|
165
|
+
if server.vpc_id.nil?
|
166
|
+
env[:ui].warn(I18n.t("vagrant_aws.source_dest_checks_no_vpc"))
|
167
|
+
else
|
168
|
+
begin
|
169
|
+
attrs = {
|
170
|
+
"SourceDestCheck.Value" => source_dest_check
|
171
|
+
}
|
172
|
+
env[:aws_compute].modify_instance_attribute(server.id, attrs)
|
173
|
+
rescue Fog::Compute::AWS::Error => e
|
174
|
+
raise Errors::FogError, :message => e.message
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
154
179
|
if !env[:interrupted]
|
155
180
|
env[:metrics]["instance_ssh_time"] = Util::Timer.time do
|
156
181
|
# Wait for SSH to be ready.
|
157
182
|
env[:ui].info(I18n.t("vagrant_aws.waiting_for_ssh"))
|
183
|
+
network_ready_retries = 0
|
184
|
+
network_ready_retries_max = 10
|
158
185
|
while true
|
159
186
|
# If we're interrupted then just back out
|
160
187
|
break if env[:interrupted]
|
161
|
-
|
188
|
+
# When an ec2 instance comes up, it's networking may not be ready
|
189
|
+
# by the time we connect.
|
190
|
+
begin
|
191
|
+
break if env[:machine].communicate.ready?
|
192
|
+
rescue Exception => e
|
193
|
+
if network_ready_retries < network_ready_retries_max then
|
194
|
+
network_ready_retries += 1
|
195
|
+
@logger.warn(I18n.t("vagrant_aws.waiting_for_ssh, retrying"))
|
196
|
+
else
|
197
|
+
raise e
|
198
|
+
end
|
199
|
+
end
|
162
200
|
sleep 2
|
163
201
|
end
|
164
202
|
end
|
@@ -32,7 +32,7 @@ module VagrantPlugins
|
|
32
32
|
|
33
33
|
# Wait for the instance to be ready first
|
34
34
|
env[:metrics]["instance_ready_time"] = Util::Timer.time do
|
35
|
-
|
35
|
+
tries = region_config.instance_ready_timeout / 2
|
36
36
|
|
37
37
|
env[:ui].info(I18n.t("vagrant_aws.waiting_for_ready"))
|
38
38
|
begin
|
data/lib/vagrant-aws/config.rb
CHANGED
@@ -24,6 +24,11 @@ module VagrantPlugins
|
|
24
24
|
# @return [Fixnum]
|
25
25
|
attr_accessor :instance_ready_timeout
|
26
26
|
|
27
|
+
# The interval to wait for checking an instance's state.
|
28
|
+
#
|
29
|
+
# @return [Fixnum]
|
30
|
+
attr_accessor :instance_check_interval
|
31
|
+
|
27
32
|
# The timeout to wait for an instance to successfully burn into an AMI.
|
28
33
|
#
|
29
34
|
# @return [Fixnum]
|
@@ -103,6 +108,11 @@ module VagrantPlugins
|
|
103
108
|
# @return [Hash<String, String>]
|
104
109
|
attr_accessor :tags
|
105
110
|
|
111
|
+
# The tags for the AMI generated with package.
|
112
|
+
#
|
113
|
+
# @return [Hash<String, String>]
|
114
|
+
attr_accessor :package_tags
|
115
|
+
|
106
116
|
# Use IAM Instance Role for authentication to AWS instead of an
|
107
117
|
# explicit access_id and secret_access_key
|
108
118
|
#
|
@@ -144,6 +154,11 @@ module VagrantPlugins
|
|
144
154
|
# @return [Boolean]
|
145
155
|
attr_accessor :ebs_optimized
|
146
156
|
|
157
|
+
# Source Destination check
|
158
|
+
#
|
159
|
+
# @return [Boolean]
|
160
|
+
attr_accessor :source_dest_check
|
161
|
+
|
147
162
|
# Assigning a public IP address in a VPC
|
148
163
|
#
|
149
164
|
# @return [Boolean]
|
@@ -155,10 +170,26 @@ module VagrantPlugins
|
|
155
170
|
# @return [String]
|
156
171
|
attr_accessor :elb
|
157
172
|
|
173
|
+
# Disable unregisering ELB's from AZ - useful in case of not using default VPC
|
174
|
+
# @return [Boolean]
|
175
|
+
attr_accessor :unregister_elb_from_az
|
176
|
+
|
177
|
+
# Kernel Id
|
178
|
+
#
|
179
|
+
# @return [String]
|
180
|
+
attr_accessor :kernel_id
|
181
|
+
|
182
|
+
# The tenancy of the instance in a VPC.
|
183
|
+
# Defaults to 'default'.
|
184
|
+
#
|
185
|
+
# @return [String]
|
186
|
+
attr_accessor :tenancy
|
187
|
+
|
158
188
|
def initialize(region_specific=false)
|
159
189
|
@access_key_id = UNSET_VALUE
|
160
190
|
@ami = UNSET_VALUE
|
161
191
|
@availability_zone = UNSET_VALUE
|
192
|
+
@instance_check_interval = UNSET_VALUE
|
162
193
|
@instance_ready_timeout = UNSET_VALUE
|
163
194
|
@instance_package_timeout = UNSET_VALUE
|
164
195
|
@instance_type = UNSET_VALUE
|
@@ -172,6 +203,7 @@ module VagrantPlugins
|
|
172
203
|
@security_groups = UNSET_VALUE
|
173
204
|
@subnet_id = UNSET_VALUE
|
174
205
|
@tags = {}
|
206
|
+
@package_tags = {}
|
175
207
|
@user_data = UNSET_VALUE
|
176
208
|
@use_iam_profile = UNSET_VALUE
|
177
209
|
@block_device_mapping = []
|
@@ -182,8 +214,12 @@ module VagrantPlugins
|
|
182
214
|
@ssh_host_attribute = UNSET_VALUE
|
183
215
|
@monitoring = UNSET_VALUE
|
184
216
|
@ebs_optimized = UNSET_VALUE
|
217
|
+
@source_dest_check = UNSET_VALUE
|
185
218
|
@associate_public_ip = UNSET_VALUE
|
186
219
|
@elb = UNSET_VALUE
|
220
|
+
@unregister_elb_from_az = UNSET_VALUE
|
221
|
+
@kernel_id = UNSET_VALUE
|
222
|
+
@tenancy = UNSET_VALUE
|
187
223
|
|
188
224
|
# Internal state (prefix with __ so they aren't automatically
|
189
225
|
# merged)
|
@@ -257,6 +293,10 @@ module VagrantPlugins
|
|
257
293
|
result.tags.merge!(self.tags)
|
258
294
|
result.tags.merge!(other.tags)
|
259
295
|
|
296
|
+
# Merge in the package tags
|
297
|
+
result.package_tags.merge!(self.package_tags)
|
298
|
+
result.package_tags.merge!(other.package_tags)
|
299
|
+
|
260
300
|
# Merge block_device_mapping
|
261
301
|
result.block_device_mapping |= self.block_device_mapping
|
262
302
|
result.block_device_mapping |= other.block_device_mapping
|
@@ -276,6 +316,9 @@ module VagrantPlugins
|
|
276
316
|
# Set the default timeout for waiting for an instance to be ready
|
277
317
|
@instance_ready_timeout = 120 if @instance_ready_timeout == UNSET_VALUE
|
278
318
|
|
319
|
+
# Set the default interval to check instance state
|
320
|
+
@instance_check_interval = 2 if @instance_check_interval == UNSET_VALUE
|
321
|
+
|
279
322
|
# Set the default timeout for waiting for an instance to burn into and ami
|
280
323
|
@instance_package_timeout = 600 if @instance_package_timeout == UNSET_VALUE
|
281
324
|
|
@@ -326,12 +369,23 @@ module VagrantPlugins
|
|
326
369
|
# default false
|
327
370
|
@ebs_optimized = false if @ebs_optimized == UNSET_VALUE
|
328
371
|
|
372
|
+
# default to nil
|
373
|
+
@source_dest_check = nil if @source_dest_check == UNSET_VALUE
|
374
|
+
|
329
375
|
# default false
|
330
376
|
@associate_public_ip = false if @associate_public_ip == UNSET_VALUE
|
331
377
|
|
378
|
+
# default 'default'
|
379
|
+
@tenancy = "default" if @tenancy == UNSET_VALUE
|
380
|
+
|
332
381
|
# Don't attach instance to any ELB by default
|
333
382
|
@elb = nil if @elb == UNSET_VALUE
|
334
383
|
|
384
|
+
@unregister_elb_from_az = true if @unregister_elb_from_az == UNSET_VALUE
|
385
|
+
|
386
|
+
# default to nil
|
387
|
+
@kernel_id = nil if @kernel_id == UNSET_VALUE
|
388
|
+
|
335
389
|
# Compile our region specific configurations only within
|
336
390
|
# NON-REGION-SPECIFIC configurations.
|
337
391
|
if !@__region_specific
|
@@ -378,7 +432,7 @@ module VagrantPlugins
|
|
378
432
|
errors << I18n.t("vagrant_aws.config.subnet_id_required_with_public_ip")
|
379
433
|
end
|
380
434
|
|
381
|
-
errors << I18n.
|
435
|
+
errors << I18n.t("vagrant_aws.config.ami_required", :region => @region) if config.ami.nil?
|
382
436
|
end
|
383
437
|
|
384
438
|
{ "AWS Provider" => errors }
|
data/lib/vagrant-aws/util/elb.rb
CHANGED
@@ -20,7 +20,9 @@ module VagrantPlugins
|
|
20
20
|
if elb.instances.include? instance_id
|
21
21
|
elb.deregister_instances([instance_id])
|
22
22
|
env[:ui].info I18n.t("vagrant_aws.elb.ok"), :prefix => false
|
23
|
-
|
23
|
+
if env[:machine].provider_config.unregister_elb_from_az
|
24
|
+
adjust_availability_zones env, elb
|
25
|
+
end
|
24
26
|
else
|
25
27
|
env[:ui].info I18n.t("vagrant_aws.elb.skipped"), :prefix => false
|
26
28
|
end
|
data/lib/vagrant-aws/version.rb
CHANGED
data/locales/en.yml
CHANGED
@@ -39,6 +39,9 @@ en:
|
|
39
39
|
Make sure rsync is installed and the binary can be found in the PATH.
|
40
40
|
rsync_folder: |-
|
41
41
|
Rsyncing folder: %{hostpath} => %{guestpath}
|
42
|
+
source_dest_checks_no_vpc: |-
|
43
|
+
Warning! Ignoring source_dest_checks flag as it can only be configured on
|
44
|
+
a VPC instance.
|
42
45
|
starting: |-
|
43
46
|
Starting the instance...
|
44
47
|
stopping: |-
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "vagrant-aws/config"
|
2
|
+
require 'rspec/its'
|
2
3
|
|
3
4
|
describe VagrantPlugins::AWS::Config do
|
4
5
|
let(:instance) { described_class.new }
|
@@ -19,6 +20,7 @@ describe VagrantPlugins::AWS::Config do
|
|
19
20
|
its("ami") { should be_nil }
|
20
21
|
its("availability_zone") { should be_nil }
|
21
22
|
its("instance_ready_timeout") { should == 120 }
|
23
|
+
its("instance_check_interval") { should == 2 }
|
22
24
|
its("instance_package_timeout") { should == 600 }
|
23
25
|
its("instance_type") { should == "m3.medium" }
|
24
26
|
its("keypair_name") { should be_nil }
|
@@ -31,15 +33,19 @@ describe VagrantPlugins::AWS::Config do
|
|
31
33
|
its("iam_instance_profile_arn") { should be_nil }
|
32
34
|
its("iam_instance_profile_name") { should be_nil }
|
33
35
|
its("tags") { should == {} }
|
36
|
+
its("package_tags") { should == {} }
|
34
37
|
its("user_data") { should be_nil }
|
35
|
-
its("use_iam_profile") { should
|
38
|
+
its("use_iam_profile") { should be false }
|
36
39
|
its("block_device_mapping") {should == [] }
|
37
40
|
its("elastic_ip") { should be_nil }
|
38
41
|
its("terminate_on_shutdown") { should == false }
|
39
42
|
its("ssh_host_attribute") { should be_nil }
|
40
43
|
its("monitoring") { should == false }
|
41
44
|
its("ebs_optimized") { should == false }
|
45
|
+
its("source_dest_check") { should be_nil }
|
42
46
|
its("associate_public_ip") { should == false }
|
47
|
+
its("unregister_elb_from_az") { should == true }
|
48
|
+
its("tenancy") { should == "default" }
|
43
49
|
end
|
44
50
|
|
45
51
|
describe "overriding defaults" do
|
@@ -50,9 +56,10 @@ describe VagrantPlugins::AWS::Config do
|
|
50
56
|
[:access_key_id, :ami, :availability_zone, :instance_ready_timeout,
|
51
57
|
:instance_package_timeout, :instance_type, :keypair_name, :ssh_host_attribute,
|
52
58
|
:ebs_optimized, :region, :secret_access_key, :session_token, :monitoring,
|
53
|
-
:associate_public_ip, :subnet_id, :tags, :
|
54
|
-
:iam_instance_profile_arn, :iam_instance_profile_name,
|
55
|
-
:use_iam_profile, :user_data, :block_device_mapping
|
59
|
+
:associate_public_ip, :subnet_id, :tags, :package_tags, :elastic_ip,
|
60
|
+
:terminate_on_shutdown, :iam_instance_profile_arn, :iam_instance_profile_name,
|
61
|
+
:use_iam_profile, :user_data, :block_device_mapping,
|
62
|
+
:source_dest_check].each do |attribute|
|
56
63
|
|
57
64
|
it "should not default #{attribute} if overridden" do
|
58
65
|
instance.send("#{attribute}=".to_sym, "foo")
|
@@ -209,6 +216,8 @@ describe VagrantPlugins::AWS::Config do
|
|
209
216
|
it "should merge the tags and block_device_mappings" do
|
210
217
|
first.tags["one"] = "one"
|
211
218
|
second.tags["two"] = "two"
|
219
|
+
first.package_tags["three"] = "three"
|
220
|
+
second.package_tags["four"] = "four"
|
212
221
|
first.block_device_mapping = [{:one => "one"}]
|
213
222
|
second.block_device_mapping = [{:two => "two"}]
|
214
223
|
|
@@ -217,6 +226,10 @@ describe VagrantPlugins::AWS::Config do
|
|
217
226
|
"one" => "one",
|
218
227
|
"two" => "two"
|
219
228
|
}
|
229
|
+
third.package_tags.should == {
|
230
|
+
"three" => "three",
|
231
|
+
"four" => "four"
|
232
|
+
}
|
220
233
|
third.block_device_mapping.index({:one => "one"}).should_not be_nil
|
221
234
|
third.block_device_mapping.index({:two => "two"}).should_not be_nil
|
222
235
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: 1.3.6
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project: vagrant-aws
|
138
|
-
rubygems_version: 2.4.
|
138
|
+
rubygems_version: 2.4.3
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Enables Vagrant to manage machines in EC2 and VPC.
|