vagrant-omnibus 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +19 -19
- data/.rspec +1 -1
- data/.travis.yml +18 -8
- data/.yardopts +7 -7
- data/CHANGELOG.md +98 -196
- data/Gemfile +28 -23
- data/LICENSE +201 -201
- data/README.md +147 -166
- data/Rakefile +98 -87
- data/TODO.md +5 -5
- data/lib/vagrant-omnibus.rb +31 -31
- data/lib/vagrant-omnibus/action/install_chef.rb +272 -258
- data/lib/vagrant-omnibus/config.rb +104 -128
- data/lib/vagrant-omnibus/plugin.rb +78 -55
- data/lib/vagrant-omnibus/version.rb +22 -22
- data/locales/en.yml +11 -8
- data/test/acceptance/aws/Vagrantfile +29 -29
- data/test/acceptance/digital_ocean/Vagrantfile +24 -24
- data/test/acceptance/rackspace/Vagrantfile +28 -28
- data/test/acceptance/virtualbox/Vagrantfile +93 -95
- data/test/acceptance/vmware_fusion/Vagrantfile +1 -95
- data/test/support/cookbooks/chef-inator/README.md +13 -13
- data/test/support/cookbooks/chef-inator/metadata.rb +7 -7
- data/test/support/cookbooks/chef-inator/recipes/default.rb +2 -2
- data/test/unit/spec_helper.rb +23 -25
- data/test/unit/vagrant-omnibus/config_spec.rb +121 -101
- data/test/unit/vagrant-omnibus/plugin_spec.rb +83 -0
- data/vagrant-omnibus.gemspec +27 -27
- metadata +28 -29
- data/.rubocop.yml +0 -10
- data/.ruby-version +0 -1
@@ -1,24 +1,24 @@
|
|
1
|
-
Vagrant.require_plugin(
|
2
|
-
Vagrant.require_plugin(
|
3
|
-
|
4
|
-
Vagrant.configure(
|
5
|
-
config.omnibus.chef_version = :latest
|
6
|
-
|
7
|
-
config.vm.box =
|
8
|
-
config.vm.synced_folder
|
9
|
-
|
10
|
-
config.vm.provider :digital_ocean do |provider, override|
|
11
|
-
provider.client_id = ENV[
|
12
|
-
provider.api_key = ENV[
|
13
|
-
provider.region =
|
14
|
-
provider.size =
|
15
|
-
provider.image =
|
16
|
-
override.ssh.private_key_path =
|
17
|
-
end
|
18
|
-
|
19
|
-
config.vm.provision :chef_solo do |chef|
|
20
|
-
chef.cookbooks_path =
|
21
|
-
File.expand_path(
|
22
|
-
chef.add_recipe
|
23
|
-
end
|
24
|
-
end
|
1
|
+
Vagrant.require_plugin("vagrant-omnibus")
|
2
|
+
Vagrant.require_plugin("vagrant-digitalocean")
|
3
|
+
|
4
|
+
Vagrant.configure("2") do |config|
|
5
|
+
config.omnibus.chef_version = :latest
|
6
|
+
|
7
|
+
config.vm.box = "digital_ocean"
|
8
|
+
config.vm.synced_folder ".", "/vagrant", disabled: true
|
9
|
+
|
10
|
+
config.vm.provider :digital_ocean do |provider, override|
|
11
|
+
provider.client_id = ENV["DO_CLIENT_ID"]
|
12
|
+
provider.api_key = ENV["DO_API_KEY"]
|
13
|
+
provider.region = "New York 1"
|
14
|
+
provider.size = "512MB"
|
15
|
+
provider.image = "Ubuntu 12.04 x64 Server"
|
16
|
+
override.ssh.private_key_path = "~/.ssh/id_rsa"
|
17
|
+
end
|
18
|
+
|
19
|
+
config.vm.provision :chef_solo do |chef|
|
20
|
+
chef.cookbooks_path =
|
21
|
+
File.expand_path("../../../support/cookbooks", __FILE__)
|
22
|
+
chef.add_recipe "chef-inator"
|
23
|
+
end
|
24
|
+
end
|
@@ -1,28 +1,28 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
|
4
|
-
# plugins don't seem to be auto-loaded from the bundle
|
5
|
-
require
|
6
|
-
require
|
7
|
-
|
8
|
-
Vagrant.configure(
|
9
|
-
config.omnibus.chef_version =
|
10
|
-
|
11
|
-
config.vm.box =
|
12
|
-
config.vm.provider :rackspace do |rackspace|
|
13
|
-
rackspace.username = ENV[
|
14
|
-
rackspace.api_key = ENV[
|
15
|
-
rackspace.flavor = /512MB/
|
16
|
-
rackspace.image = /Ubuntu 12.04/
|
17
|
-
rackspace.public_key_path =
|
18
|
-
# TODO: switch this to the `override.ssh.private_key_path` syntax once
|
19
|
-
# `vagrant-rackspace` is updated.
|
20
|
-
config.ssh.private_key_path =
|
21
|
-
end
|
22
|
-
|
23
|
-
config.vm.provision :chef_solo do |chef|
|
24
|
-
chef.cookbooks_path =
|
25
|
-
File.expand_path(
|
26
|
-
chef.add_recipe
|
27
|
-
end
|
28
|
-
end
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# plugins don't seem to be auto-loaded from the bundle
|
5
|
+
require "vagrant-omnibus"
|
6
|
+
require "vagrant-rackspace"
|
7
|
+
|
8
|
+
Vagrant.configure("2") do |config|
|
9
|
+
config.omnibus.chef_version = "11.4.0"
|
10
|
+
|
11
|
+
config.vm.box = "dummy"
|
12
|
+
config.vm.provider :rackspace do |rackspace|
|
13
|
+
rackspace.username = ENV["DEV_RACKSPACE_USERNAME"]
|
14
|
+
rackspace.api_key = ENV["DEV_RACKSPACE_API_KEY"]
|
15
|
+
rackspace.flavor = /512MB/
|
16
|
+
rackspace.image = /Ubuntu 12.04/
|
17
|
+
rackspace.public_key_path = "~/.ssh/id_rsa.pub"
|
18
|
+
# TODO: switch this to the `override.ssh.private_key_path` syntax once
|
19
|
+
# `vagrant-rackspace` is updated.
|
20
|
+
config.ssh.private_key_path = "~/.ssh/id_rsa"
|
21
|
+
end
|
22
|
+
|
23
|
+
config.vm.provision :chef_solo do |chef|
|
24
|
+
chef.cookbooks_path =
|
25
|
+
File.expand_path("../../../support/cookbooks", __FILE__)
|
26
|
+
chef.add_recipe "chef-inator"
|
27
|
+
end
|
28
|
+
end
|
@@ -1,95 +1,93 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
|
4
|
-
# rubocop:disable LineLength
|
5
|
-
|
6
|
-
# plugins don't seem to be auto-loaded from the bundle
|
7
|
-
require
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
base_dir
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
new_chef_config.vm.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
chef.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
old_chef_config.vm.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
chef.
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
installed_config.vm.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
chef.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
#
|
65
|
-
|
66
|
-
|
67
|
-
win_config.
|
68
|
-
|
69
|
-
win_config.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
c.
|
79
|
-
|
80
|
-
c.
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
#
|
85
|
-
|
86
|
-
|
87
|
-
c.
|
88
|
-
|
89
|
-
|
90
|
-
chef.
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
end
|
95
|
-
end
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# rubocop:disable LineLength
|
5
|
+
|
6
|
+
# plugins don't seem to be auto-loaded from the bundle
|
7
|
+
require "vagrant-omnibus"
|
8
|
+
|
9
|
+
def box_type
|
10
|
+
@box_type ||= begin
|
11
|
+
# Returns `/Users/schisamo/dev/code/schisamo/vagrant-omnibus/test/acceptance/vmware_fusion`
|
12
|
+
full_dir = File.dirname(File.expand_path(__FILE__))
|
13
|
+
# Returns `vmware_fusion`
|
14
|
+
base_dir = full_dir.split("/").last
|
15
|
+
base_dir.split("_").first
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
Vagrant.configure("2") do |config|
|
20
|
+
|
21
|
+
config.vm.define :new_chef do |new_chef_config|
|
22
|
+
new_chef_config.vm.box = "opscode-ubuntu-12.04"
|
23
|
+
new_chef_config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_ubuntu-12.04_chef-provisionerless.box"
|
24
|
+
|
25
|
+
new_chef_config.omnibus.chef_version = :latest
|
26
|
+
|
27
|
+
new_chef_config.vm.provision :chef_solo do |chef|
|
28
|
+
chef.cookbooks_path = File.expand_path("../../../support/cookbooks", __FILE__)
|
29
|
+
chef.add_recipe "chef-inator"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
config.vm.define :old_chef do |old_chef_config|
|
34
|
+
old_chef_config.vm.box = "opscode-centos-6.5"
|
35
|
+
old_chef_config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_centos-6.5_chef-provisionerless.box"
|
36
|
+
|
37
|
+
old_chef_config.omnibus.chef_version = "10.24.0"
|
38
|
+
|
39
|
+
old_chef_config.vm.provision :chef_solo do |chef|
|
40
|
+
chef.cookbooks_path = File.expand_path("../../../support/cookbooks", __FILE__)
|
41
|
+
chef.add_recipe "chef-inator"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# We don't have legacy VMware boxes
|
46
|
+
unless box_type == "vmware"
|
47
|
+
config.vm.define :chef_already_installed do |installed_config|
|
48
|
+
installed_config.vm.box = "opscode-ubuntu-12.04-chef-11.4.4"
|
49
|
+
installed_config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.4.box"
|
50
|
+
|
51
|
+
installed_config.omnibus.chef_version = "11.4.4"
|
52
|
+
|
53
|
+
installed_config.vm.provision :chef_solo do |chef|
|
54
|
+
chef.cookbooks_path = File.expand_path("../../../support/cookbooks", __FILE__)
|
55
|
+
chef.add_recipe "chef-inator"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
config.vm.define :chef_on_windows do |win_config|
|
61
|
+
# win_config.vm.guest = :windows
|
62
|
+
win_config.vm.box = "win7x64-pro"
|
63
|
+
# build this yourself https://github.com/misheska/basebox-packer
|
64
|
+
# win_config.vm.box_url = ''
|
65
|
+
win_config.vm.boot_timeout = 500
|
66
|
+
|
67
|
+
win_config.omnibus.chef_version = :latest
|
68
|
+
|
69
|
+
win_config.vm.provision :chef_solo do |chef|
|
70
|
+
chef.cookbooks_path = File.expand_path("../../../support/cookbooks", __FILE__)
|
71
|
+
chef.add_recipe "chef-inator"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
config.vm.define :no_bash do |c|
|
76
|
+
c.vm.box = "opscode-freebsd-9.2"
|
77
|
+
c.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_freebsd-9.2_chef-provisionerless.box"
|
78
|
+
c.omnibus.chef_version = :latest
|
79
|
+
|
80
|
+
c.vm.synced_folder ".", "/vagrant", type: "rsync", id: "vagrant-root"
|
81
|
+
|
82
|
+
# This forces all remote commands to execute under `sh`. If we don't
|
83
|
+
# add this config then all `chef` related commands will execute
|
84
|
+
# with `bash` (which might not be installed).
|
85
|
+
c.ssh.shell = "sh"
|
86
|
+
|
87
|
+
c.vm.provision :chef_solo do |chef|
|
88
|
+
chef.synced_folder_type = "rsync"
|
89
|
+
chef.cookbooks_path = File.expand_path("../../../support/cookbooks", __FILE__)
|
90
|
+
chef.add_recipe "chef-inator"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -1,95 +1 @@
|
|
1
|
-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
|
4
|
-
# rubocop:disable LineLength
|
5
|
-
|
6
|
-
# plugins don't seem to be auto-loaded from the bundle
|
7
|
-
require 'vagrant-omnibus'
|
8
|
-
require 'vagrant-windows'
|
9
|
-
|
10
|
-
def box_type
|
11
|
-
@box_type ||= begin
|
12
|
-
# Returns `/Users/schisamo/dev/code/schisamo/vagrant-omnibus/test/acceptance/vmware_fusion`
|
13
|
-
full_dir = File.dirname(File.expand_path(__FILE__))
|
14
|
-
# Returns `vmware_fusion`
|
15
|
-
base_dir = full_dir.split('/').last
|
16
|
-
base_dir.split('_').first
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
Vagrant.configure('2') do |config|
|
21
|
-
|
22
|
-
config.vm.define :new_chef do |new_chef_config|
|
23
|
-
new_chef_config.vm.box = 'opscode-ubuntu-12.04'
|
24
|
-
new_chef_config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_ubuntu-12.04_chef-provisionerless.box'
|
25
|
-
|
26
|
-
new_chef_config.omnibus.chef_version = :latest
|
27
|
-
|
28
|
-
new_chef_config.vm.provision :chef_solo do |chef|
|
29
|
-
chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
|
30
|
-
chef.add_recipe 'chef-inator'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
config.vm.define :old_chef do |old_chef_config|
|
35
|
-
old_chef_config.vm.box = 'opscode-centos-6.5'
|
36
|
-
old_chef_config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_centos-6.5_chef-provisionerless.box'
|
37
|
-
|
38
|
-
old_chef_config.omnibus.chef_version = '10.24.0'
|
39
|
-
|
40
|
-
old_chef_config.vm.provision :chef_solo do |chef|
|
41
|
-
chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
|
42
|
-
chef.add_recipe 'chef-inator'
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# We don't have legacy VMware boxes
|
47
|
-
unless box_type == 'vmware'
|
48
|
-
config.vm.define :chef_already_installed do |installed_config|
|
49
|
-
installed_config.vm.box = 'opscode-ubuntu-12.04-chef-11.4.4'
|
50
|
-
installed_config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.4.box'
|
51
|
-
|
52
|
-
installed_config.omnibus.chef_version = '11.4.4'
|
53
|
-
|
54
|
-
installed_config.vm.provision :chef_solo do |chef|
|
55
|
-
chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
|
56
|
-
chef.add_recipe 'chef-inator'
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
config.vm.define :chef_on_windows do |win_config|
|
62
|
-
# win_config.vm.guest = :windows
|
63
|
-
win_config.vm.box = 'win7x64-pro'
|
64
|
-
# build this yourself https://github.com/misheska/basebox-packer
|
65
|
-
# win_config.vm.box_url = ''
|
66
|
-
win_config.vm.boot_timeout = 500
|
67
|
-
win_config.winrm.timeout = 500
|
68
|
-
|
69
|
-
win_config.omnibus.chef_version = :latest
|
70
|
-
|
71
|
-
win_config.vm.provision :chef_solo do |chef|
|
72
|
-
chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
|
73
|
-
chef.add_recipe 'chef-inator'
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
config.vm.define :no_bash do |c|
|
78
|
-
c.vm.box = 'opscode-freebsd-9.2'
|
79
|
-
c.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_freebsd-9.2_chef-provisionerless.box'
|
80
|
-
c.omnibus.chef_version = :latest
|
81
|
-
|
82
|
-
c.vm.synced_folder '.', '/vagrant', type: 'rsync', id: 'vagrant-root'
|
83
|
-
|
84
|
-
# This forces all remote commands to execute under `sh`. If we don't
|
85
|
-
# add this config then all `chef` related commands will execute
|
86
|
-
# with `bash` (which might not be installed).
|
87
|
-
c.ssh.shell = 'sh'
|
88
|
-
|
89
|
-
c.vm.provision :chef_solo do |chef|
|
90
|
-
chef.synced_folder_type = 'rsync'
|
91
|
-
chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
|
92
|
-
chef.add_recipe 'chef-inator'
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
1
|
+
../virtualbox/Vagrantfile
|
@@ -1,13 +1,13 @@
|
|
1
|
-
# super-tester cookbook
|
2
|
-
|
3
|
-
# Requirements
|
4
|
-
|
5
|
-
# Usage
|
6
|
-
|
7
|
-
# Attributes
|
8
|
-
|
9
|
-
# Recipes
|
10
|
-
|
11
|
-
# Author
|
12
|
-
|
13
|
-
Author:: YOUR_NAME (<YOUR_EMAIL>)
|
1
|
+
# super-tester cookbook
|
2
|
+
|
3
|
+
# Requirements
|
4
|
+
|
5
|
+
# Usage
|
6
|
+
|
7
|
+
# Attributes
|
8
|
+
|
9
|
+
# Recipes
|
10
|
+
|
11
|
+
# Author
|
12
|
+
|
13
|
+
Author:: YOUR_NAME (<YOUR_EMAIL>)
|
@@ -1,7 +1,7 @@
|
|
1
|
-
name
|
2
|
-
maintainer
|
3
|
-
maintainer_email
|
4
|
-
license
|
5
|
-
description
|
6
|
-
long_description IO.read(File.join(File.dirname(__FILE__),
|
7
|
-
version
|
1
|
+
name "chef-inator"
|
2
|
+
maintainer "Dr. Heinz Doofenshmirtz"
|
3
|
+
maintainer_email "heinz@doofenshmirtz-evil-inc.com"
|
4
|
+
license "All rights reserved"
|
5
|
+
description "Uses Chef to take over the Tri-State Area!"
|
6
|
+
long_description IO.read(File.join(File.dirname(__FILE__), "README.md"))
|
7
|
+
version "0.1.0"
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
Chef::Log.info
|
1
|
+
|
2
|
+
Chef::Log.info "CURSE YOU...Perry the Platypus!!!!"
|
data/test/unit/spec_helper.rb
CHANGED
@@ -1,25 +1,23 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path(
|
2
|
-
|
3
|
-
require
|
4
|
-
require
|
5
|
-
|
6
|
-
RSpec.configure do |config|
|
7
|
-
config.formatter = :documentation
|
8
|
-
|
9
|
-
# a little syntactic sugar
|
10
|
-
config.alias_it_should_behave_like_to :it_has_behavior,
|
11
|
-
|
12
|
-
# Use color in STDOUT
|
13
|
-
config.
|
14
|
-
|
15
|
-
# Use color not only in STDOUT but also in pagers and files
|
16
|
-
config.tty = true
|
17
|
-
|
18
|
-
# run the examples in random order
|
19
|
-
config.order = :rand
|
20
|
-
|
21
|
-
|
22
|
-
config.
|
23
|
-
|
24
|
-
config.run_all_when_everything_filtered = true
|
25
|
-
end
|
1
|
+
$LOAD_PATH.unshift File.expand_path("../../../lib", __FILE__)
|
2
|
+
|
3
|
+
require "rspec/core"
|
4
|
+
require "vagrant-omnibus"
|
5
|
+
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.formatter = :documentation
|
8
|
+
|
9
|
+
# a little syntactic sugar
|
10
|
+
config.alias_it_should_behave_like_to :it_has_behavior, "has behavior:"
|
11
|
+
|
12
|
+
# Use color in STDOUT
|
13
|
+
config.color = true
|
14
|
+
|
15
|
+
# Use color not only in STDOUT but also in pagers and files
|
16
|
+
config.tty = true
|
17
|
+
|
18
|
+
# run the examples in random order
|
19
|
+
config.order = :rand
|
20
|
+
|
21
|
+
config.filter_run focus: true
|
22
|
+
config.run_all_when_everything_filtered = true
|
23
|
+
end
|