kitchen-vagrant 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/vagrant_version.rb +1 -1
- metadata +3 -17
- data/.gitignore +0 -17
- data/.rspec +0 -2
- data/.travis.yml +0 -24
- data/CHANGELOG.md +0 -569
- data/Gemfile +0 -15
- data/Guardfile +0 -23
- data/README.md +0 -653
- data/Rakefile +0 -46
- data/example/kitchen.vagrant.yml +0 -122
- data/kitchen-vagrant.gemspec +0 -30
- data/spec/kitchen/driver/vagrant_spec.rb +0 -2115
- data/spec/spec_helper.rb +0 -33
data/Gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
gemspec
|
3
|
-
|
4
|
-
group :guard do
|
5
|
-
gem "guard-rspec", :require => nil
|
6
|
-
gem "guard-rubocop", :require => nil
|
7
|
-
end
|
8
|
-
|
9
|
-
group :test do
|
10
|
-
gem "codeclimate-test-reporter", :require => nil
|
11
|
-
end
|
12
|
-
|
13
|
-
group :changelog do
|
14
|
-
gem "github_changelog_generator", "1.11.3", :require => nil
|
15
|
-
end
|
data/Guardfile
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
ignore %r{^\.gem/}
|
3
|
-
|
4
|
-
def rspec_opts
|
5
|
-
{ :cmd => "bundle exec rspec" }
|
6
|
-
end
|
7
|
-
|
8
|
-
def rubocop_opts
|
9
|
-
{ :all_on_start => false, :keep_failed => false, :cli => "-r finstyle" }
|
10
|
-
end
|
11
|
-
|
12
|
-
group :red_green_refactor, :halt_on_fail => true do
|
13
|
-
guard :rspec, rspec_opts do
|
14
|
-
watch(%r{^spec/(.*)_spec\.rb})
|
15
|
-
watch(%r{^lib/(.*)([^/]+)\.rb}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
16
|
-
watch(%r{^spec/spec_helper\.rb}) { "spec" }
|
17
|
-
end
|
18
|
-
|
19
|
-
guard :rubocop, rubocop_opts do
|
20
|
-
watch(%r{.+\.rb$})
|
21
|
-
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
22
|
-
end
|
23
|
-
end
|
data/README.md
DELETED
@@ -1,653 +0,0 @@
|
|
1
|
-
# <a name="title"></a> Kitchen::Vagrant
|
2
|
-
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/kitchen-vagrant.svg)](http://badge.fury.io/rb/kitchen-vagrant)
|
4
|
-
[![Build Status](https://secure.travis-ci.org/test-kitchen/kitchen-vagrant.svg?branch=master)](https://travis-ci.org/test-kitchen/kitchen-vagrant)
|
5
|
-
[![Code Climate](https://codeclimate.com/github/test-kitchen/kitchen-vagrant.svg)](https://codeclimate.com/github/test-kitchen/kitchen-vagrant)
|
6
|
-
[![Test Coverage](https://codeclimate.com/github/test-kitchen/kitchen-vagrant/coverage.svg)](https://codeclimate.com/github/test-kitchen/kitchen-vagrant)
|
7
|
-
|
8
|
-
A Test Kitchen Driver for Vagrant.
|
9
|
-
|
10
|
-
This driver works by generating a single Vagrantfile for each instance in a
|
11
|
-
sandboxed directory. Since the Vagrantfile is written out on disk, Vagrant
|
12
|
-
needs absolutely no knowledge of Test Kitchen. So no Vagrant plugins are
|
13
|
-
required.
|
14
|
-
|
15
|
-
## <a name="requirements"></a> Requirements
|
16
|
-
|
17
|
-
### <a name="dependencies-vagrant"></a> Vagrant
|
18
|
-
|
19
|
-
A Vagrant version of 1.1.0 or higher is required for this driver which means
|
20
|
-
that a [native package][vagrant_dl] must be installed on the system running
|
21
|
-
Test Kitchen.
|
22
|
-
|
23
|
-
If you are creating Windows VMs over a WinRM Transport, then the
|
24
|
-
[vagrant-winrm][vagrant_winrm] Vagrant plugin must be installed. As a
|
25
|
-
consequence, the minimum version of Vagrant required is 1.6 or higher.
|
26
|
-
|
27
|
-
### <a name="dependencies-virtualization"></a> Supported Virtualization Hypervisors
|
28
|
-
|
29
|
-
| Provider | vagrant plugin | Paid
|
30
|
-
| --------- | --------- | ---------
|
31
|
-
| [VirtualBox][virtualbox_dl] | built-in | N
|
32
|
-
| [VMware Fusion][fusion_dl] | vagrant-vmware-fusion | Y
|
33
|
-
| [VMware Workstation][ws_dl] | vagrant-vmware-workstation | Y
|
34
|
-
| [Parallels Desktop][parallels_dl] | vagrant-parallels | Y (plugin free)
|
35
|
-
| Hyper-V | n/a | N
|
36
|
-
|
37
|
-
If you would like to use VMware Fusion or Workstation you must purchase the
|
38
|
-
software from VMware and also purchase the corresponding [Vagrant VMware Plugin][vmware_plugin].
|
39
|
-
|
40
|
-
## <a name="installation"></a> Installation
|
41
|
-
|
42
|
-
If using the ChefDK, kitchen-vagrant is already installed. If using an existing Ruby install:
|
43
|
-
|
44
|
-
```
|
45
|
-
gem install kitchen-vagrant
|
46
|
-
```
|
47
|
-
|
48
|
-
## <a name="default-config"></a> Default Configuration
|
49
|
-
|
50
|
-
For a set of platforms and hypervisors, boxes are published under the [Bento organization][bento_org]
|
51
|
-
on [Vagrant Cloud][vagrant_cloud] which serve as the default boxes for common platforms:
|
52
|
-
|
53
|
-
```yaml
|
54
|
-
---
|
55
|
-
platforms:
|
56
|
-
- name: ubuntu-16.04
|
57
|
-
- name: centos-7
|
58
|
-
- name: freebsd-11
|
59
|
-
```
|
60
|
-
|
61
|
-
This will effectively generate a configuration similar to:
|
62
|
-
|
63
|
-
```yaml
|
64
|
-
---
|
65
|
-
platforms:
|
66
|
-
- name: ubuntu-16.04
|
67
|
-
driver:
|
68
|
-
box: bento/ubuntu-16.04
|
69
|
-
- name: centos-7
|
70
|
-
driver:
|
71
|
-
box: bento/centos-7
|
72
|
-
- name: freebsd-11
|
73
|
-
driver:
|
74
|
-
box: bento/freebsd-11
|
75
|
-
# ...
|
76
|
-
```
|
77
|
-
|
78
|
-
Any other platform names will set a more reasonable default for `box` and leave `box_url` unset. For example:
|
79
|
-
|
80
|
-
```yaml
|
81
|
-
---
|
82
|
-
platforms:
|
83
|
-
- name: slackware-14.1
|
84
|
-
- name: openbsd-5.6
|
85
|
-
- name: windows-2012r2
|
86
|
-
```
|
87
|
-
|
88
|
-
This will effectively generate a configuration similar to:
|
89
|
-
|
90
|
-
```yaml
|
91
|
-
---
|
92
|
-
platforms:
|
93
|
-
- name: slackware-14.1
|
94
|
-
driver:
|
95
|
-
box: slackware-14.1
|
96
|
-
- name: openbsd-5.6
|
97
|
-
driver:
|
98
|
-
box: openbsd-5.6
|
99
|
-
- name: windows-2012r2
|
100
|
-
driver:
|
101
|
-
box: windows-2012r2
|
102
|
-
```
|
103
|
-
### Hyper-V
|
104
|
-
|
105
|
-
As Hyper-V is an exclusive hypervisor, it is recomended that the environment variable `VAGRANT_DEFAULT_PROVIDER` be set to `hyperv`. Vagrant currently requires user input to choose a virtual switch so we try to detect this automatically and use a workaround. If no network configuration is provided, we check:
|
106
|
-
|
107
|
-
1) environment variable `KITCHEN_HYPERV_SWITCH`
|
108
|
-
2) If on Windows 10 Fall Creators Update, use the built-in 'Default Switch'
|
109
|
-
3) the first switch returned
|
110
|
-
|
111
|
-
If `VAGRANT_DEFAULT_PROVIDER` is set and the above logic has a valid virtual switch, no additional configuration is needed. This will effectively generate a configuration similar to:
|
112
|
-
|
113
|
-
```yaml
|
114
|
-
driver:
|
115
|
-
name: vagrant
|
116
|
-
provider: hyperv
|
117
|
-
network:
|
118
|
-
- ["public_network", bridge: "Default Switch"]
|
119
|
-
```
|
120
|
-
|
121
|
-
## <a name="config"></a> Configuration
|
122
|
-
|
123
|
-
### <a name="config-cachier"></a> cachier
|
124
|
-
|
125
|
-
Enable and configure scope for [vagrant-cachier][vagrant_cachier] plugin.
|
126
|
-
Valid options are `:box` or `:machine`, setting to a truthy value yields `:box`
|
127
|
-
|
128
|
-
For example:
|
129
|
-
|
130
|
-
```yaml
|
131
|
-
---
|
132
|
-
driver:
|
133
|
-
cachier: true
|
134
|
-
```
|
135
|
-
|
136
|
-
will generate a Vagrantfile configuration similar to:
|
137
|
-
|
138
|
-
```ruby
|
139
|
-
config.cache.scope = :box
|
140
|
-
```
|
141
|
-
|
142
|
-
The default is `nil`, indicating unset.
|
143
|
-
|
144
|
-
|
145
|
-
### <a name="config-box"></a> box
|
146
|
-
|
147
|
-
**Required** This determines which Vagrant box will be used. For more
|
148
|
-
details, please read the Vagrant [machine settings][vagrant_machine_settings]
|
149
|
-
page.
|
150
|
-
|
151
|
-
The default will be computed from the platform name of the instance. However,
|
152
|
-
for a number of common platforms in the [Bento][bento] project, the default will
|
153
|
-
prefix the name with `bento/` in accordance with Vagrant Cloud naming standards.
|
154
|
-
|
155
|
-
For example, a platform with name `ubuntu-16.04` will produce a
|
156
|
-
default `box` value of `bento/ubuntu-16.04`. Alternatively, a box called
|
157
|
-
`slackware-14.1` will produce a default `box` value of `slackware-14.1`.
|
158
|
-
|
159
|
-
### <a name="config-box-check-update"></a> box\_check\_update
|
160
|
-
|
161
|
-
Whether to check for box updates (enabled by default).
|
162
|
-
|
163
|
-
### <a name="config-box-url"></a> box\_url
|
164
|
-
|
165
|
-
A box_url is not required when using the Vagrant Cloud format of
|
166
|
-
`bento/ubuntu-16.04` assuming the organization and box referenced
|
167
|
-
exist. If using a custom box this can be an `https://` or `file://`
|
168
|
-
URL.
|
169
|
-
|
170
|
-
### <a name="config-box-download-ca-cert"></a> box\_download\_ca\_cert
|
171
|
-
|
172
|
-
Path relative to the `.kitchen.yml` file for locating the trusted CA bundle.
|
173
|
-
Useful when combined with `box_url`.
|
174
|
-
|
175
|
-
The default is `nil`, indicating to use the default Mozilla CA cert bundle.
|
176
|
-
See also `box_download_insecure`.
|
177
|
-
|
178
|
-
### <a name="config-box-download-insecure"></a> box\_download\_insecure
|
179
|
-
|
180
|
-
If true, then SSL certificates from the server will
|
181
|
-
not be verified.
|
182
|
-
|
183
|
-
The default is `false`, meaning if the URL is an HTTPS URL,
|
184
|
-
then SSL certs will be verified.
|
185
|
-
|
186
|
-
### <a name="config-box-version"></a> box\_version
|
187
|
-
|
188
|
-
The [version][vagrant_versioning] of the configured box.
|
189
|
-
|
190
|
-
The default is `nil`, indicating unset.
|
191
|
-
|
192
|
-
This option is only relevant when used with Vagrant Cloud boxes which support versioning.
|
193
|
-
|
194
|
-
### <a name="config-communicator"></a> communicator
|
195
|
-
|
196
|
-
**Note:** It should largely be the responsibility of the underlying Vagrant
|
197
|
-
base box to properly set the `config.vm.communicator` value. For example, if
|
198
|
-
the base box is a Windows operating system and does not have an SSH service
|
199
|
-
installed and enabled, then Vagrant will be unable to even boot it (using
|
200
|
-
`vagrant up`), without a custom Vagrantfile. If you are authoring a base box,
|
201
|
-
please take care to set your value for communicator to give your users the best
|
202
|
-
possible out-of-the-box experience.
|
203
|
-
|
204
|
-
For overriding the default communicator setting of the base box.
|
205
|
-
|
206
|
-
For example:
|
207
|
-
|
208
|
-
```yaml
|
209
|
-
---
|
210
|
-
driver:
|
211
|
-
communicator: ssh
|
212
|
-
```
|
213
|
-
|
214
|
-
will generate a Vagrantfile configuration similar to:
|
215
|
-
|
216
|
-
```ruby
|
217
|
-
config.vm.communicator = "ssh"
|
218
|
-
```
|
219
|
-
|
220
|
-
The default is `nil` assuming ssh will be used.
|
221
|
-
|
222
|
-
### <a name="config-customize"></a> customize
|
223
|
-
|
224
|
-
A **Hash** of customizations to a Vagrant virtual machine. Each key/value
|
225
|
-
pair will be passed to your providers customization block. For example, with
|
226
|
-
the default `virtualbox` provider:
|
227
|
-
|
228
|
-
```yaml
|
229
|
-
---
|
230
|
-
driver:
|
231
|
-
customize:
|
232
|
-
memory: 1024
|
233
|
-
cpuexecutioncap: 50
|
234
|
-
```
|
235
|
-
|
236
|
-
will generate a Vagrantfile configuration similar to:
|
237
|
-
|
238
|
-
```ruby
|
239
|
-
Vagrant.configure("2") do |config|
|
240
|
-
# ...
|
241
|
-
|
242
|
-
config.vm.provider :virtualbox do |virtualbox|
|
243
|
-
virtualbox.customize ["modifyvm", :id, "--memory", "1024"]
|
244
|
-
virtualbox.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
|
245
|
-
end
|
246
|
-
end
|
247
|
-
```
|
248
|
-
|
249
|
-
Please read the "Customizations" sections for [VirtualBox][vagrant_config_vbox]
|
250
|
-
and [VMware][vagrant_config_vmware] for more details.
|
251
|
-
|
252
|
-
#### <a name="config-customize-virtualbox-disk"></a> VirtualBox additional disk
|
253
|
-
|
254
|
-
Adding the `createhd` and `storageattach` keys in `customize` allows for creation
|
255
|
-
of additional disks in VirtualBox. Full paths must be used as required by VirtualBox.
|
256
|
-
|
257
|
-
Adding the `storagectl` key in `customize` allows for creation or customization of
|
258
|
-
disks controller in Virtualbox.
|
259
|
-
|
260
|
-
*NOTE*: IDE Controller based drives always show up in the boot order first, regardless of if they
|
261
|
-
are [bootable][vbox_ide_boot].
|
262
|
-
|
263
|
-
```yaml
|
264
|
-
driver:
|
265
|
-
customize:
|
266
|
-
createhd:
|
267
|
-
- filename: /tmp/disk1.vmdk
|
268
|
-
size: 1024
|
269
|
-
- filename: /tmp/disk2.vmdk
|
270
|
-
size: 2048
|
271
|
-
storagectl:
|
272
|
-
- name: IDE Controller
|
273
|
-
portcount: 4
|
274
|
-
storageattach:
|
275
|
-
- storagectl: IDE Controller
|
276
|
-
port: 1
|
277
|
-
device: 0
|
278
|
-
type: hdd
|
279
|
-
medium: /tmp/disk1.vmdk
|
280
|
-
- storagectl: IDE Controller
|
281
|
-
port: 1
|
282
|
-
device: 1
|
283
|
-
type: hdd
|
284
|
-
medium: /tmp/disk2.vmdk
|
285
|
-
```
|
286
|
-
|
287
|
-
will generate a Vagrantfile configuration similar to:
|
288
|
-
|
289
|
-
```ruby
|
290
|
-
Vagrant.configure("2") do |config|
|
291
|
-
# ...
|
292
|
-
|
293
|
-
config.vm.provider :virtualbox do |virtualbox|
|
294
|
-
virtualbox.customize ["createhd", "--filename", "./tmp/disk1.vmdk", "--size", 1024]
|
295
|
-
virtualbox.customize ["storagectl", :id, "--name", "IDE Controller", "--portcount", 4]
|
296
|
-
virtualbox.customize ["storageattach", :id, "--storagectl", "IDE Controller", "--port", "1", "--device", 0, "--type", "hdd", "--medium", "./tmp/disk1.vmdk"]
|
297
|
-
end
|
298
|
-
end
|
299
|
-
```
|
300
|
-
|
301
|
-
Please read [createhd](https://www.virtualbox.org/manual/ch08.html#vboxmanage-createvdi)
|
302
|
-
, [storageattach](https://www.virtualbox.org/manual/ch08.html#vboxmanage-storageattach)
|
303
|
-
and [storagectl](https://www.virtualbox.org/manual/ch08.html#vboxmanage-storagectl)
|
304
|
-
for additional information on these options.
|
305
|
-
|
306
|
-
### <a name="config-guest"></a> guest
|
307
|
-
|
308
|
-
**Note:** It should largely be the responsibility of the underlying Vagrant
|
309
|
-
base box to properly set the `config.vm.guest` value. For example, if the base
|
310
|
-
box is a Windows operating system, then Vagrant will be unable to even boot it
|
311
|
-
(using `vagrant up`), without a custom Vagrantfile. If you are authoring a base
|
312
|
-
box, please take care to set your value for communicator to give your users the
|
313
|
-
best possible out-of-the-box experience.
|
314
|
-
|
315
|
-
For overriding the default guest setting of the base box.
|
316
|
-
|
317
|
-
The default is unset, or `nil`.
|
318
|
-
|
319
|
-
### <a name="config-gui"></a> gui
|
320
|
-
|
321
|
-
Allows GUI mode for each defined platform. Default is **nil**. Value is passed
|
322
|
-
to the `config.vm.provider` but only for the VirtualBox and VMware-based
|
323
|
-
providers.
|
324
|
-
|
325
|
-
```yaml
|
326
|
-
---
|
327
|
-
platforms:
|
328
|
-
- name: ubuntu-16.04
|
329
|
-
driver:
|
330
|
-
gui: true
|
331
|
-
```
|
332
|
-
|
333
|
-
will generate a Vagrantfile configuration similar to:
|
334
|
-
|
335
|
-
```ruby
|
336
|
-
Vagrant.configure("2") do |config|
|
337
|
-
# ...
|
338
|
-
|
339
|
-
c.vm.provider :virtualbox do |p|
|
340
|
-
p.gui = true
|
341
|
-
end
|
342
|
-
end
|
343
|
-
```
|
344
|
-
|
345
|
-
For more info about GUI vs. Headless mode please see [vagrant configuration docs][vagrant_config_vbox]
|
346
|
-
|
347
|
-
### <a name="config-linked_clone"></a> linked_clone
|
348
|
-
|
349
|
-
Allows to use linked clones to import boxes for VirtualBox, VMware, Parallels Desktop and Hyper-V. Default is **nil**.
|
350
|
-
|
351
|
-
```yaml
|
352
|
-
---
|
353
|
-
platforms:
|
354
|
-
- name: ubuntu-16.04
|
355
|
-
driver:
|
356
|
-
linked_clone: true
|
357
|
-
```
|
358
|
-
|
359
|
-
|
360
|
-
will generate a Vagrantfile configuration similar to:
|
361
|
-
#### VirtualBox, VMware and Parallels Desktop
|
362
|
-
```ruby
|
363
|
-
Vagrant.configure("2") do |config|
|
364
|
-
# ...
|
365
|
-
|
366
|
-
c.vm.provider :virtualbox do |p|
|
367
|
-
p.linked_clone = true
|
368
|
-
end
|
369
|
-
end
|
370
|
-
```
|
371
|
-
#### Hyper-V
|
372
|
-
```ruby
|
373
|
-
Vagrant.configure("2") do |config|
|
374
|
-
# ...
|
375
|
-
|
376
|
-
c.vm.provider :hyperv do |p|
|
377
|
-
p.linked_clone = true
|
378
|
-
end
|
379
|
-
end
|
380
|
-
```
|
381
|
-
|
382
|
-
### <a name="config-network"></a> network
|
383
|
-
|
384
|
-
An **Array** of network customizations for the virtual machine. Each Array
|
385
|
-
element is itself an Array of arguments to be passed to the `config.vm.network`
|
386
|
-
method. For example:
|
387
|
-
|
388
|
-
```yaml
|
389
|
-
---
|
390
|
-
driver:
|
391
|
-
network:
|
392
|
-
- ["forwarded_port", {guest: 80, host: 8080}]
|
393
|
-
- ["private_network", {ip: "192.168.33.33"}]
|
394
|
-
```
|
395
|
-
|
396
|
-
will generate a Vagrantfile configuration similar to:
|
397
|
-
|
398
|
-
```ruby
|
399
|
-
Vagrant.configure("2") do |config|
|
400
|
-
# ...
|
401
|
-
|
402
|
-
config.vm.network :forwarded_port, guest: 80, host: 8080
|
403
|
-
config.vm.network :private_network, ip: "192.168.33.33"
|
404
|
-
end
|
405
|
-
```
|
406
|
-
|
407
|
-
Please read the Vagrant [networking basic usage][vagrant_networking] page for
|
408
|
-
more details.
|
409
|
-
|
410
|
-
The default is an empty Array, `[]`.
|
411
|
-
|
412
|
-
### <a name="config-pre-create-command"></a> pre\_create\_command
|
413
|
-
|
414
|
-
An optional hook to run a command immediately prior to the
|
415
|
-
`vagrant up --no-provisioner` command being executed.
|
416
|
-
|
417
|
-
There is an optional token, `{{vagrant_root}}` that can be used in the
|
418
|
-
`pre_create_command` string which will be expanded by the driver to be the full
|
419
|
-
path to the sandboxed Vagrant root directory containing the Vagrantfile. This
|
420
|
-
command will be executed from the directory containing the .kitchen.yml file,
|
421
|
-
or the `kitchen_root`.
|
422
|
-
|
423
|
-
For example, if your project requires
|
424
|
-
[Bindler](https://github.com/fgrehm/bindler), this command could be:
|
425
|
-
|
426
|
-
```yaml
|
427
|
-
---
|
428
|
-
driver
|
429
|
-
pre_create_command: cp .vagrant_plugins.json {{vagrant_root}}/ && vagrant plugin bundle
|
430
|
-
```
|
431
|
-
|
432
|
-
The default is unset, or `nil`.
|
433
|
-
|
434
|
-
### <a name="config-provider"></a> provider
|
435
|
-
|
436
|
-
This determines which Vagrant provider to use. The value should match
|
437
|
-
the provider name in Vagrant. For example, to use VMware Fusion the provider
|
438
|
-
should be `vmware_fusion`. Please see the docs on [providers][vagrant_providers]
|
439
|
-
for further details.
|
440
|
-
|
441
|
-
By default the value is unset, or `nil`. In this case the driver will use the
|
442
|
-
Vagrant [default provider][vagrant_default_provider] which at this current time
|
443
|
-
is `virtualbox` unless set by `VAGRANT_DEFAULT_PROVIDER` environment variable.
|
444
|
-
|
445
|
-
### <a name="provision"></a> provision
|
446
|
-
|
447
|
-
Set to true if you want to do the provision of vagrant in create.
|
448
|
-
Useful in case of you want to customize the OS in provision phase of vagrant
|
449
|
-
|
450
|
-
### <a name="config-ssh-key"></a> ssh\_key
|
451
|
-
|
452
|
-
This is the path to the private key file used for SSH authentication if you
|
453
|
-
would like to use your own private ssh key instead of the default vagrant
|
454
|
-
insecure private key.
|
455
|
-
|
456
|
-
If this value is a relative path, then it will be expanded relative to the
|
457
|
-
location of the main Vagrantfile. If this value is nil, then the default
|
458
|
-
insecure private key that ships with Vagrant will be used.
|
459
|
-
|
460
|
-
The default value is unset, or `nil`.
|
461
|
-
|
462
|
-
### <a name="config-synced-folders"></a> synced_folders
|
463
|
-
|
464
|
-
Allow the user to specify a collection of synced folders on each Vagrant
|
465
|
-
instance. Source paths can be relative to the kitchen root.
|
466
|
-
|
467
|
-
The default is an empty Array, or `[]`. The example:
|
468
|
-
|
469
|
-
```yaml
|
470
|
-
---
|
471
|
-
driver:
|
472
|
-
synced_folders:
|
473
|
-
- ["data/%{instance_name}", "/opt/instance_data"]
|
474
|
-
- ["/host_path", "/vm_path", "create: true, type: :nfs"]
|
475
|
-
```
|
476
|
-
|
477
|
-
will generate a Vagrantfile configuration similar to:
|
478
|
-
|
479
|
-
```ruby
|
480
|
-
Vagrant.configure("2") do |config|
|
481
|
-
# ...
|
482
|
-
|
483
|
-
c.vm.synced_folder "/Users/mray/cookbooks/pxe_dust/data/default-ubuntu-1204", "/opt/instance_data"
|
484
|
-
c.vm.synced_folder "/host_path", "/vm_path", create: true, type: :nfs
|
485
|
-
end
|
486
|
-
```
|
487
|
-
|
488
|
-
### <a name="config-cache_directory"></a> cache_directory
|
489
|
-
|
490
|
-
Customize the cache directory on the Vagrant instance. This parameter must be an
|
491
|
-
absolute path.
|
492
|
-
|
493
|
-
The defaults are:
|
494
|
-
* Windows: `C:\\omnibus\\cache`
|
495
|
-
* Unix: `/tmp/omnibus/cache`
|
496
|
-
|
497
|
-
The example:
|
498
|
-
|
499
|
-
```yaml
|
500
|
-
---
|
501
|
-
driver:
|
502
|
-
cache_directory: Z:\\custom\\cache
|
503
|
-
```
|
504
|
-
|
505
|
-
To disable usage of cache directory set `cache_directory` parameter to `false`.
|
506
|
-
|
507
|
-
### <a name="config-kitchen_cache_directory"></a> kitchen_cache_directory
|
508
|
-
|
509
|
-
Customize the kitchen cache directory on the system running Test Kitchen. This parameter must be an
|
510
|
-
absolute path.
|
511
|
-
|
512
|
-
The defaults are:
|
513
|
-
* Windows: `~/.kitchen/cache`
|
514
|
-
* Unix: `~/.kitchen/cache`
|
515
|
-
|
516
|
-
The example:
|
517
|
-
|
518
|
-
```yaml
|
519
|
-
---
|
520
|
-
driver:
|
521
|
-
kitchen_cache_directory: Z:\\custom\\kitchen_cache
|
522
|
-
```
|
523
|
-
|
524
|
-
### <a name="config-vagrantfile-erb"></a> vagrantfile\_erb
|
525
|
-
|
526
|
-
An alternate Vagrantfile ERB template that will be rendered for use by this
|
527
|
-
driver. The binding context for the ERB processing is that of the Driver
|
528
|
-
object, which means that methods like `config[:kitchen_root]`, `instance.name`,
|
529
|
-
and `instance.provisioner[:run_list]` can be used to compose a custom
|
530
|
-
Vagrantfile if necessary.
|
531
|
-
|
532
|
-
```yaml
|
533
|
-
---
|
534
|
-
driver:
|
535
|
-
vagrantfile_erb: CustomVagrantfile.erb
|
536
|
-
```
|
537
|
-
|
538
|
-
**Warning:** Be cautious when going down this road as your setup may cease to
|
539
|
-
be portable or applicable to other Test Kitchen Drivers such as Ec2 or Docker.
|
540
|
-
Using the alternative Vagrantfile template strategy may be a dangerous
|
541
|
-
road--be aware.
|
542
|
-
|
543
|
-
The default is to use a template which ships with this gem.
|
544
|
-
|
545
|
-
### <a name="config-vagrantfiles"></a> vagrantfiles
|
546
|
-
|
547
|
-
An array of paths to other Vagrantfiles to be merged with the default one. The
|
548
|
-
paths can be absolute or relative to the .kitchen.yml file.
|
549
|
-
|
550
|
-
**Note:** the Vagrantfiles must have a .rb extension to satisfy Ruby's
|
551
|
-
Kernel#require.
|
552
|
-
|
553
|
-
```yaml
|
554
|
-
---
|
555
|
-
driver:
|
556
|
-
vagrantfiles:
|
557
|
-
- VagrantfileA.rb
|
558
|
-
- /tmp/VagrantfileB.rb
|
559
|
-
```
|
560
|
-
|
561
|
-
### <a name="config-vm-hostname"></a> vm\_hostname
|
562
|
-
|
563
|
-
Sets the internal hostname for the instance. This is not used when connecting
|
564
|
-
to the Vagrant virtual machine.
|
565
|
-
|
566
|
-
For more details on this setting please read the
|
567
|
-
[config.vm.hostname](http://docs.vagrantup.com/v2/vagrantfile/machine_settings.html)
|
568
|
-
section of the Vagrant documentation.
|
569
|
-
|
570
|
-
To prevent this value from being rendered in the default Vagrantfile, you can
|
571
|
-
set this value to `false`.
|
572
|
-
|
573
|
-
The default will be computed from the name of the instance. For example, the
|
574
|
-
instance was called "default-fuzz-9" will produce a default `vm_hostname` value
|
575
|
-
of `"default-fuzz-9"`. For Windows-based platforms, a default of `nil` is used
|
576
|
-
to save on boot time and potential rebooting.
|
577
|
-
|
578
|
-
## <a name="unsupported"></a> Unsupported Hypervisors
|
579
|
-
|
580
|
-
The following providers are reported to work but are unsupported:
|
581
|
-
|
582
|
-
- [CloudStack][cloudstack] via [vagrant-cloudstack][vagrant_cloudstack]
|
583
|
-
- [KVM][kvm]/[Libvirt][libvirt] via [vagrant-libvirt][vagrant_libvirt]
|
584
|
-
- [LXC][lxc] via [vagrant-lxc][vagrant_lxc]
|
585
|
-
- [OpenStack][openstack]
|
586
|
-
- [RackSpace][rackspace] via [vagrant-rackspace][vagrant_rackspace]
|
587
|
-
- [SoftLayer][softlayer] via [vagrant-softlayer][vagrant_softlayer]
|
588
|
-
|
589
|
-
## <a name="development"></a> Development
|
590
|
-
|
591
|
-
* Source hosted at [GitHub][repo]
|
592
|
-
* Report issues/questions/feature requests on [GitHub Issues][issues]
|
593
|
-
|
594
|
-
Pull requests are very welcome! Make sure your patches are well tested.
|
595
|
-
Ideally create a topic branch for every separate change you make. For
|
596
|
-
example:
|
597
|
-
|
598
|
-
1. Fork the repo
|
599
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
600
|
-
3. Commit your changes (`git commit -am 'Added some feature'`)
|
601
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
602
|
-
5. Create new Pull Request
|
603
|
-
|
604
|
-
## <a name="authors"></a> Authors
|
605
|
-
|
606
|
-
Created by [Fletcher Nichol][author] (<fnichol@nichol.ca>)
|
607
|
-
|
608
|
-
## <a name="license"></a> License
|
609
|
-
|
610
|
-
Apache 2.0 (see [LICENSE][license])
|
611
|
-
|
612
|
-
|
613
|
-
[author]: https://github.com/test-kitchen
|
614
|
-
[issues]: https://github.com/test-kitchen/kitchen-vagrant/issues
|
615
|
-
[license]: https://github.com/test-kitchen/kitchen-vagrant/blob/master/LICENSE
|
616
|
-
[repo]: https://github.com/test-kitchen/kitchen-vagrant
|
617
|
-
[driver_usage]: http://kitchen.ci/docs/getting-started/adding-platform
|
618
|
-
|
619
|
-
[bento]: https://github.com/chef/bento
|
620
|
-
[vagrant_dl]: http://www.vagrantup.com/downloads.html
|
621
|
-
[vagrant_machine_settings]: http://docs.vagrantup.com/v2/vagrantfile/machine_settings.html
|
622
|
-
[vagrant_networking]: http://docs.vagrantup.com/v2/networking/basic_usage.html
|
623
|
-
[virtualbox_dl]: https://www.virtualbox.org/wiki/Downloads
|
624
|
-
[vagrantfile]: http://docs.vagrantup.com/v2/vagrantfile/index.html
|
625
|
-
[vagrant_default_provider]: http://docs.vagrantup.com/v2/providers/default.html
|
626
|
-
[vagrant_config_vbox]: http://docs.vagrantup.com/v2/virtualbox/configuration.html
|
627
|
-
[vagrant_config_vmware]: http://docs.vagrantup.com/v2/vmware/configuration.html
|
628
|
-
[vagrant_providers]: http://docs.vagrantup.com/v2/providers/index.html
|
629
|
-
[vagrant_versioning]: https://docs.vagrantup.com/v2/boxes/versioning.html
|
630
|
-
[vagrant_winrm]: https://github.com/criteo/vagrant-winrm
|
631
|
-
[vagrant_wrapper]: https://github.com/org-binbab/gem-vagrant-wrapper
|
632
|
-
[vagrant_wrapper_background]: https://github.com/org-binbab/gem-vagrant-wrapper#background---aka-the-vagrant-gem-enigma
|
633
|
-
[vmware_plugin]: http://www.vagrantup.com/vmware
|
634
|
-
[fusion_dl]: http://www.vmware.com/products/fusion/overview.html
|
635
|
-
[ws_dl]: http://www.vmware.com/products/workstation/
|
636
|
-
[bento_org]: https://app.vagrantup.com/bento
|
637
|
-
[vagrant_cloud]: https://app.vagrantup.com/boxes/search
|
638
|
-
[parallels_dl]: http://www.parallels.com/products/desktop/download/
|
639
|
-
[vagrant_parallels]: https://github.com/Parallels/vagrant-parallels
|
640
|
-
[vagrant_cachier]: https://github.com/fgrehm/vagrant-cachier
|
641
|
-
[vbox_ide_boot]: https://www.virtualbox.org/ticket/6979
|
642
|
-
[cloudstack]: https://cloudstack.apache.org/
|
643
|
-
[kvm]: https://www.linux-kvm.org/page/Main_Page
|
644
|
-
[libvirt]: https://libvirt.org/
|
645
|
-
[lxc]: https://linuxcontainers.org/
|
646
|
-
[openstack]: https://cloudstack.apache.org/
|
647
|
-
[rackspace]: https://www.rackspace.com/
|
648
|
-
[softlayer]: http://www.softlayer.com/
|
649
|
-
[vagrant_cloudstack]: https://github.com/MissionCriticalCloud/vagrant-cloudstack
|
650
|
-
[vagrant_libvirt]: https://github.com/vagrant-libvirt/vagrant-libvirt
|
651
|
-
[vagrant_lxc]: https://github.com/fgrehm/vagrant-lxc
|
652
|
-
[vagrant_rackspace]: https://github.com/mitchellh/vagrant-rackspace
|
653
|
-
[vagrant_softlayer]: https://github.com/audiolize/vagrant-softlayer
|