kitchen-vagrant 0.14.0 → 0.15.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 +13 -1
- data/README.md +26 -23
- data/lib/kitchen/driver/vagrant.rb +16 -1
- data/lib/kitchen/driver/vagrant_version.rb +1 -1
- data/templates/Vagrantfile.erb +3 -7
- metadata +16 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e2f332a407b17162a67ac95a7157b9ca6d3bd55
|
|
4
|
+
data.tar.gz: 0b6affbcd220e3e7ebf6592dc465c61fc5a986ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c1c7580f8d1676855c911a195de79c1e75cffd4c175059b804b48fba5a347a19b8c2d2828f20dea97ea985c7f98710494239a76d60f659314bde5ee4f4ad244
|
|
7
|
+
data.tar.gz: f80efdf4c6820d243f77a11bc77d6ad37ef1e4457088c82cf98d5352b8bfef8a6c196a7ddbd91db578986d4eb28fa3ea852ab94007491fc09bda789c16154022
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.15.0 / 2014-04-28
|
|
2
|
+
|
|
3
|
+
### New features
|
|
4
|
+
|
|
5
|
+
* Support vagrant-softlayer plugin
|
|
6
|
+
|
|
7
|
+
### Improvements
|
|
8
|
+
|
|
9
|
+
* Improved/updated README documentation + typos
|
|
10
|
+
* Remove default memory setting
|
|
11
|
+
* Fix relative paths in synced folders
|
|
12
|
+
|
|
1
13
|
## 0.14.0 / 2013-12-09
|
|
2
14
|
|
|
3
15
|
### New features
|
|
@@ -187,4 +199,4 @@ The initial release.
|
|
|
187
199
|
[@petejkim]: https://github.com/petejkim
|
|
188
200
|
[@sandfish8]: https://github.com/sandfish8
|
|
189
201
|
[@sethvargo]: https://github.com/sethvargo
|
|
190
|
-
[@tmatilai]: https://github.com/tmatilai
|
|
202
|
+
[@tmatilai]: https://github.com/tmatilai
|
data/README.md
CHANGED
|
@@ -72,20 +72,22 @@ This will effectively generate a configuration similar to:
|
|
|
72
72
|
---
|
|
73
73
|
platforms:
|
|
74
74
|
- name: ubuntu-10.04
|
|
75
|
-
|
|
75
|
+
driver:
|
|
76
76
|
box: opscode-ubuntu-10.04
|
|
77
77
|
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
|
|
78
78
|
- name: ubuntu-12.04
|
|
79
|
-
|
|
79
|
+
driver:
|
|
80
80
|
box: opscode-ubuntu-12.04
|
|
81
81
|
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
|
|
82
82
|
- name: ubuntu-12.10
|
|
83
|
-
|
|
83
|
+
driver:
|
|
84
84
|
box: opscode-ubuntu-12.10
|
|
85
85
|
box_url: ...
|
|
86
86
|
# ...
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
Many host wide defaults for Vagrant can be set using `$HOME/.vagrant.d/Vagrantfile`. See the [Vagrantfile documentation][vagrantfile] for more information.
|
|
90
|
+
|
|
89
91
|
## <a name="config"></a> Configuration
|
|
90
92
|
|
|
91
93
|
### <a name="config-box"></a> box
|
|
@@ -108,13 +110,14 @@ The default will be computed from the platform name of the instance.
|
|
|
108
110
|
|
|
109
111
|
### <a name="config-provider"></a> provider
|
|
110
112
|
|
|
111
|
-
This determines which Vagrant provider to use
|
|
113
|
+
This determines which Vagrant provider to use. The value should match
|
|
112
114
|
the provider name in Vagrant. For example, to use VMware Fusion the provider
|
|
113
115
|
should be `vmware_fusion`. Please see the docs on [providers][vagrant_providers]
|
|
114
116
|
for further details.
|
|
115
117
|
|
|
116
118
|
By default the value is unset, or `nil`. In this case the driver will use the
|
|
117
|
-
Vagrant default provider which at this current time
|
|
119
|
+
Vagrant [default provider][vagrant_default_provider] which at this current time
|
|
120
|
+
is `virtualbox` unless set by `VAGRANT_DEFAULT_PROVIDER` environment variable.
|
|
118
121
|
|
|
119
122
|
### <a name="config-customize"></a> customize
|
|
120
123
|
|
|
@@ -123,7 +126,7 @@ pair will be passed to your providers customization block. For example, with
|
|
|
123
126
|
the default `virtualbox` provider:
|
|
124
127
|
|
|
125
128
|
```ruby
|
|
126
|
-
|
|
129
|
+
driver:
|
|
127
130
|
customize:
|
|
128
131
|
memory: 1024
|
|
129
132
|
cpuexecutioncap: 50
|
|
@@ -142,11 +145,7 @@ Vagrant.configure("2") do |config|
|
|
|
142
145
|
end
|
|
143
146
|
```
|
|
144
147
|
|
|
145
|
-
Please read the [
|
|
146
|
-
more details.
|
|
147
|
-
|
|
148
|
-
By default, each Vagrant virtual machine is configured with 256 MB of RAM. In
|
|
149
|
-
other words the default value for `customize` is `{:memory => '256'}`.
|
|
148
|
+
Please read the "Customizations" sections for [VirtualBox][vagrant_config_vbox] and [VMware][vagrant_config_vmware] for more details.
|
|
150
149
|
|
|
151
150
|
### <a name="config-dry-run"></a> dry\_run
|
|
152
151
|
|
|
@@ -167,11 +166,11 @@ The default is unset, or `nil`.
|
|
|
167
166
|
### <a name="config-network"></a> network
|
|
168
167
|
|
|
169
168
|
An **Array** of network customizations for the virtual machine. Each Array
|
|
170
|
-
element is itself an Array of arguments to be passed to the `config.vm.
|
|
169
|
+
element is itself an Array of arguments to be passed to the `config.vm.network`
|
|
171
170
|
method. For example:
|
|
172
171
|
|
|
173
172
|
```ruby
|
|
174
|
-
|
|
173
|
+
driver:
|
|
175
174
|
network:
|
|
176
175
|
- ["forwarded_port", {guest: 80, host: 8080}]
|
|
177
176
|
- ["private_network", {ip: "192.168.33.33"}]
|
|
@@ -195,7 +194,7 @@ The default is an empty Array, `[]`.
|
|
|
195
194
|
|
|
196
195
|
### <a name="config-pre-create-command"></a> pre\_create\_command
|
|
197
196
|
|
|
198
|
-
An optional
|
|
197
|
+
An optional hook to run a command immediately prior to the
|
|
199
198
|
`vagrant up --no-provisioner` command being executed.
|
|
200
199
|
|
|
201
200
|
There is an optional token, `{{vagrant_root}}` that can be used in the
|
|
@@ -215,15 +214,16 @@ The default is unset, or `nil`.
|
|
|
215
214
|
|
|
216
215
|
### <a name="config-synced-folders"></a> synced_folders
|
|
217
216
|
|
|
218
|
-
Allow the user to specify a collection of synced folders
|
|
219
|
-
instance.
|
|
217
|
+
Allow the user to specify a collection of synced folders on each Vagrant
|
|
218
|
+
instance. Source paths can be relative to the kitchen root.
|
|
220
219
|
|
|
221
220
|
The default is an empty Array, or `[]`. The example:
|
|
222
221
|
|
|
223
222
|
```ruby
|
|
224
|
-
|
|
225
|
-
synced_folders:
|
|
226
|
-
|
|
223
|
+
driver:
|
|
224
|
+
synced_folders:
|
|
225
|
+
- ["data/%{instance_name}", "/opt/instance_data"],
|
|
226
|
+
- ["/host_path", "/vm_path", "create: true, type: :nfs"]
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
will generate a Vagrantfile configuration similar to:
|
|
@@ -232,8 +232,8 @@ will generate a Vagrantfile configuration similar to:
|
|
|
232
232
|
Vagrant.configure("2") do |config|
|
|
233
233
|
# ...
|
|
234
234
|
|
|
235
|
-
c.vm.synced_folder "/Users/mray/
|
|
236
|
-
c.vm.synced_folder "/host_path", "/vm_path", create: true,
|
|
235
|
+
c.vm.synced_folder "/Users/mray/cookbooks/pxe_dust/data/default-ubuntu-1204", "/opt/instance_data"
|
|
236
|
+
c.vm.synced_folder "/host_path", "/vm_path", create: true, type: :nfs
|
|
237
237
|
end
|
|
238
238
|
```
|
|
239
239
|
|
|
@@ -247,7 +247,7 @@ will be used (which is usually set to 'vagrant').
|
|
|
247
247
|
|
|
248
248
|
### <a name="config-vagrantfile-erb"></a> vagrantfile\_erb
|
|
249
249
|
|
|
250
|
-
An
|
|
250
|
+
An alternate Vagrantfile ERB template that will be rendered for use by this
|
|
251
251
|
driver. The binding context for the ERB processing is that of the Driver
|
|
252
252
|
object, which means that methods like `config[:kitchen_root]`, `instance.name`,
|
|
253
253
|
and `instance.provisioner[:run_list]` can be used to compose a custom
|
|
@@ -316,13 +316,16 @@ Apache 2.0 (see [LICENSE][license])
|
|
|
316
316
|
[issues]: https://github.com/opscode/kitchen-vagrant/issues
|
|
317
317
|
[license]: https://github.com/opscode/kitchen-vagrant/blob/master/LICENSE
|
|
318
318
|
[repo]: https://github.com/opscode/kitchen-vagrant
|
|
319
|
-
[driver_usage]: http://
|
|
319
|
+
[driver_usage]: http://kitchen.ci/docs/getting-started/adding-platform
|
|
320
320
|
|
|
321
321
|
[vagrant_dl]: http://downloads.vagrantup.com/
|
|
322
322
|
[vagrant_machine_settings]: http://docs.vagrantup.com/v2/vagrantfile/machine_settings.html
|
|
323
323
|
[vagrant_networking]: http://docs.vagrantup.com/v2/networking/basic_usage.html
|
|
324
324
|
[virtualbox_dl]: https://www.virtualbox.org/wiki/Downloads
|
|
325
325
|
[vagrantfile]: http://docs.vagrantup.com/v2/vagrantfile/index.html
|
|
326
|
+
[vagrant_default_provider]: http://docs.vagrantup.com/v2/providers/default.html
|
|
327
|
+
[vagrant_config_vbox]: http://docs.vagrantup.com/v2/virtualbox/configuration.html
|
|
328
|
+
[vagrant_config_vmware]: http://docs.vagrantup.com/v2/vmware/configuration.html
|
|
326
329
|
[vagrant_providers]: http://docs.vagrantup.com/v2/providers/index.html
|
|
327
330
|
[vagrant_wrapper]: https://github.com/org-binbab/gem-vagrant-wrapper
|
|
328
331
|
[vagrant_wrapper_background]: https://github.com/org-binbab/gem-vagrant-wrapper#background---aka-the-vagrant-gem-enigma
|
|
@@ -33,7 +33,7 @@ module Kitchen
|
|
|
33
33
|
# dependency hook checks when feature is released
|
|
34
34
|
class Vagrant < Kitchen::Driver::SSHBase
|
|
35
35
|
|
|
36
|
-
default_config :customize, {
|
|
36
|
+
default_config :customize, {}
|
|
37
37
|
default_config :network, []
|
|
38
38
|
default_config :synced_folders, []
|
|
39
39
|
default_config :pre_create_command, nil
|
|
@@ -143,6 +143,8 @@ module Kitchen
|
|
|
143
143
|
def create_vagrantfile
|
|
144
144
|
return if @vagrantfile_created
|
|
145
145
|
|
|
146
|
+
finalize_synced_folder_config
|
|
147
|
+
|
|
146
148
|
vagrantfile = File.join(vagrant_root, "Vagrantfile")
|
|
147
149
|
debug("Creating Vagrantfile for #{instance.to_str} (#{vagrantfile})")
|
|
148
150
|
FileUtils.mkdir_p(vagrant_root)
|
|
@@ -151,6 +153,19 @@ module Kitchen
|
|
|
151
153
|
@vagrantfile_created = true
|
|
152
154
|
end
|
|
153
155
|
|
|
156
|
+
def finalize_synced_folder_config
|
|
157
|
+
config[:synced_folders].map! do |source, destination, options|
|
|
158
|
+
[
|
|
159
|
+
File.expand_path(
|
|
160
|
+
source.gsub("%{instance_name}", instance.name),
|
|
161
|
+
config[:kitchen_root]
|
|
162
|
+
),
|
|
163
|
+
destination.gsub("%{instance_name}", instance.name),
|
|
164
|
+
options || "nil"
|
|
165
|
+
]
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
154
169
|
def render_template
|
|
155
170
|
if File.exists?(template)
|
|
156
171
|
ERB.new(IO.read(template)).result(binding).gsub(%r{^\s*$\n}, '')
|
data/templates/Vagrantfile.erb
CHANGED
|
@@ -20,12 +20,8 @@ Vagrant.configure("2") do |c|
|
|
|
20
20
|
<% end %>
|
|
21
21
|
|
|
22
22
|
c.vm.synced_folder ".", "/vagrant", disabled: true
|
|
23
|
-
<% config[:synced_folders].each do |source, destination, options|
|
|
24
|
-
|
|
25
|
-
l_destination = destination.gsub("%{instance_name}", instance.name)
|
|
26
|
-
opt = (options.nil? ? '' : ", #{options}")
|
|
27
|
-
%>
|
|
28
|
-
c.vm.synced_folder "<%= l_source %>", "<%= l_destination %>"<%= opt %>
|
|
23
|
+
<% config[:synced_folders].each do |source, destination, options| %>
|
|
24
|
+
c.vm.synced_folder "<%= source %>", "<%= destination %>", <%= options %>
|
|
29
25
|
<% end %>
|
|
30
26
|
|
|
31
27
|
c.vm.provider :<%= config[:provider] %> do |p|
|
|
@@ -33,7 +29,7 @@ Vagrant.configure("2") do |c|
|
|
|
33
29
|
<% case config[:provider]
|
|
34
30
|
when "virtualbox" %>
|
|
35
31
|
p.customize ["modifyvm", :id, "--<%= key %>", "<%= value %>"]
|
|
36
|
-
<% when "rackspace" %>
|
|
32
|
+
<% when "rackspace", "softlayer" %>
|
|
37
33
|
p.<%= key %> = "<%= value%>"
|
|
38
34
|
<% when /^vmware_/ %>
|
|
39
35
|
<% if key == :memory %>
|
metadata
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-vagrant
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fletcher Nichol
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.0'
|
|
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
26
|
version: '1.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: cane
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: tailor
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: countloc
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
description: Kitchen::Driver::Vagrant - A Vagrant Driver for Test Kitchen.
|
|
@@ -73,8 +73,8 @@ executables: []
|
|
|
73
73
|
extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
|
75
75
|
files:
|
|
76
|
-
- .gitignore
|
|
77
|
-
- .travis.yml
|
|
76
|
+
- ".gitignore"
|
|
77
|
+
- ".travis.yml"
|
|
78
78
|
- CHANGELOG.md
|
|
79
79
|
- Gemfile
|
|
80
80
|
- LICENSE
|
|
@@ -94,18 +94,19 @@ require_paths:
|
|
|
94
94
|
- lib
|
|
95
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
|
-
- -
|
|
97
|
+
- - ">="
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
99
|
version: '0'
|
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements:
|
|
102
|
-
- -
|
|
102
|
+
- - ">="
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
104
|
version: '0'
|
|
105
105
|
requirements: []
|
|
106
106
|
rubyforge_project:
|
|
107
|
-
rubygems_version: 2.
|
|
107
|
+
rubygems_version: 2.2.2
|
|
108
108
|
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:
|