vagrantup 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +13 -6
- data/CHANGELOG.md +11 -1
- data/config/default.rb +1 -0
- data/lib/vagrant/config/vagrant.rb +1 -0
- data/lib/vagrant/config/vm.rb +15 -7
- data/lib/vagrant/provisioners/chef_solo.rb +4 -6
- data/lib/vagrant/provisioners/puppet.rb +1 -1
- data/lib/vagrant/ssh.rb +16 -2
- data/lib/vagrant/version.rb +1 -1
- data/templates/locales/en.yml +4 -25
- data/test/vagrant/action/vm/network_test.rb +1 -1
- data/test/vagrant/config/vm_test.rb +0 -8
- data/test/vagrant/environment_test.rb +2 -2
- data/test/vagrant/provisioners/chef_solo_test.rb +9 -1
- data/test/vagrant/provisioners/puppet_test.rb +4 -4
- data/test/vagrant/ssh_test.rb +1 -1
- data/vagrant.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 085393375dc634a77d9c329deebcdf36d0a3e282
|
4
|
+
data.tar.gz: b28a86d3c35ec8231ac5056519e13f1636d2fda7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a03a96a69c7617d099f7e1adf23d5a0521b481aa9486a6d0e36b4f3b7f2fe37f96dc29b8781fbe4ce3463a1b0a863242f54b138ad64030e29f64cb3690244c03
|
7
|
+
data.tar.gz: 32cec7851590cb931bd8e8f60ec47626701f3a0ea5e640c40546a25065be1ddf7a11d27a30755064349194771c9cc68a18df8ac504b75038b5b1b5cccbdec8e7
|
data/.gitignore
CHANGED
@@ -1,15 +1,22 @@
|
|
1
|
+
# OS-specific
|
1
2
|
.DS_Store
|
2
|
-
|
3
|
+
|
4
|
+
# Vagrant stuff
|
3
5
|
Vagrantfile
|
4
6
|
.vagrant
|
7
|
+
|
8
|
+
# Bundler/Rubygems
|
5
9
|
.bundle
|
6
|
-
|
10
|
+
pkg/*
|
11
|
+
tags
|
12
|
+
Gemfile.lock
|
13
|
+
test/tmp/
|
14
|
+
|
15
|
+
# Documentation
|
7
16
|
_site/*
|
8
|
-
!templates/*
|
9
|
-
*.org
|
10
17
|
.yardoc/
|
11
18
|
doc/
|
12
|
-
|
13
|
-
|
19
|
+
|
20
|
+
# IDE junk
|
14
21
|
.idea/*
|
15
22
|
*.iml
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
## 0.8.
|
1
|
+
## 0.8.2 (July 22, 2011)
|
2
|
+
|
3
|
+
- Fix issue with SSH disconnects not reconnecting.
|
4
|
+
- Fix chef solo simply not working with roles/data bags. [GH-425]
|
5
|
+
- Multiple chef solo provisioners now work together.
|
6
|
+
- Update Puppet provisioner so no deprecation warning is shown. [GH-421]
|
7
|
+
- Removed error on "provisioner=" in config, as this has not existed
|
8
|
+
for some time now.
|
9
|
+
- Add better validation for networking.
|
10
|
+
|
11
|
+
## 0.8.1 (July 20, 2011)
|
2
12
|
|
3
13
|
- Repush of 0.8.0 to fix a Ruby 1.9.2 RubyGems issue.
|
4
14
|
|
data/config/default.rb
CHANGED
data/lib/vagrant/config/vm.rb
CHANGED
@@ -67,13 +67,6 @@ module Vagrant
|
|
67
67
|
@provisioners << Provisioner.new(top, name, options, &block)
|
68
68
|
end
|
69
69
|
|
70
|
-
# This shows an error message to smooth the transition for the
|
71
|
-
# backwards incompatible provisioner syntax change introduced
|
72
|
-
# in Vagrant 0.7.0.
|
73
|
-
def provisioner=(_value)
|
74
|
-
raise Errors::VagrantError, :_key => :provisioner_equals_not_supported
|
75
|
-
end
|
76
|
-
|
77
70
|
def customize(&block)
|
78
71
|
push_proc(&block)
|
79
72
|
end
|
@@ -126,6 +119,21 @@ module Vagrant
|
|
126
119
|
end
|
127
120
|
end
|
128
121
|
|
122
|
+
# Validate some basic networking
|
123
|
+
network_options.each do |options|
|
124
|
+
next if !options
|
125
|
+
|
126
|
+
ip = options[:ip].split(".")
|
127
|
+
|
128
|
+
if ip.length != 4
|
129
|
+
errors.add(I18n.t("vagrant.config.vm.network_ip_invalid",
|
130
|
+
:ip => options[:ip]))
|
131
|
+
elsif ip.last == "1"
|
132
|
+
errors.add(I18n.t("vagrant.config.vm.network_ip_ends_one",
|
133
|
+
:ip => options[:ip]))
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
129
137
|
# Each provisioner can validate itself
|
130
138
|
provisioners.each do |prov|
|
131
139
|
# TODO: Remove at some point
|
@@ -4,6 +4,8 @@ module Vagrant
|
|
4
4
|
class ChefSolo < Chef
|
5
5
|
register :chef_solo
|
6
6
|
|
7
|
+
extend Util::Counter
|
8
|
+
|
7
9
|
class Config < Chef::Config
|
8
10
|
attr_accessor :cookbooks_path
|
9
11
|
attr_accessor :roles_path
|
@@ -56,7 +58,6 @@ module Vagrant
|
|
56
58
|
# path element which contains the folder location (:host or :vm)
|
57
59
|
paths = [paths] if paths.is_a?(String) || paths.first.is_a?(Symbol)
|
58
60
|
|
59
|
-
index = 0
|
60
61
|
paths.map do |path|
|
61
62
|
path = [:host, path] if !path.is_a?(Array)
|
62
63
|
type, path = path
|
@@ -65,8 +66,7 @@ module Vagrant
|
|
65
66
|
# or VM path.
|
66
67
|
local_path = nil
|
67
68
|
local_path = File.expand_path(path, env.root_path) if type == :host
|
68
|
-
remote_path = type == :host ? "#{config.provisioning_path}/chef-solo-#{
|
69
|
-
index += 1
|
69
|
+
remote_path = type == :host ? "#{config.provisioning_path}/chef-solo-#{self.class.get_and_update_counter}" : path
|
70
70
|
|
71
71
|
# Return the result
|
72
72
|
[type, local_path, remote_path]
|
@@ -76,12 +76,10 @@ module Vagrant
|
|
76
76
|
# Shares the given folders with the given prefix. The folders should
|
77
77
|
# be of the structure resulting from the `expanded_folders` function.
|
78
78
|
def share_folders(prefix, folders)
|
79
|
-
index = 0
|
80
79
|
folders.each do |type, local_path, remote_path|
|
81
80
|
if type == :host
|
82
|
-
env.config.vm.share_folder("v-#{prefix}-#{
|
81
|
+
env.config.vm.share_folder("v-#{prefix}-#{self.class.get_and_update_counter}",
|
83
82
|
remote_path, local_path, :nfs => config.nfs)
|
84
|
-
index += 1
|
85
83
|
end
|
86
84
|
end
|
87
85
|
end
|
@@ -118,7 +118,7 @@ module Vagrant
|
|
118
118
|
options = options.join(" ")
|
119
119
|
|
120
120
|
commands = ["cd #{manifests_guest_path}",
|
121
|
-
"puppet #{options}"]
|
121
|
+
"puppet apply #{options}"]
|
122
122
|
|
123
123
|
env.ui.info I18n.t("vagrant.provisioners.puppet.running_puppet", :manifest => config.computed_manifest_file)
|
124
124
|
|
data/lib/vagrant/ssh.rb
CHANGED
@@ -73,8 +73,22 @@ module Vagrant
|
|
73
73
|
opts[:port] ||= port
|
74
74
|
|
75
75
|
# Check if we have a currently open SSH session which has the
|
76
|
-
# same options, and use that if possible
|
77
|
-
|
76
|
+
# same options, and use that if possible.
|
77
|
+
#
|
78
|
+
# NOTE: This is experimental and unstable. Therefore it is disabled
|
79
|
+
# by default.
|
80
|
+
session, options = nil
|
81
|
+
session, options = @current_session if env.config.vagrant.ssh_session_cache
|
82
|
+
|
83
|
+
if session && options == opts
|
84
|
+
# Verify that the SSH session is still valid
|
85
|
+
begin
|
86
|
+
session.exec!("echo foo")
|
87
|
+
rescue IOError
|
88
|
+
# Reset the session, we need to reconnect
|
89
|
+
session = nil
|
90
|
+
end
|
91
|
+
end
|
78
92
|
|
79
93
|
if !session || options != opts
|
80
94
|
env.logger.info("ssh") { "Connecting to SSH: #{env.config.ssh.host} #{opts[:port]}" }
|
data/lib/vagrant/version.rb
CHANGED
data/templates/locales/en.yml
CHANGED
@@ -48,31 +48,6 @@ en:
|
|
48
48
|
multi_vm_required: "A multi-vm environment is required for name specification to this command."
|
49
49
|
multi_vm_target_required: "`vagrant %{command}` requires a specific VM name to target in a multi-VM environment."
|
50
50
|
no_env: "No Vagrant environment detected. Run `vagrant init` to set one up."
|
51
|
-
provisioner_equals_not_supported: |-
|
52
|
-
The `config.vm.provisioner =` syntax has been removed in Vagrant 0.7.0.
|
53
|
-
Please change your provisioners to use the new syntax described below.
|
54
|
-
All of these changes are reflected on the Vagrant website as well.
|
55
|
-
|
56
|
-
Before:
|
57
|
-
|
58
|
-
config.vm.provisioner = :chef_solo
|
59
|
-
config.chef.cookbooks_path = "my_cookbooks"
|
60
|
-
config.chef.add_recipe "apache"
|
61
|
-
|
62
|
-
After:
|
63
|
-
|
64
|
-
config.vm.provision :chef_solo, :cookbooks_path => "my_cookbooks",
|
65
|
-
:run_list => ["recipe[apache]"]
|
66
|
-
|
67
|
-
Instead of just a hash, you may use a block as well to get access to the
|
68
|
-
configuration object:
|
69
|
-
|
70
|
-
config.vm.provision :chef_solo do |chef|
|
71
|
-
chef.cookbooks_path = "my_cookbooks"
|
72
|
-
chef.add_recipe "apache"
|
73
|
-
end
|
74
|
-
|
75
|
-
This error message will be removed in later versions of Vagrant.
|
76
51
|
ssh_authentication_failed: |-
|
77
52
|
SSH authentication failed! This is typically caused by the public/private
|
78
53
|
keypair for the SSH user not being properly set on the guest VM. Please
|
@@ -190,6 +165,10 @@ en:
|
|
190
165
|
boot_mode_invalid: "Boot mode must be one of: vrdp or gui"
|
191
166
|
box_missing: "A box must be specified."
|
192
167
|
box_not_found: "The box '%{name}' could not be found."
|
168
|
+
network_ip_invalid: "The host only network IP '%{ip}' is invalid."
|
169
|
+
network_ip_ends_one: |-
|
170
|
+
The host only network IP '%{ip}' must not end in a 1, as this
|
171
|
+
is reserved for the host machine.
|
193
172
|
shared_folder_hostpath_missing: "Shared folder host path for '%{name}' doesn't exist: %{path}"
|
194
173
|
shared_folder_nfs_owner_group: |-
|
195
174
|
Shared folder '%{name}': NFS does not support the owner/group settings.
|
@@ -131,7 +131,7 @@ class NetworkVMActionTest < Test::Unit::TestCase
|
|
131
131
|
|
132
132
|
adapter.expects(:enabled=).with(true)
|
133
133
|
adapter.expects(:attachment_type=).with(:host_only).once
|
134
|
-
adapter.expects(:
|
134
|
+
adapter.expects(:host_only_interface=).with(@network_name).once
|
135
135
|
|
136
136
|
if options[:mac]
|
137
137
|
adapter.expects(:mac_address=).with(options[:mac].gsub(':', '')).once
|
@@ -53,12 +53,4 @@ class ConfigVMTest < Test::Unit::TestCase
|
|
53
53
|
assert @config.proc_stack.include?(proc)
|
54
54
|
end
|
55
55
|
end
|
56
|
-
|
57
|
-
context "deprecated config" do
|
58
|
-
should "raise an error for provisioner=" do
|
59
|
-
assert_raises(Vagrant::Errors::VagrantError) {
|
60
|
-
@config.provisioner = :chef_solo
|
61
|
-
}
|
62
|
-
end
|
63
|
-
end
|
64
56
|
end
|
@@ -11,11 +11,11 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
11
11
|
|
12
12
|
context "class method check virtualbox version" do
|
13
13
|
setup do
|
14
|
-
VirtualBox.stubs(:version).returns("4.
|
14
|
+
VirtualBox.stubs(:version).returns("4.1.0")
|
15
15
|
end
|
16
16
|
|
17
17
|
should "not error and exit if everything is good" do
|
18
|
-
VirtualBox.expects(:version).returns("4.
|
18
|
+
VirtualBox.expects(:version).returns("4.1.0")
|
19
19
|
assert_nothing_raised { @klass.check_virtualbox! }
|
20
20
|
end
|
21
21
|
|
@@ -52,9 +52,17 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
|
|
52
52
|
should "expand host folders properly" do
|
53
53
|
path = "foo"
|
54
54
|
local_path = File.expand_path(path, @env.root_path)
|
55
|
-
remote_path = "#{@action.config.provisioning_path}/chef-solo-
|
55
|
+
remote_path = "#{@action.config.provisioning_path}/chef-solo-1"
|
56
56
|
assert_equal [[:host, local_path, remote_path]], @action.expanded_folders([:host, path])
|
57
57
|
end
|
58
|
+
|
59
|
+
should "share roles and cookbooks in different folders" do
|
60
|
+
local_roles_path = File.expand_path('roles',@env.root_path)
|
61
|
+
local_cookbooks_path = File.expand_path('cookbooks',@env.root_path)
|
62
|
+
remote_roles_path = @action.expanded_folders([:host,local_roles_path])[0][2]
|
63
|
+
remote_cookbooks_path = @action.expanded_folders([:host,local_cookbooks_path])[0][2]
|
64
|
+
assert_not_equal remote_roles_path, remote_cookbooks_path
|
65
|
+
end
|
58
66
|
end
|
59
67
|
|
60
68
|
context "guest paths" do
|
@@ -155,25 +155,25 @@ class PuppetProvisionerTest < Test::Unit::TestCase
|
|
155
155
|
end
|
156
156
|
|
157
157
|
should "cd into the pp_path directory and run puppet" do
|
158
|
-
expect_puppet_command("puppet #{@config.computed_manifest_file}")
|
158
|
+
expect_puppet_command("puppet apply #{@config.computed_manifest_file}")
|
159
159
|
@action.run_puppet_client
|
160
160
|
end
|
161
161
|
|
162
162
|
should "cd into the pp_path directory and run puppet with given options when given as an array" do
|
163
163
|
@config.options = ["--modulepath", "modules", "--verbose"]
|
164
|
-
expect_puppet_command("puppet --modulepath modules --verbose #{@config.computed_manifest_file}")
|
164
|
+
expect_puppet_command("puppet apply --modulepath modules --verbose #{@config.computed_manifest_file}")
|
165
165
|
@action.run_puppet_client
|
166
166
|
end
|
167
167
|
|
168
168
|
should "cd into the pp_path directory and run puppet with the options when given as a string" do
|
169
169
|
@config.options = "--modulepath modules --verbose"
|
170
|
-
expect_puppet_command("puppet --modulepath modules --verbose #{@config.computed_manifest_file}")
|
170
|
+
expect_puppet_command("puppet apply --modulepath modules --verbose #{@config.computed_manifest_file}")
|
171
171
|
@action.run_puppet_client
|
172
172
|
end
|
173
173
|
|
174
174
|
should "cd into the pp_path and run puppet with module paths if set" do
|
175
175
|
@config.module_path = "foo"
|
176
|
-
expect_puppet_command("puppet --modulepath '#{File.join(@config.pp_path, 'modules-0')}' #{@config.computed_manifest_file}")
|
176
|
+
expect_puppet_command("puppet apply --modulepath '#{File.join(@config.pp_path, 'modules-0')}' #{@config.computed_manifest_file}")
|
177
177
|
|
178
178
|
@action.set_module_paths
|
179
179
|
@action.run_puppet_client
|
data/test/vagrant/ssh_test.rb
CHANGED
data/vagrant.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency "net-scp", "~> 1.0.4"
|
22
22
|
s.add_dependency "i18n", "~> 0.5.0"
|
23
23
|
s.add_dependency "thor", "~> 0.14.6"
|
24
|
-
s.add_dependency "virtualbox", "~> 0.9.
|
24
|
+
s.add_dependency "virtualbox", "~> 0.9.1"
|
25
25
|
|
26
26
|
s.add_development_dependency "rake"
|
27
27
|
s.add_development_dependency "contest", ">= 0.1.2"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrantup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
@@ -115,14 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.9.
|
118
|
+
version: 0.9.1
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.9.
|
125
|
+
version: 0.9.1
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rake
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|