kitchen-vagrant 0.7.4 → 0.8.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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.8.0 / 2013-04-16
2
+
3
+ ### Improvements
4
+
5
+ * Pull request [#15][]: Support berkshelf-vagrant 1.1.0+ in Vagrantfiles. ([@petejkim][], [@fnichol][])
6
+ * Add an explanation of how this driver works in the README. ([@fnichol][])
7
+
8
+
1
9
  ## 0.7.4 / 2013-03-28
2
10
 
3
11
  ### Improvements
@@ -41,5 +49,7 @@ The initial release.
41
49
  <!--- The following link definition list is generated by PimpMyChangelog --->
42
50
  [#7]: https://github.com/opscode/kitchen/issues/7
43
51
  [#8]: https://github.com/opscode/kitchen/issues/8
52
+ [#15]: https://github.com/opscode/kitchen/issues/15
44
53
  [@fnichol]: https://github.com/fnichol
54
+ [@petejkim]: https://github.com/petejkim
45
55
  [@sandfish8]: https://github.com/sandfish8
data/README.md CHANGED
@@ -1,32 +1,182 @@
1
- # Kitchen::Vagrant
1
+ # <a name="title"></a> Kitchen::Vagrant
2
2
 
3
3
  [![Build Status](https://travis-ci.org/opscode/kitchen-vagrant.png)](https://travis-ci.org/opscode/kitchen-vagrant)
4
4
  [![Code Climate](https://codeclimate.com/github/opscode/kitchen-vagrant.png)](https://codeclimate.com/github/opscode/kitchen-vagrant)
5
5
 
6
- This gem provides `kitchen-vagrant`, a driver for `test-kitchen` to provision systems to test under Vagrant.
6
+ A Test Kitchen Driver for Vagrant.
7
7
 
8
- ## Installation
8
+ This driver works by generating a single Vagrantfile for each instance in a
9
+ sandboxed directory. Since the Vagrantfile is written out on disk, Vagrant
10
+ needs absolutely no knowledge of Test Kitchen. So no Vagrant plugin gem is
11
+ required.
9
12
 
10
- Add this line to your application's Gemfile:
13
+ ## <a name="requirements"></a> Requirements
11
14
 
12
- gem 'kitchen-vagrant'
15
+ ### <a name="dependencies-vagrant"></a> Vagrant
13
16
 
14
- And then execute:
17
+ A Vagrant version of 1.1.0 or higher is required for this driver which means
18
+ that a [native package][vagrant_dl] must be installed on the system running
19
+ Test Kitchen.
15
20
 
16
- $ bundle
21
+ **Note:** If you have previously installed Vagrant as a gem (a version prior
22
+ to 1.1.0), this version may be resolved first in your `PATH`. If you receive an
23
+ error message that Vagrant is too old despite having installed Vagrant as a
24
+ package, you may be required to uninstall the gem version or modify your `PATH`
25
+ environment.
17
26
 
18
- Or install it yourself as:
27
+ ### <a name="dependencies-virtualbox"></a> Virtualbox
19
28
 
20
- $ gem install kitchen-vagrant
29
+ Currently this driver only supports the VirtualBox provisioner which requires
30
+ the [VirtualBox package][virtualbox_dl] to be installed.
21
31
 
22
- ## Usage
32
+ ### <a name="dependencies-berkshelf"></a> Berkshelf Vagrant Plugin
23
33
 
24
- TODO: Write usage instructions here
34
+ If a Berksfile is present in your project's root directory, then this driver
35
+ will check to ensure that the [berkshelf-vagrant][berkshelf_vagrant] Vagrant
36
+ plugin is installed.
25
37
 
26
- ## Contributing
38
+ If your project doesn't use Berkshelf then this check will be skipped.
27
39
 
28
- 1. Fork it
40
+ ## <a name="installation"></a> Installation and Setup
41
+
42
+ Please read the [Driver usage][driver_usage] page for more details.
43
+
44
+ ## <a name="config"></a> Configuration
45
+
46
+ ### <a name="config-box"></a> box
47
+
48
+ (**Required**) This determines which Vagrant box will be used. For more
49
+ details, please read the Vagrant [machine settings][vagrant_machine_settings]
50
+ page.
51
+
52
+ There is **no** default value set.
53
+
54
+ ### <a name="config-box-url"></a> box\_url
55
+
56
+ The URL that the configured box can be found at. If the box is not installed on
57
+ the system, it will be retrieved from this URL when the virtual machine is
58
+ started.
59
+
60
+ There is **no** default value set.
61
+
62
+ ### <a name="config-customize"></a> customize
63
+
64
+ A **Hash** of customizations to a Vagrant virtual machine backed by VirtualBox.
65
+ Each key/value pair will be passed to the `virtualbox.customize` method. For
66
+ example:
67
+
68
+ ```ruby
69
+ driver_config:
70
+ customize:
71
+ memory: 1024
72
+ cpuexecutioncap: 50
73
+ ```
74
+
75
+ will generate a Vagrantfile configuration similar to:
76
+
77
+ ```ruby
78
+ Vagrant.configure("2") do |config|
79
+ # ...
80
+
81
+ config.vm.provider :virtualbox do |virtualbox|
82
+ virtualbox.customize ["modifyvm", :id, "--memory", "1024"]
83
+ virtualbox.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
84
+ end
85
+ end
86
+ ```
87
+
88
+ Please read the Vagrant [VirtualBox configuration][vagrant_virtualbox] page for
89
+ more details.
90
+
91
+ By default, each Vagrant virtual machine is configured with 256 MB of RAM. In
92
+ other words the default value for `customize` is `{:memory => '256'}`.
93
+
94
+ ### <a name="config-dry-run"></a> dry\_run
95
+
96
+ Useful when debugging Vagrant CLI commands. If set to `true`, all Vagrant CLI commands
97
+ will be displayed rather than executed.
98
+
99
+ The default is unset, or `nil`.
100
+
101
+ ### <a name="config-network"></a> network
102
+
103
+ An **Array** of network customizations for the virtual machine. Each Array
104
+ element is itself an Array of arguments to be passed to the `config.vm.netork`
105
+ method. For example:
106
+
107
+ ```ruby
108
+ driver_config:
109
+ network:
110
+ - ["forwarded_port", {guest: 80, host: 8080}]
111
+ - ["private_network", {ip: "192.168.33.33"}]
112
+ ```
113
+
114
+ will generate a Vagrantfile configuration similar to:
115
+
116
+ ```ruby
117
+ Vagrant.configure("2") do |config|
118
+ # ...
119
+
120
+ config.vm.network :forwarded_port, guest: 80, host: 8080
121
+ config.vm.network :private_network, ip: "192.168.33.33"
122
+ end
123
+ ```
124
+
125
+ Please read the Vagrant [networking basic usage][vagrant_networking] page for
126
+ more details.
127
+
128
+ There is **no** default value set.
129
+
130
+ ### <a name="config-require-chef-omnibus"></a> require\_chef\_omnibus
131
+
132
+ Determines whether or not a Chef [Omnibus package][chef_omnibus_dl] will be
133
+ installed. There are several different behaviors available:
134
+
135
+ * `true` - the latest release will be installed. Subsequent converges
136
+ will skip re-installing if chef is present.
137
+ * `latest` - the latest release will be installed. Subsequent converges
138
+ will always re-install even if chef is present.
139
+ * `<VERSION_STRING>` (ex: `10.24.0`) - the desired version string will
140
+ be passed the the install.sh script. Subsequent converges will skip if
141
+ the installed version and the desired version match.
142
+ * `false` or `nil` - no chef is installed.
143
+
144
+ The default value is unset, or `nil`.
145
+
146
+ ## <a name="development"></a> Development
147
+
148
+ * Source hosted at [GitHub][repo]
149
+ * Report issues/questions/feature requests on [GitHub Issues][issues]
150
+
151
+ Pull requests are very welcome! Make sure your patches are well tested.
152
+ Ideally create a topic branch for every separate change you make. For
153
+ example:
154
+
155
+ 1. Fork the repo
29
156
  2. Create your feature branch (`git checkout -b my-new-feature`)
30
- 3. Commit your changes (`git commit -am 'Add some feature'`)
157
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
31
158
  4. Push to the branch (`git push origin my-new-feature`)
32
159
  5. Create new Pull Request
160
+
161
+ ## <a name="authors"></a> Authors
162
+
163
+ Created and maintained by [Fletcher Nichol][author] (<fnichol@nichol.ca>)
164
+
165
+ ## <a name="license"></a> License
166
+
167
+ Apache 2.0 (see [LICENSE][license])
168
+
169
+
170
+ [author]: https://github.com/opscode
171
+ [issues]: https://github.com/opscode/kitchen-vagrant/issues
172
+ [license]: https://github.com/opscode/kitchen-vagrant/blob/master/LICENSE
173
+ [repo]: https://github.com/opscode/kitchen-vagrant
174
+ [driver_usage]: http://docs.kitchen-ci.org/drivers/usage
175
+ [chef_omnibus_dl]: http://www.opscode.com/chef/install/
176
+
177
+ [berkshelf_vagrant]: http://rubygems.org/gems/berkshelf-vagrant
178
+ [vagrant_dl]: http://downloads.vagrantup.com/
179
+ [vagrant_machine_settings]: http://docs.vagrantup.com/v2/vagrantfile/machine_settings.html
180
+ [vagrant_networking]: http://docs.vagrantup.com/v2/networking/basic_usage.html
181
+ [vagrant_virtualbox]: http://docs.vagrantup.com/v2/virtualbox/configuration.html
182
+ [virtualbox_dl]: https://www.virtualbox.org/wiki/Downloads
@@ -36,6 +36,8 @@ module Kitchen
36
36
 
37
37
  default_config :customize, {:memory => '256'}
38
38
 
39
+ required_config :box
40
+
39
41
  no_parallel_for :create, :destroy
40
42
 
41
43
  def create(state)
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Vagrant Kitchen driver
24
- VAGRANT_VERSION = "0.7.4"
24
+ VAGRANT_VERSION = "0.8.0"
25
25
  end
26
26
  end
@@ -85,6 +85,9 @@ module Kitchen
85
85
  def berkshelf_block(arr)
86
86
  if File.exists?(berksfile)
87
87
  arr << %{ c.berkshelf.berksfile_path = "#{berksfile}"}
88
+ arr << %{ if c.berkshelf.respond_to?(:enabled)}
89
+ arr << %{ c.berkshelf.enabled = true}
90
+ arr << %{ end}
88
91
  end
89
92
  end
90
93
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vagrant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
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-29 00:00:00.000000000 Z
12
+ date: 2013-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-kitchen
@@ -107,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  segments:
109
109
  - 0
110
- hash: 1825624288279070212
110
+ hash: 1635591648800108615
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  none: false
113
113
  requirements:
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  segments:
118
118
  - 0
119
- hash: 1825624288279070212
119
+ hash: 1635591648800108615
120
120
  requirements: []
121
121
  rubyforge_project:
122
122
  rubygems_version: 1.8.24