vagrant-aws 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +8 -0
- data/lib/vagrant-aws/action/connect_aws.rb +12 -8
- data/lib/vagrant-aws/action/read_ssh_info.rb +1 -1
- data/lib/vagrant-aws/action/run_instance.rb +3 -0
- data/lib/vagrant-aws/action/sync_folders.rb +1 -1
- data/lib/vagrant-aws/config.rb +22 -0
- data/lib/vagrant-aws/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 0.1.2 (March 22, 2013)
|
2
|
+
|
3
|
+
* Choose the proper region when connecting to AWS. [GH-9]
|
4
|
+
* Configurable SSH port. [GH-13]
|
5
|
+
* Support other AWS-compatible API endpoints with `config.endpoint`
|
6
|
+
and `config.version`. [GH-6]
|
7
|
+
* Disable strict host key checking on rsync so known hosts aren't an issue. [GH-7]
|
8
|
+
|
1
9
|
# 0.1.1 (March 18, 2013)
|
2
10
|
|
3
11
|
* Up fog dependency for Vagrant 1.1.1
|
@@ -19,16 +19,20 @@ module VagrantPlugins
|
|
19
19
|
|
20
20
|
# Get the configs
|
21
21
|
region_config = env[:machine].provider_config.get_region_config(region)
|
22
|
-
|
23
|
-
|
22
|
+
|
23
|
+
# Build the fog config
|
24
|
+
fog_config = {
|
25
|
+
:provider => :aws,
|
26
|
+
:aws_access_key_id => region_config.access_key_id,
|
27
|
+
:aws_secret_access_key => region_config.secret_access_key,
|
28
|
+
:region => region
|
29
|
+
}
|
30
|
+
|
31
|
+
fog_config[:endpoint] = region_config.endpoint if region_config.endpoint
|
32
|
+
fog_config[:version] = region_config.version if region_config.version
|
24
33
|
|
25
34
|
@logger.info("Connecting to AWS...")
|
26
|
-
env[:aws_compute] = Fog::Compute.new(
|
27
|
-
:provider => :aws,
|
28
|
-
:aws_access_key_id => access_key_id,
|
29
|
-
:aws_secret_access_key => secret_access_key,
|
30
|
-
:region => region
|
31
|
-
})
|
35
|
+
env[:aws_compute] = Fog::Compute.new(fog_config)
|
32
36
|
|
33
37
|
@app.call(env)
|
34
38
|
end
|
@@ -28,6 +28,7 @@ module VagrantPlugins
|
|
28
28
|
ami = region_config.ami
|
29
29
|
availability_zone = region_config.availability_zone
|
30
30
|
instance_type = region_config.instance_type
|
31
|
+
ssh_port = region_config.ssh_port
|
31
32
|
keypair = region_config.keypair_name
|
32
33
|
private_ip_address = region_config.private_ip_address
|
33
34
|
security_groups = region_config.security_groups
|
@@ -50,6 +51,7 @@ module VagrantPlugins
|
|
50
51
|
env[:ui].info(" -- AMI: #{ami}")
|
51
52
|
env[:ui].info(" -- Region: #{region}")
|
52
53
|
env[:ui].info(" -- Availability Zone: #{availability_zone}") if availability_zone
|
54
|
+
env[:ui].info(" -- SSH Port: #{ssh_port}") if ssh_port
|
53
55
|
env[:ui].info(" -- Keypair: #{keypair}") if keypair
|
54
56
|
env[:ui].info(" -- Subnet ID: #{subnet_id}") if subnet_id
|
55
57
|
env[:ui].info(" -- Private IP: #{private_ip_address}") if private_ip_address
|
@@ -61,6 +63,7 @@ module VagrantPlugins
|
|
61
63
|
:flavor_id => instance_type,
|
62
64
|
:image_id => ami,
|
63
65
|
:key_name => keypair,
|
66
|
+
:ssh_port => ssh_port,
|
64
67
|
:private_ip_address => private_ip_address,
|
65
68
|
:subnet_id => subnet_id,
|
66
69
|
:tags => tags
|
@@ -38,7 +38,7 @@ module VagrantPlugins
|
|
38
38
|
# Rsync over to the guest path using the SSH info
|
39
39
|
command = [
|
40
40
|
"rsync", "--verbose", "--archive", "-z",
|
41
|
-
"-e", "ssh -p #{ssh_info[:port]} -i '#{ssh_info[:private_key_path]}'",
|
41
|
+
"-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{ssh_info[:private_key_path]}'",
|
42
42
|
hostpath,
|
43
43
|
"#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
|
44
44
|
|
data/lib/vagrant-aws/config.rb
CHANGED
@@ -39,6 +39,16 @@ module VagrantPlugins
|
|
39
39
|
# @return [String]
|
40
40
|
attr_accessor :region
|
41
41
|
|
42
|
+
# The EC2 endpoint to connect to
|
43
|
+
#
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :endpoint
|
46
|
+
|
47
|
+
# The version of the AWS api to use
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :version
|
51
|
+
|
42
52
|
# The secret access key for accessing AWS.
|
43
53
|
#
|
44
54
|
# @return [String]
|
@@ -50,6 +60,11 @@ module VagrantPlugins
|
|
50
60
|
# @return [Array<String>]
|
51
61
|
attr_accessor :security_groups
|
52
62
|
|
63
|
+
# The SSH port used by the instance
|
64
|
+
#
|
65
|
+
# @return [int]
|
66
|
+
attr_accessor :ssh_port
|
67
|
+
|
53
68
|
# The path to the SSH private key to use with this EC2 instance.
|
54
69
|
# This overrides the `config.ssh.private_key_path` variable.
|
55
70
|
#
|
@@ -80,8 +95,11 @@ module VagrantPlugins
|
|
80
95
|
@keypair_name = UNSET_VALUE
|
81
96
|
@private_ip_address = UNSET_VALUE
|
82
97
|
@region = UNSET_VALUE
|
98
|
+
@endpoint = UNSET_VALUE
|
99
|
+
@version = UNSET_VALUE
|
83
100
|
@secret_access_key = UNSET_VALUE
|
84
101
|
@security_groups = UNSET_VALUE
|
102
|
+
@ssh_port = UNSET_VALUE
|
85
103
|
@ssh_private_key_path = UNSET_VALUE
|
86
104
|
@ssh_username = UNSET_VALUE
|
87
105
|
@subnet_id = UNSET_VALUE
|
@@ -176,12 +194,16 @@ module VagrantPlugins
|
|
176
194
|
# generally defaults to this as well.
|
177
195
|
@region = "us-east-1" if @region == UNSET_VALUE
|
178
196
|
@availability_zone = nil if @availability_zone == UNSET_VALUE
|
197
|
+
@endpoint = nil if @endpoint == UNSET_VALUE
|
198
|
+
@version = nil if @version == UNSET_VALUE
|
179
199
|
|
180
200
|
# The security groups are empty by default.
|
181
201
|
@security_groups = [] if @security_groups == UNSET_VALUE
|
182
202
|
|
183
203
|
# The SSH values by default are nil, and the top-level config
|
184
204
|
# `config.ssh` values are used.
|
205
|
+
# The SSH port should be 22 if left unset.
|
206
|
+
@ssh_port = 22 if @ssh_port == UNSET_VALUE
|
185
207
|
@ssh_private_key_path = nil if @ssh_private_key_path == UNSET_VALUE
|
186
208
|
@ssh_username = nil if @ssh_username == UNSET_VALUE
|
187
209
|
|
data/lib/vagrant-aws/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: 1300892683038952165
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|