vagrant-omnibus 1.4.1 → 1.5.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/README.md CHANGED
@@ -1,166 +1,147 @@
1
- # vagrant-omnibus
2
-
3
- [![Gem Version](https://badge.fury.io/rb/vagrant-omnibus.png)](https://rubygems.org/gems/vagrant-omnibus)
4
- [![Build Status](https://travis-ci.org/schisamo/vagrant-omnibus.png?branch=master)](https://travis-ci.org/schisamo/vagrant-omnibus)
5
- [![Dependency Status](https://gemnasium.com/schisamo/vagrant-omnibus.png)](https://gemnasium.com/schisamo/vagrant-omnibus)
6
- [![Code Climate](https://codeclimate.com/github/schisamo/vagrant-omnibus.png)](https://codeclimate.com/github/schisamo/vagrant-omnibus)
7
-
8
- A Vagrant plugin that ensures the desired version of Chef is installed via the
9
- platform-specific Omnibus packages. This proves very useful when using Vagrant
10
- with provisioner-less baseboxes OR cloud images.
11
-
12
- The plugin should work correctly with most all providers that hook into
13
- `Vagrant::Action::Builtin::Provision` for provisioning and is
14
- known to work with the following
15
- [Vagrant providers](http://docs.vagrantup.com/v2/providers/index.html):
16
-
17
- * VirtualBox (part of core)
18
- * AWS (ships in [vagrant-aws](https://github.com/mitchellh/vagrant-aws) plugin)
19
- * Rackspace (ships in [vagrant-rackspace](https://github.com/mitchellh/vagrant-rackspace)
20
- plugin)
21
- * VMWare Fusion (can be [purchased from Hashicorp](http://www.vagrantup.com/vmware))
22
- * LXC (ships in [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc))
23
- * OpenStack (ships in [vagrant-openstack-plugin](https://github.com/cloudbau/vagrant-openstack-plugin))
24
- * Digital Ocean (ships in [vagrant-digitalocean](https://github.com/smdahlen/vagrant-digitalocean))
25
- * Parallels Desktop (ships in [vagrant-parallels](https://github.com/yshahin/vagrant-parallels))
26
-
27
- ## Installation
28
-
29
- Ensure you have downloaded and installed Vagrant 1.1 or newer from the
30
- [Vagrant downloads page](http://downloads.vagrantup.com/).
31
-
32
- Installation is performed in the prescribed manner for Vagrant 1.1 plugins.
33
-
34
- ```
35
- $ vagrant plugin install vagrant-omnibus
36
- ```
37
-
38
- ## Usage
39
-
40
- The Omnibus Vagrant plugin automatically hooks into the Vagrant provisioning
41
- middleware. You specify the version of the Chef Omnibus package you want
42
- installed using the `omnibus.chef_version` config key. The version string
43
- should be a valid Chef release version or `:latest`.
44
-
45
- Install the latest version of Chef:
46
-
47
- ```ruby
48
- Vagrant.configure("2") do |config|
49
-
50
- config.omnibus.chef_version = :latest
51
-
52
- ...
53
-
54
- end
55
- ```
56
-
57
- Install a specific version of Chef:
58
-
59
- ```ruby
60
- Vagrant.configure("2") do |config|
61
-
62
- config.omnibus.chef_version = "11.4.0"
63
-
64
- ...
65
-
66
- end
67
- ```
68
-
69
- Specify a custom install script:
70
-
71
- ```ruby
72
- Vagrant.configure("2") do |config|
73
-
74
- config.omnibus.install_url = 'http://acme.com/install.sh'
75
- # config.omnibus.install_url = 'http://acme.com/install.msi'
76
- # config.omnibus.install_url = '/some/path/on/the/host'
77
-
78
- ...
79
-
80
- end
81
- ```
82
-
83
- If [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier) is present
84
- and `config.cache.auto_detect` enabled the downloaded omnibus packages will
85
- be cached by vagrant-cachier. In case you want to turn caching off:
86
-
87
- ```ruby
88
- Vagrant.configure("2") do |config|
89
-
90
- config.omnibus.cache_packages = false
91
-
92
- ...
93
-
94
- end
95
- ```
96
-
97
- This plugin is also multi-vm aware so it would possible to say install a
98
- different version of Chef on each VM:
99
-
100
- ```ruby
101
- Vagrant.configure("2") do |config|
102
-
103
- config.vm.define :new_chef do |new_chef_config|
104
-
105
- ...
106
-
107
- new_chef_config.omnibus.chef_version = :latest
108
-
109
- ...
110
-
111
- end
112
-
113
- config.vm.define :old_chef do |old_chef_config|
114
-
115
- ...
116
-
117
- old_chef_config.omnibus.chef_version = "10.24.0"
118
-
119
- ...
120
-
121
- end
122
- end
123
-
124
- ```
125
-
126
- ## Tests
127
-
128
- ### Unit
129
-
130
- The unit tests can be run with:
131
-
132
- ```
133
- rake test:unit
134
- ```
135
-
136
- The test are also executed by Travis CI every time code is pushed to GitHub.
137
-
138
- ### Acceptance
139
-
140
- Currently this repo ships with a set of basic acceptance tests that will:
141
-
142
- * Provision a Vagrant instance.
143
- * Attempt to install Chef using this plugin.
144
- * Perform a very basic chef-solo run to ensure Chef is in fact installed.
145
-
146
- The acceptance tests can be run against a subset of the Vagrant providers
147
- listed above. The acceptance tests can be run with:
148
-
149
- ```
150
- rake test:acceptance:PROVIDER_NAME
151
- ```
152
-
153
- And as expected, all acceptance tests only uses provisioner-less baseboxes and
154
- cloud images!
155
-
156
- ## Contributing
157
-
158
- 1. Fork it
159
- 2. Create your feature branch (`git checkout -b my-new-feature`)
160
- 3. Commit your changes (`git commit -am 'Add some feature'`)
161
- 4. Push to the branch (`git push origin my-new-feature`)
162
- 5. Create new Pull Request
163
-
164
- ## Authors
165
-
166
- Seth Chisamore (schisamo@opscode.com)
1
+ # vagrant-omnibus
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/vagrant-omnibus.svg)](https://rubygems.org/gems/vagrant-omnibus) [![Build Status](https://travis-ci.org/chef/vagrant-omnibus.svg?branch=master)](https://travis-ci.org/chef/vagrant-omnibus) [![Dependency Status](https://gemnasium.com/chef/vagrant-omnibus.svg)](https://gemnasium.com/chef/vagrant-omnibus) [![Code Climate](https://codeclimate.com/github/chef/vagrant-omnibus.svg)](https://codeclimate.com/github/chef/vagrant-omnibus)
4
+
5
+ A Vagrant plugin that ensures the desired version of Chef is installed via the platform-specific Omnibus packages. This proves very useful when using Vagrant with provisioner-less baseboxes OR cloud images.
6
+
7
+ The plugin should work correctly with most all providers that hook into `Vagrant::Action::Builtin::Provision` for provisioning and is known to work with the following [Vagrant providers](https://www.vagrantup.com/docs/providers/index.html):
8
+
9
+ - VirtualBox (part of core)
10
+ - AWS (ships in [vagrant-aws](https://github.com/mitchellh/vagrant-aws) plugin)
11
+ - Rackspace (ships in [vagrant-rackspace](https://github.com/mitchellh/vagrant-rackspace) plugin)
12
+ - VMWare Fusion (can be [purchased from Hashicorp](https://www.vagrantup.com/vmware/))
13
+ - LXC (ships in [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc))
14
+ - OpenStack (ships in [vagrant-openstack-plugin](https://github.com/cloudbau/vagrant-openstack-plugin))
15
+ - Digital Ocean (ships in [vagrant-digitalocean](https://github.com/smdahlen/vagrant-digitalocean))
16
+ - Parallels Desktop (ships in [vagrant-parallels](https://github.com/yshahin/vagrant-parallels))
17
+
18
+ ## Installation
19
+
20
+ Ensure you have downloaded and installed Vagrant 1.1 or newer from the [Vagrant downloads page](https://www.vagrantup.com/downloads.html). If you require Windows support then Vagrant 1.6.1 or newer is needed.
21
+
22
+ Installation is performed in the prescribed manner for Vagrant 1.1 plugins.
23
+
24
+ ```
25
+ $ vagrant plugin install vagrant-omnibus
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ The Omnibus Vagrant plugin automatically hooks into the Vagrant provisioning middleware. You specify the version of the Chef Omnibus package you want installed using the `omnibus.chef_version` config key. The version string should be a valid Chef release version or `:latest`.
31
+
32
+ Install the latest version of Chef:
33
+
34
+ ```ruby
35
+ Vagrant.configure("2") do |config|
36
+
37
+ config.omnibus.chef_version = :latest
38
+
39
+ ...
40
+
41
+ end
42
+ ```
43
+
44
+ Install a specific version of Chef:
45
+
46
+ ```ruby
47
+ Vagrant.configure("2") do |config|
48
+
49
+ config.omnibus.chef_version = "11.4.0"
50
+
51
+ ...
52
+
53
+ end
54
+ ```
55
+
56
+ Specify a custom install script:
57
+
58
+ ```ruby
59
+ Vagrant.configure("2") do |config|
60
+
61
+ config.omnibus.install_url = 'http://acme.com/install.sh'
62
+ # config.omnibus.install_url = 'http://acme.com/install.msi'
63
+ # config.omnibus.install_url = '/some/path/on/the/host'
64
+
65
+ ...
66
+
67
+ end
68
+ ```
69
+
70
+ If [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier) is present and `config.cache.auto_detect` enabled the downloaded omnibus packages will be cached by vagrant-cachier. In case you want to turn caching off:
71
+
72
+ ```ruby
73
+ Vagrant.configure("2") do |config|
74
+
75
+ config.omnibus.cache_packages = false
76
+
77
+ ...
78
+
79
+ end
80
+ ```
81
+
82
+ This plugin is also multi-vm aware so it would possible to say install a different version of Chef on each VM:
83
+
84
+ ```ruby
85
+ Vagrant.configure("2") do |config|
86
+
87
+ config.vm.define :new_chef do |new_chef_config|
88
+
89
+ ...
90
+
91
+ new_chef_config.omnibus.chef_version = :latest
92
+
93
+ ...
94
+
95
+ end
96
+
97
+ config.vm.define :old_chef do |old_chef_config|
98
+
99
+ ...
100
+
101
+ old_chef_config.omnibus.chef_version = "10.24.0"
102
+
103
+ ...
104
+
105
+ end
106
+ end
107
+ ```
108
+
109
+ ## Tests
110
+
111
+ ### Unit
112
+
113
+ The unit tests can be run with:
114
+
115
+ ```
116
+ rake test:unit
117
+ ```
118
+
119
+ The test are also executed by Travis CI every time code is pushed to GitHub.
120
+
121
+ ### Acceptance
122
+
123
+ Currently this repo ships with a set of basic acceptance tests that will:
124
+
125
+ - Provision a Vagrant instance.
126
+ - Attempt to install Chef using this plugin.
127
+ - Perform a very basic chef-solo run to ensure Chef is in fact installed.
128
+
129
+ The acceptance tests can be run against a subset of the Vagrant providers listed above. The acceptance tests can be run with:
130
+
131
+ ```
132
+ rake test:acceptance:PROVIDER_NAME
133
+ ```
134
+
135
+ And as expected, all acceptance tests only uses provisioner-less baseboxes and cloud images!
136
+
137
+ ## Contributing
138
+
139
+ 1. Fork it
140
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
141
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
142
+ 4. Push to the branch (`git push origin my-new-feature`)
143
+ 5. Create new Pull Request
144
+
145
+ ## Authors
146
+
147
+ Seth Chisamore (schisamo@chef.io)
data/Rakefile CHANGED
@@ -1,87 +1,98 @@
1
- require 'bundler/setup'
2
- require 'bundler/gem_tasks'
3
- require 'rspec/core/rake_task'
4
- require 'rubocop/rake_task'
5
- require 'yard'
6
-
7
- # rubocop:disable LineLength
8
-
9
- def run_acceptance_tests(provider = 'virtualbox')
10
- puts '=================================================================='
11
- puts "Running acceptance tests against '#{provider}' provider..."
12
- puts '=================================================================='
13
-
14
- Dir.chdir("test/acceptance/#{provider}") do
15
- system('vagrant destroy -f')
16
- system("vagrant up --provider=#{provider}")
17
- system('vagrant destroy -f')
18
- end
19
- end
20
-
21
- YARD::Rake::YardocTask.new
22
-
23
- namespace :style do
24
- require 'rubocop/rake_task'
25
- desc 'Run Ruby style checks'
26
- Rubocop::RakeTask.new(:ruby) do |task|
27
- task.patterns = [
28
- '**/*.rb',
29
- '**/Vagrantfile',
30
- '*.gemspec',
31
- 'Gemfile',
32
- 'Rakefile'
33
- ]
34
- end
35
- end
36
-
37
- namespace :test do
38
-
39
- RSpec::Core::RakeTask.new(:unit) do |t|
40
- t.pattern = 'test/unit/**/*_spec.rb'
41
- end
42
-
43
- namespace :acceptance do
44
- desc 'Run acceptance tests with AWS provider'
45
- task :aws do
46
- unless system("vagrant box list | grep 'dummy\s*(aws)' &>/dev/null")
47
- system('vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box')
48
- end
49
- run_acceptance_tests('aws')
50
- end
51
-
52
- desc 'Run acceptance tests with Digital Ocean provider'
53
- task 'digital_ocean' do
54
- unless system("vagrant box list | grep 'digital_ocean' &>/dev/null")
55
- system('vagrant box add digital_ocean https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box')
56
- end
57
- run_acceptance_tests('digital_ocean')
58
- end
59
-
60
- desc 'Run acceptance tests with Rackspace provider'
61
- task :rackspace do
62
- unless system("vagrant box list | grep 'dummy\s*(rackspace)' &>/dev/null")
63
- system('vagrant box add dummy https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box')
64
- end
65
- run_acceptance_tests('rackspace')
66
- end
67
-
68
- desc 'Run acceptance tests with VirtualBox provider'
69
- task :virtualbox do
70
- run_acceptance_tests('virtualbox')
71
- end
72
-
73
- desc 'Run acceptance tests with VMware provider'
74
- task :vmware_fusion do
75
- run_acceptance_tests('vmware_fusion')
76
- end
77
- end
78
- end
79
-
80
- # We cannot run Test Kitchen on Travis CI yet...
81
- namespace :travis do
82
- desc 'Run tests on Travis'
83
- task ci: ['style:ruby', 'test:unit']
84
- end
85
-
86
- # The default rake task should just run it all
87
- task default: ['style:ruby', 'test:unit', 'test:acceptance:virtualbox']
1
+ require "bundler/setup"
2
+ require "bundler/gem_tasks"
3
+ require "rspec/core/rake_task"
4
+ require "chefstyle"
5
+ require "rubocop/rake_task"
6
+ require "yard"
7
+
8
+ # rubocop:disable LineLength
9
+
10
+ def run_acceptance_tests(provider = "virtualbox")
11
+ puts "=================================================================="
12
+ puts "Running acceptance tests against '#{provider}' provider..."
13
+ puts "=================================================================="
14
+
15
+ Dir.chdir("test/acceptance/#{provider}") do
16
+ system("vagrant destroy -f")
17
+ system("vagrant up --provider=#{provider}")
18
+ system("vagrant destroy -f")
19
+ end
20
+ end
21
+
22
+ YARD::Rake::YardocTask.new
23
+
24
+ namespace :style do
25
+ desc "Run Ruby style checks"
26
+ RuboCop::RakeTask.new(:ruby) do |task|
27
+ task.patterns = [
28
+ "**/*.rb",
29
+ "**/Vagrantfile",
30
+ "*.gemspec",
31
+ "Gemfile",
32
+ "Rakefile",
33
+ ]
34
+ end
35
+ end
36
+
37
+ namespace :test do
38
+
39
+ RSpec::Core::RakeTask.new(:unit) do |t|
40
+ t.pattern = "test/unit/**/*_spec.rb"
41
+ end
42
+
43
+ namespace :acceptance do
44
+ desc "Run acceptance tests with AWS provider"
45
+ task :aws do
46
+ unless system("vagrant box list | grep 'dummy\s*(aws)' &>/dev/null")
47
+ system("vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box")
48
+ end
49
+ run_acceptance_tests("aws")
50
+ end
51
+
52
+ desc "Run acceptance tests with Digital Ocean provider"
53
+ task "digital_ocean" do
54
+ unless system("vagrant box list | grep 'digital_ocean' &>/dev/null")
55
+ system("vagrant box add digital_ocean https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box")
56
+ end
57
+ run_acceptance_tests("digital_ocean")
58
+ end
59
+
60
+ desc "Run acceptance tests with Rackspace provider"
61
+ task :rackspace do
62
+ unless system("vagrant box list | grep 'dummy\s*(rackspace)' &>/dev/null")
63
+ system("vagrant box add dummy https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box")
64
+ end
65
+ run_acceptance_tests("rackspace")
66
+ end
67
+
68
+ desc "Run acceptance tests with VirtualBox provider"
69
+ task :virtualbox do
70
+ run_acceptance_tests("virtualbox")
71
+ end
72
+
73
+ desc "Run acceptance tests with VMware provider"
74
+ task :vmware_fusion do
75
+ run_acceptance_tests("vmware_fusion")
76
+ end
77
+ end
78
+ end
79
+
80
+ # We cannot run Test Kitchen on Travis CI yet...
81
+ namespace :travis do
82
+ desc "Run tests on Travis"
83
+ task ci: ["style:ruby", "test:unit"]
84
+ end
85
+
86
+ require "vagrant-omnibus/version"
87
+ require "github_changelog_generator/task"
88
+
89
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
90
+ config.issues = false
91
+ config.future_release = VagrantPlugins::Omnibus::VERSION
92
+ config.enhancement_labels = "enhancement,Enhancement,New Feature".split(",")
93
+ config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",")
94
+ config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog".split(",")
95
+ end
96
+
97
+ # The default rake task should just run it all
98
+ task default: ["style:ruby", "test:unit", "test:acceptance:virtualbox"]