kitchen-vagrant 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -2
- data/README.md +12 -25
- data/kitchen-vagrant.gemspec +1 -1
- data/lib/kitchen/driver/vagrant.rb +5 -43
- data/lib/kitchen/driver/vagrant_version.rb +1 -1
- data/lib/kitchen/vagrant/vagrantfile_creator.rb +3 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebbecb8fd84f5a6754c77012e1c2aa77fe00a03d
|
4
|
+
data.tar.gz: c311ef68bb8440dbd2b329ac052a79e9d9cbf7e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1336ebc431e2f7a94877772b95ea68e480685327c0bddb30cfb0a38a54145bfaf254de66a32968b35e7f6a0fd470cd0c0ec8f6afea828705323f20aaedfe325e
|
7
|
+
data.tar.gz: 334c1e861b07944baa717c25f204c6307ec6c86ba4d2ae1e8a281e68bdf44b802094fc99d1185168a27cdfa0dfa74b952eaadb090c0fdbad9d33cc0d97fecb1f
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
|
+
## 0.11.2 / 2013-11-05
|
2
|
+
|
3
|
+
### Bug fixes
|
4
|
+
|
5
|
+
* Remove misleading `quiet` option ([@sethvargo][])
|
6
|
+
* Relax dependency on Test Kitchen ([@sethvargo][])
|
7
|
+
* Remove deprecated references to `vagrant-berkshelf` ([@sethvargo][])
|
8
|
+
|
9
|
+
### Improvements
|
10
|
+
|
11
|
+
* Allow users to specify custom SSH private key ([@manul][])
|
12
|
+
* Use platform to determine which vagrant box to download (assume Opscode) ([@sethvargo][])
|
13
|
+
|
1
14
|
## 0.11.1 / 2013-08-29
|
2
15
|
|
3
16
|
### Bug fixes
|
4
17
|
|
5
|
-
* Pull request #36: README fix for synched_folders. (@mattray)
|
18
|
+
* Pull request [#36][]: README fix for synched_folders. ([@mattray][])
|
6
19
|
|
7
20
|
### Improvements
|
8
21
|
|
9
|
-
* Pull request #34: Disable synced folders by default. (@dje)
|
22
|
+
* Pull request [#34][]: Disable synced folders by default. ([@dje][])
|
10
23
|
|
11
24
|
|
12
25
|
## 0.11.0 / 2013-07-23
|
@@ -111,14 +124,20 @@ The initial release.
|
|
111
124
|
[#29]: https://github.com/opscode/kitchen-vagrant/issues/29
|
112
125
|
[#30]: https://github.com/opscode/kitchen-vagrant/issues/30
|
113
126
|
[#31]: https://github.com/opscode/kitchen-vagrant/issues/31
|
127
|
+
[#34]: https://github.com/opscode/kitchen-vagrant/issues/34
|
128
|
+
[#36]: https://github.com/opscode/kitchen-vagrant/issues/36
|
114
129
|
[@TheDude05]: https://github.com/TheDude05
|
115
130
|
[@albertsj1]: https://github.com/albertsj1
|
131
|
+
[@dje]: https://github.com/dje
|
116
132
|
[@fnichol]: https://github.com/fnichol
|
117
133
|
[@fujin]: https://github.com/fujin
|
118
134
|
[@gildegoma]: https://github.com/gildegoma
|
119
135
|
[@josephholsten]: https://github.com/josephholsten
|
120
136
|
[@keiths-osc]: https://github.com/keiths-osc
|
137
|
+
[@manul]: https://github.com/manul
|
121
138
|
[@martinisoft]: https://github.com/martinisoft
|
139
|
+
[@mattray]: https://github.com/mattray
|
122
140
|
[@petejkim]: https://github.com/petejkim
|
123
141
|
[@sandfish8]: https://github.com/sandfish8
|
142
|
+
[@sethvargo]: https://github.com/sethvargo
|
124
143
|
[@tmatilai]: https://github.com/tmatilai
|
data/README.md
CHANGED
@@ -44,26 +44,14 @@ software from VMware and then must also purchase the Vagrant VMware plugin.
|
|
44
44
|
[VMware Workstation][workstation_dl]
|
45
45
|
|
46
46
|
|
47
|
-
### <a name="dependencies-berkshelf"></a> Vagrant Berkshelf Plugin
|
48
|
-
|
49
|
-
If a Berksfile is present in your project's root directory, then this driver
|
50
|
-
will check to ensure that the [vagrant-berkshelf][vagrant_berkshelf] plugin is
|
51
|
-
installed.
|
52
|
-
|
53
|
-
If your project doesn't use Berkshelf then this check will be skipped.
|
54
|
-
|
55
|
-
**Note:** Prior to release 1.2.0, then name of the vagrant-berkshelf gem was
|
56
|
-
berkshelf-vagrant. This driver no longer checks for the existance of
|
57
|
-
berkshelf-vagrant, so upgrading this Vagrant plugin is recommended.
|
58
|
-
|
59
47
|
## <a name="installation"></a> Installation and Setup
|
60
48
|
|
61
49
|
Please read the [Driver usage][driver_usage] page for more details.
|
62
50
|
|
63
51
|
## <a name="default-config"></a> Default Configuration
|
64
52
|
|
65
|
-
This driver can
|
66
|
-
number of platforms
|
53
|
+
This driver can predict the Vagrant box name and download URL for a select
|
54
|
+
number of platforms that have been published by Opscode, such as:
|
67
55
|
|
68
56
|
```ruby
|
69
57
|
---
|
@@ -203,16 +191,6 @@ be used.
|
|
203
191
|
|
204
192
|
The default is unset, or `nil`.
|
205
193
|
|
206
|
-
### <a name="config-use-vagrant-berkshelf-plugin"></a> use_vagrant_berkshelf_plugin
|
207
|
-
|
208
|
-
Determines whether or not this driver will use the vagrant-berkself Vagrant
|
209
|
-
plugin to assemble cookbook dependencies. If this value if falsey (`nil`,
|
210
|
-
`false`) then the driver will skip the vagrant-berkshelf dependency check
|
211
|
-
and not activate the plugin in the rendered Vagrantfile. If this value is
|
212
|
-
truthy the opposite behvior will be used.
|
213
|
-
|
214
|
-
The default is unset, or `nil`.
|
215
|
-
|
216
194
|
### <a name="config-synced-folders"></a> synced_folders
|
217
195
|
|
218
196
|
Allow the user to specify a collection of synced folders for on each Vagrant
|
@@ -259,6 +237,16 @@ would like to connect with a different account than Vagrant default user.
|
|
259
237
|
If this value is nil, then Vagrant parameter `config.ssh.default.username`
|
260
238
|
will be used (which is usually set to 'vagrant').
|
261
239
|
|
240
|
+
### <a name="config-ssh-key"></a> ssh\_key
|
241
|
+
|
242
|
+
This is the path to the private key file used for SSH authentication if you
|
243
|
+
would like to use your own private ssh key instead of the default vagrant
|
244
|
+
insecure private key.
|
245
|
+
|
246
|
+
If this value is a relative path, then it will be expanded relative to the
|
247
|
+
location of the main Vagrantfile. If this value is nil, then the default
|
248
|
+
insecure private key that ships with Vagrant will be used.
|
249
|
+
|
262
250
|
The default value is unset, or `nil`.
|
263
251
|
|
264
252
|
## <a name="development"></a> Development
|
@@ -292,7 +280,6 @@ Apache 2.0 (see [LICENSE][license])
|
|
292
280
|
[driver_usage]: http://docs.kitchen-ci.org/drivers/usage
|
293
281
|
[chef_omnibus_dl]: http://www.opscode.com/chef/install/
|
294
282
|
|
295
|
-
[vagrant_berkshelf]: http://rubygems.org/gems/vagrant-berkshelf
|
296
283
|
[vagrant_dl]: http://downloads.vagrantup.com/
|
297
284
|
[vagrant_machine_settings]: http://docs.vagrantup.com/v2/vagrantfile/machine_settings.html
|
298
285
|
[vagrant_networking]: http://docs.vagrantup.com/v2/networking/basic_usage.html
|
data/kitchen-vagrant.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_dependency 'test-kitchen', '~> 1.0.0.beta
|
21
|
+
gem.add_dependency 'test-kitchen', '~> 1.0.0.beta'
|
22
22
|
|
23
23
|
gem.add_development_dependency 'cane'
|
24
24
|
gem.add_development_dependency 'tailor'
|
@@ -37,10 +37,11 @@ module Kitchen
|
|
37
37
|
default_config :customize, { :memory => '256' }
|
38
38
|
default_config :synced_folders, {}
|
39
39
|
default_config :box do |driver|
|
40
|
-
driver.
|
40
|
+
"opscode-#{driver.instance.platform.name}"
|
41
41
|
end
|
42
42
|
default_config :box_url do |driver|
|
43
|
-
|
43
|
+
"https://opscode-vm-bento.s3.amazonaws.com/vagrant/" \
|
44
|
+
"opscode_#{driver.instance.platform.name}_provisionerless.box"
|
44
45
|
end
|
45
46
|
|
46
47
|
required_config :box
|
@@ -58,11 +59,7 @@ module Kitchen
|
|
58
59
|
|
59
60
|
def converge(state)
|
60
61
|
create_vagrantfile
|
61
|
-
|
62
|
-
run "vagrant provision"
|
63
|
-
else
|
64
|
-
super
|
65
|
-
end
|
62
|
+
super
|
66
63
|
end
|
67
64
|
|
68
65
|
def setup(state)
|
@@ -88,35 +85,12 @@ module Kitchen
|
|
88
85
|
|
89
86
|
def verify_dependencies
|
90
87
|
check_vagrant_version
|
91
|
-
check_berkshelf_plugin if config[:use_vagrant_berkshelf_plugin]
|
92
|
-
end
|
93
|
-
|
94
|
-
def default_values(value)
|
95
|
-
(default_boxes[instance.platform.name] || Hash.new)[value]
|
96
88
|
end
|
97
89
|
|
98
90
|
protected
|
99
91
|
|
100
92
|
WEBSITE = "http://downloads.vagrantup.com/"
|
101
93
|
MIN_VER = "1.1.0"
|
102
|
-
OMNITRUCK_PREFIX = "https://opscode-vm-bento.s3.amazonaws.com/vagrant"
|
103
|
-
PLATFORMS = %w{
|
104
|
-
ubuntu-10.04 ubuntu-12.04 ubuntu-12.10 ubuntu-13.04
|
105
|
-
centos-6.4 centos-5.9 debian-7.1.0
|
106
|
-
}
|
107
|
-
|
108
|
-
def default_boxes
|
109
|
-
@default_boxes ||= begin
|
110
|
-
hash = Hash.new
|
111
|
-
PLATFORMS.each do |platform|
|
112
|
-
hash[platform] = Hash.new
|
113
|
-
hash[platform]["box"] = "opscode-#{platform}"
|
114
|
-
hash[platform]["box_url"] =
|
115
|
-
"#{OMNITRUCK_PREFIX}/opscode_#{platform}_provisionerless.box"
|
116
|
-
end
|
117
|
-
hash
|
118
|
-
end
|
119
|
-
end
|
120
94
|
|
121
95
|
def run(cmd, options = {})
|
122
96
|
cmd = "echo #{cmd}" if config[:dry_run]
|
@@ -124,8 +98,7 @@ module Kitchen
|
|
124
98
|
end
|
125
99
|
|
126
100
|
def silently_run(cmd)
|
127
|
-
run_command(cmd,
|
128
|
-
:live_stream => nil, :quiet => logger.debug? ? false : true)
|
101
|
+
run_command(cmd, :live_stream => nil)
|
129
102
|
end
|
130
103
|
|
131
104
|
def vagrant_root
|
@@ -181,17 +154,6 @@ module Kitchen
|
|
181
154
|
" Please upgrade to version #{MIN_VER} or higher from #{WEBSITE}."
|
182
155
|
end
|
183
156
|
end
|
184
|
-
|
185
|
-
def check_berkshelf_plugin
|
186
|
-
if File.exists?(File.join(config[:kitchen_root], "Berksfile"))
|
187
|
-
plugins = silently_run("vagrant plugin list").split("\n")
|
188
|
-
if ! plugins.find { |p| p =~ /^vagrant-berkshelf\b/ }
|
189
|
-
raise UserError, "Detected a Berksfile but the vagrant-berkshelf" +
|
190
|
-
" plugin was not found in Vagrant. Please run:" +
|
191
|
-
" `vagrant plugin install vagrant-berkshelf' and retry."
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
157
|
end
|
196
158
|
end
|
197
159
|
end
|
@@ -52,6 +52,9 @@ module Kitchen
|
|
52
52
|
arr << %{ c.vm.box = "#{config[:box]}"}
|
53
53
|
arr << %{ c.vm.box_url = "#{config[:box_url]}"} if config[:box_url]
|
54
54
|
arr << %{ c.vm.synced_folder ".", "/vagrant", disabled: true}
|
55
|
+
if config[:ssh_key]
|
56
|
+
arr << %{ c.ssh.private_key_path = "#{config[:ssh_key]}"}
|
57
|
+
end
|
55
58
|
arr << %{ c.vm.hostname = "#{instance.name}.vagrantup.com"}
|
56
59
|
arr << %{ c.ssh.username = "#{config[:username]}"} if config[:username]
|
57
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Nichol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.0.beta
|
19
|
+
version: 1.0.0.beta
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.0.beta
|
26
|
+
version: 1.0.0.beta
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cane
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,3 +109,4 @@ signing_key:
|
|
109
109
|
specification_version: 4
|
110
110
|
summary: Kitchen::Driver::Vagrant - A Vagrant Driver for Test Kitchen.
|
111
111
|
test_files: []
|
112
|
+
has_rdoc:
|