vagrantup 0.8.10 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +77 -1
- data/Gemfile +0 -14
- data/LICENSE +1 -1
- data/bin/vagrant +47 -20
- data/config/default.rb +6 -14
- data/lib/vagrant/action/box/destroy.rb +7 -3
- data/lib/vagrant/action/box/download.rb +8 -8
- data/lib/vagrant/action/box/package.rb +2 -2
- data/lib/vagrant/action/box/unpackage.rb +13 -7
- data/lib/vagrant/action/box/verify.rb +5 -5
- data/lib/vagrant/action/builder.rb +23 -19
- data/lib/vagrant/action/builtin.rb +117 -79
- data/lib/vagrant/action/env/set.rb +7 -4
- data/lib/vagrant/action/environment.rb +3 -41
- data/lib/vagrant/action/general/package.rb +14 -29
- data/lib/vagrant/action/general/validate.rb +2 -2
- data/lib/vagrant/action/runner.rb +53 -0
- data/lib/vagrant/action/vm/boot.rb +9 -9
- data/lib/vagrant/action/vm/check_accessible.rb +2 -2
- data/lib/vagrant/action/vm/check_box.rb +10 -12
- data/lib/vagrant/action/vm/check_guest_additions.rb +8 -8
- data/lib/vagrant/action/vm/check_port_collisions.rb +85 -0
- data/lib/vagrant/action/vm/clean_machine_folder.rb +4 -4
- data/lib/vagrant/action/vm/clear_forwarded_ports.rb +3 -11
- data/lib/vagrant/action/vm/clear_network_interfaces.rb +31 -0
- data/lib/vagrant/action/vm/clear_shared_folders.rb +2 -11
- data/lib/vagrant/action/vm/customize.rb +19 -9
- data/lib/vagrant/action/vm/destroy.rb +4 -4
- data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +2 -12
- data/lib/vagrant/action/vm/discard_state.rb +4 -4
- data/lib/vagrant/action/vm/export.rb +13 -8
- data/lib/vagrant/action/vm/forward_ports.rb +55 -102
- data/lib/vagrant/action/vm/halt.rb +9 -6
- data/lib/vagrant/action/vm/host_name.rb +4 -4
- data/lib/vagrant/action/vm/import.rb +19 -10
- data/lib/vagrant/action/vm/match_mac_address.rb +4 -9
- data/lib/vagrant/action/vm/network.rb +300 -94
- data/lib/vagrant/action/vm/nfs.rb +41 -26
- data/lib/vagrant/action/vm/package.rb +1 -1
- data/lib/vagrant/action/vm/package_vagrantfile.rb +5 -2
- data/lib/vagrant/action/vm/provision.rb +42 -13
- data/lib/vagrant/action/vm/provisioner_cleanup.rb +2 -2
- data/lib/vagrant/action/vm/{clear_nfs_exports.rb → prune_nfs_exports.rb} +7 -7
- data/lib/vagrant/action/vm/resume.rb +4 -4
- data/lib/vagrant/action/vm/setup_package_files.rb +54 -0
- data/lib/vagrant/action/vm/share_folders.rb +63 -39
- data/lib/vagrant/action/vm/suspend.rb +4 -4
- data/lib/vagrant/action/warden.rb +13 -6
- data/lib/vagrant/action.rb +45 -123
- data/lib/vagrant/box.rb +9 -55
- data/lib/vagrant/box_collection.rb +22 -17
- data/lib/vagrant/cli.rb +62 -47
- data/lib/vagrant/command/base.rb +135 -90
- data/lib/vagrant/command/box.rb +46 -21
- data/lib/vagrant/command/box_add.rb +33 -0
- data/lib/vagrant/command/box_list.rb +25 -0
- data/lib/vagrant/command/box_remove.rb +23 -0
- data/lib/vagrant/command/box_repackage.rb +23 -0
- data/lib/vagrant/command/destroy.rb +16 -5
- data/lib/vagrant/command/halt.rb +25 -7
- data/lib/vagrant/command/init.rb +30 -7
- data/lib/vagrant/command/package.rb +49 -18
- data/lib/vagrant/command/provision.rb +22 -9
- data/lib/vagrant/command/reload.rb +18 -5
- data/lib/vagrant/command/resume.rb +18 -5
- data/lib/vagrant/command/ssh.rb +69 -31
- data/lib/vagrant/command/ssh_config.rb +37 -22
- data/lib/vagrant/command/status.rb +22 -20
- data/lib/vagrant/command/suspend.rb +18 -5
- data/lib/vagrant/command/up.rb +41 -8
- data/lib/vagrant/command.rb +18 -20
- data/lib/vagrant/communication/base.rb +56 -0
- data/lib/vagrant/communication/ssh.rb +200 -0
- data/lib/vagrant/communication.rb +7 -0
- data/lib/vagrant/config/base.rb +18 -26
- data/lib/vagrant/config/container.rb +37 -0
- data/lib/vagrant/config/error_recorder.rb +1 -1
- data/lib/vagrant/config/loader.rb +125 -0
- data/lib/vagrant/config/nfs.rb +1 -3
- data/lib/vagrant/config/package.rb +1 -3
- data/lib/vagrant/config/ssh.rb +31 -16
- data/lib/vagrant/config/top.rb +36 -25
- data/lib/vagrant/config/vagrant.rb +2 -5
- data/lib/vagrant/config/vm/provisioner.rb +16 -20
- data/lib/vagrant/config/vm/sub_vm.rb +1 -1
- data/lib/vagrant/config/vm.rb +115 -56
- data/lib/vagrant/config.rb +29 -103
- data/lib/vagrant/data_store.rb +23 -15
- data/lib/vagrant/downloaders/base.rb +7 -5
- data/lib/vagrant/downloaders/file.rb +4 -4
- data/lib/vagrant/downloaders/http.rb +4 -5
- data/lib/vagrant/driver/virtualbox.rb +121 -0
- data/lib/vagrant/driver/virtualbox_4_0.rb +411 -0
- data/lib/vagrant/driver/virtualbox_4_1.rb +411 -0
- data/lib/vagrant/driver/virtualbox_base.rb +284 -0
- data/lib/vagrant/driver.rb +7 -0
- data/lib/vagrant/environment.rb +221 -240
- data/lib/vagrant/errors.rb +74 -25
- data/lib/vagrant/guest/arch.rb +48 -0
- data/lib/vagrant/{systems → guest}/base.rb +30 -18
- data/lib/vagrant/guest/debian.rb +61 -0
- data/lib/vagrant/{systems → guest}/freebsd.rb +11 -18
- data/lib/vagrant/guest/gentoo.rb +32 -0
- data/lib/vagrant/{systems → guest}/linux/config.rb +2 -4
- data/lib/vagrant/guest/linux/error.rb +9 -0
- data/lib/vagrant/guest/linux.rb +78 -0
- data/lib/vagrant/guest/redhat.rb +66 -0
- data/lib/vagrant/guest/solaris.rb +114 -0
- data/lib/vagrant/{systems → guest}/suse.rb +2 -2
- data/lib/vagrant/guest/ubuntu.rb +23 -0
- data/lib/vagrant/guest.rb +16 -0
- data/lib/vagrant/hosts/arch.rb +7 -3
- data/lib/vagrant/hosts/base.rb +36 -46
- data/lib/vagrant/hosts/bsd.rb +53 -16
- data/lib/vagrant/hosts/fedora.rb +14 -0
- data/lib/vagrant/hosts/freebsd.rb +6 -36
- data/lib/vagrant/hosts/linux.rb +45 -20
- data/lib/vagrant/hosts/windows.rb +16 -0
- data/lib/vagrant/hosts.rb +23 -6
- data/lib/vagrant/provisioners/base.rb +11 -34
- data/lib/vagrant/provisioners/chef.rb +30 -26
- data/lib/vagrant/provisioners/chef_client.rb +37 -23
- data/lib/vagrant/provisioners/chef_solo.rb +61 -16
- data/lib/vagrant/provisioners/puppet.rb +70 -38
- data/lib/vagrant/provisioners/puppet_server.rb +12 -13
- data/lib/vagrant/provisioners/shell.rb +24 -24
- data/lib/vagrant/provisioners.rb +10 -7
- data/lib/vagrant/registry.rb +49 -0
- data/lib/vagrant/ssh.rb +82 -153
- data/lib/vagrant/ui.rb +118 -50
- data/lib/vagrant/util/busy.rb +1 -1
- data/lib/vagrant/util/file_mode.rb +12 -0
- data/lib/vagrant/util/network_ip.rb +28 -0
- data/lib/vagrant/util/platform.rb +1 -0
- data/lib/vagrant/util/subprocess.rb +227 -0
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant/vm.rb +111 -97
- data/lib/vagrant.rb +132 -5
- data/tasks/acceptance.rake +3 -3
- data/tasks/test.rake +7 -2
- data/templates/commands/init/Vagrantfile.erb +11 -4
- data/templates/{ssh_config.erb → commands/ssh_config/config.erb} +0 -0
- data/templates/guests/arch/network_dhcp.erb +7 -0
- data/templates/guests/arch/network_static.erb +7 -0
- data/templates/guests/debian/network_dhcp.erb +6 -0
- data/templates/guests/debian/network_static.erb +7 -0
- data/templates/guests/gentoo/network_dhcp.erb +4 -0
- data/templates/guests/gentoo/network_static.erb +4 -0
- data/templates/guests/redhat/network_dhcp.erb +6 -0
- data/templates/guests/redhat/network_static.erb +7 -0
- data/templates/locales/en.yml +241 -122
- data/templates/{chef_server_client.erb → provisioners/chef_client/client.erb} +0 -0
- data/templates/{chef_solo_solo.erb → provisioners/chef_solo/solo.erb} +0 -0
- data/test/acceptance/base.rb +10 -10
- data/test/acceptance/box_test.rb +28 -6
- data/test/acceptance/destroy_test.rb +1 -1
- data/test/acceptance/halt_test.rb +4 -4
- data/test/acceptance/init_test.rb +3 -3
- data/test/acceptance/networking/host_only_test.rb +37 -0
- data/test/acceptance/networking/port_forward_test.rb +125 -0
- data/test/acceptance/package_test.rb +46 -0
- data/test/acceptance/provisioning/basic_test.rb +61 -0
- data/test/acceptance/provisioning/chef_solo_test.rb +37 -0
- data/test/acceptance/provisioning/shell_test.rb +53 -0
- data/test/acceptance/resume_test.rb +1 -1
- data/test/acceptance/skeletons/chef_solo_basic/README.md +3 -0
- data/test/acceptance/skeletons/chef_solo_basic/cookbooks/basic/recipes/default.rb +5 -0
- data/test/acceptance/skeletons/chef_solo_json/README.md +3 -0
- data/test/acceptance/skeletons/chef_solo_json/cookbooks/basic/recipes/default.rb +6 -0
- data/test/acceptance/skeletons/provisioner_multi/README.md +3 -0
- data/test/acceptance/skeletons/provisioner_multi/cookbooks/basic/recipes/default.rb +5 -0
- data/test/acceptance/ssh_test.rb +7 -2
- data/test/acceptance/support/config.rb +1 -1
- data/test/acceptance/support/isolated_environment.rb +41 -150
- data/test/acceptance/support/matchers/match_output.rb +1 -1
- data/test/acceptance/support/matchers/succeed.rb +14 -0
- data/test/acceptance/support/network_tests.rb +29 -0
- data/test/acceptance/support/output.rb +9 -1
- data/test/acceptance/support/shared/base_context.rb +16 -9
- data/test/acceptance/support/shared/command_examples.rb +4 -4
- data/test/acceptance/suspend_test.rb +1 -1
- data/test/acceptance/up_basic_test.rb +26 -7
- data/test/acceptance/up_with_box_url.rb +1 -1
- data/test/acceptance/vagrant_test.rb +1 -1
- data/test/acceptance/version_test.rb +0 -5
- data/test/support/isolated_environment.rb +46 -0
- data/test/{acceptance/support → support}/tempdir.rb +0 -0
- data/test/unit/base.rb +21 -0
- data/test/unit/support/isolated_environment.rb +39 -0
- data/test/unit/support/shared/base_context.rb +30 -0
- data/test/unit/vagrant/action/builder_test.rb +126 -177
- data/test/unit/vagrant/action/environment_test.rb +10 -21
- data/test/unit/vagrant/action/runner_test.rb +65 -0
- data/test/unit/vagrant/action/warden_test.rb +64 -97
- data/test/unit/vagrant/box_collection_test.rb +44 -33
- data/test/unit/vagrant/box_test.rb +25 -65
- data/test/unit/vagrant/command/base_test.rb +141 -14
- data/test/unit/vagrant/config/base_test.rb +16 -43
- data/test/unit/vagrant/config/loader_test.rb +79 -0
- data/test/unit/vagrant/config/top_test.rb +69 -0
- data/test/unit/vagrant/config/vm_test.rb +62 -47
- data/test/unit/vagrant/config_test.rb +16 -151
- data/test/unit/vagrant/data_store_test.rb +43 -61
- data/test/unit/vagrant/downloaders/base_test.rb +12 -22
- data/test/unit/vagrant/downloaders/file_test.rb +58 -31
- data/test/unit/vagrant/downloaders/http_test.rb +12 -86
- data/test/unit/vagrant/environment_test.rb +107 -536
- data/test/unit/vagrant/hosts_test.rb +36 -0
- data/test/unit/vagrant/registry_test.rb +56 -0
- data/test/unit/vagrant/util/file_checksum_test.rb +23 -0
- data/test/unit/vagrant/util/hash_with_indifferent_access_test.rb +23 -24
- data/test/unit/vagrant/util/network_ip_test.rb +17 -0
- data/test/unit/vagrant/util/retryable_test.rb +90 -34
- data/test/unit/vagrant_test.rb +27 -0
- data/test/{unit → unit_legacy}/locales/en.yml +0 -0
- data/test/{unit → unit_legacy}/test_helper.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/box/destroy_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/box/download_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/box/package_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/box/unpackage_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/box/verify_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/env/set_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/general/package_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/general/validate_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/boot_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/check_accessible_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/check_box_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/check_guest_additions_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/clean_machine_folder_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/clear_forwarded_ports_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/clear_nfs_exports_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/clear_shared_folders_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/customize_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/destroy_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/discard_state_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/export_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/forward_ports_helpers_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/forward_ports_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/halt_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/host_name_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/import_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/match_mac_address_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/modify_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/network_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/nfs_helpers_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/nfs_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/package_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/package_vagrantfile_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/provision_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/provisioner_cleanup_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/resume_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/share_folders_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action/vm/suspend_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/action_test.rb +0 -0
- data/test/unit_legacy/vagrant/box_collection_test.rb +45 -0
- data/test/unit_legacy/vagrant/box_test.rb +74 -0
- data/test/{unit → unit_legacy}/vagrant/cli_test.rb +0 -0
- data/test/unit_legacy/vagrant/command/base_test.rb +23 -0
- data/test/{unit → unit_legacy}/vagrant/command/group_base_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/command/helpers_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/command/init_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/command/package_test.rb +0 -0
- data/test/unit_legacy/vagrant/config/base_test.rb +52 -0
- data/test/{unit → unit_legacy}/vagrant/config/error_recorder_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/config/ssh_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/config/vagrant_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/config/vm/provisioner_test.rb +0 -0
- data/test/unit_legacy/vagrant/config/vm_test.rb +47 -0
- data/test/unit_legacy/vagrant/config_test.rb +148 -0
- data/test/unit_legacy/vagrant/downloaders/http_test.rb +93 -0
- data/test/unit_legacy/vagrant/environment_test.rb +539 -0
- data/test/{unit → unit_legacy}/vagrant/errors_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/hosts/base_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/hosts/bsd_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/hosts/linux_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/plugin_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/base_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/chef_client_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/chef_solo_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/chef_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/puppet_server_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/puppet_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/provisioners/shell_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/ssh/session_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/ssh_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/systems/base_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/systems/linux_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/util/busy_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/util/counter_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/util/platform_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/util/stacked_proc_runner_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/util/template_renderer_test.rb +0 -0
- data/test/{unit → unit_legacy}/vagrant/vm_test.rb +0 -0
- data/vagrant.gemspec +7 -9
- metadata +183 -179
- data/keys/vagrant.ppk +0 -26
- data/lib/vagrant/action/box.rb +0 -11
- data/lib/vagrant/action/env.rb +0 -7
- data/lib/vagrant/action/general.rb +0 -8
- data/lib/vagrant/action/vm/forward_ports_helpers.rb +0 -28
- data/lib/vagrant/action/vm/modify.rb +0 -37
- data/lib/vagrant/action/vm/nfs_helpers.rb +0 -11
- data/lib/vagrant/action/vm.rb +0 -34
- data/lib/vagrant/command/group_base.rb +0 -107
- data/lib/vagrant/command/helpers.rb +0 -33
- data/lib/vagrant/command/named_base.rb +0 -14
- data/lib/vagrant/command/upgrade_to_060.rb +0 -45
- data/lib/vagrant/command/version.rb +0 -13
- data/lib/vagrant/ssh/session.rb +0 -136
- data/lib/vagrant/systems/arch.rb +0 -34
- data/lib/vagrant/systems/debian.rb +0 -36
- data/lib/vagrant/systems/gentoo.rb +0 -27
- data/lib/vagrant/systems/linux/error.rb +0 -9
- data/lib/vagrant/systems/linux.rb +0 -82
- data/lib/vagrant/systems/redhat.rb +0 -48
- data/lib/vagrant/systems/solaris.rb +0 -113
- data/lib/vagrant/systems/ubuntu.rb +0 -17
- data/lib/vagrant/systems.rb +0 -13
- data/templates/network_entry_arch.erb +0 -9
- data/templates/network_entry_debian.erb +0 -8
- data/templates/network_entry_gentoo.erb +0 -5
- data/templates/network_entry_redhat.erb +0 -9
- data/test/unit/vagrant/ui_test.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dcef6916402f3ffabcf961a01ff5ccf739e3598
|
4
|
+
data.tar.gz: 53800395c7d04a4d3a914039ff5d71f956c20859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52537409e5b638394d0d092e1086dc02fd3ee46245d1f1b61ce420252310209e33864c0f242c0a38adba50948d3f70f0b99486603bb41702ce1f498c337965b6
|
7
|
+
data.tar.gz: 31b769e88900a22d8dbe4e7f84bdf4df09e1a7c3aaf88d5cde2b7b0dff05eeb98e2be203a8bbaaa371cfa7d97de263487fe19a91369c44d97c22fd2329a4e513
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,83 @@
|
|
1
|
+
## 0.9.0 (January 17, 2012)
|
2
|
+
|
3
|
+
- VirtualBox 4.0 support backported in addition to supporting VirtualBox 4.1.
|
4
|
+
- `config.vm.network` syntax changed so that the first argument is now the type
|
5
|
+
of argument. Previously where you had `config.vm.network "33.33.33.10"` you
|
6
|
+
should now put `config.vm.network :hostonly, "33.33.33.10"`. This is in order
|
7
|
+
to support bridged networking, as well.
|
8
|
+
- `config.vm.forward_port` no longer requires a name parameter.
|
9
|
+
- Bridged networking. `config.vm.network` with `:bridged` as the option will
|
10
|
+
setup a bridged network.
|
11
|
+
- Host only networks can be configured with DHCP now. Specify `:dhcp` as
|
12
|
+
the IP and it will be done.
|
13
|
+
- `config.vm.customize` now takes a command to send to `VBoxManage`, so any
|
14
|
+
arbitrary command can be sent. The older style of passing a block no longer
|
15
|
+
works and Vagrant will give a proper error message if it notices this old-style
|
16
|
+
being used.
|
17
|
+
- `config.ssh.forwarded_port_key` is gone. Vagrant no longer cares about
|
18
|
+
forwarded port names for any reason. Please use `config.ssh.guest_port`
|
19
|
+
(more below).
|
20
|
+
- `config.ssh.forwarded_port_destination` has been replaced by
|
21
|
+
`config.ssh.guest_port` which more accurately reflects what it is
|
22
|
+
used for. Vagrant will automatically scan forwarded ports that match the
|
23
|
+
guest port to find the SSH port.
|
24
|
+
- Logging. The entire Vagrant source has had logging sprinkled throughout
|
25
|
+
to make debugging issues easier. To enable logging, set the VAGRANT_LOG
|
26
|
+
environmental variable to the log level you wish to see. By default,
|
27
|
+
logging is silent.
|
28
|
+
- `system` renamed to `guest` throughout the source. Any `config.vm.system`
|
29
|
+
configurations must be changed to `config.vm.guest`
|
30
|
+
- Puppet provisioner no longer defaults manifest to "box.pp." Instead, it
|
31
|
+
is now "default.pp"
|
32
|
+
- All Vagrant commands that take a VM name in a Multi-VM environment
|
33
|
+
can now be given a regular expression. If the name starts and ends with a "/"
|
34
|
+
then it is assumed to be a regular expression. [GH-573]
|
35
|
+
- Added a "--plain" flag to `vagrant ssh` which will cause Vagrant to not
|
36
|
+
perform any authentication. It will simply `ssh` into the proper IP and
|
37
|
+
port of the virtual machine.
|
38
|
+
- If a shared folder now has a `:create` flag set to `true`, the path on the
|
39
|
+
host will be created if it doesn't exist.
|
40
|
+
- Added `--force` flag to `box add`, which will overwite any existing boxes
|
41
|
+
if they exist. [GH-631]
|
42
|
+
- Added `--provision-with` to `up` which configures what provisioners run,
|
43
|
+
by shortcut. [GH-367]
|
44
|
+
- Arbitrary mount options can be passed with `:extra` to any shared
|
45
|
+
folders. [GH-551]
|
46
|
+
- Options passed after a `--` to `vagrant ssh` are now passed directly to
|
47
|
+
`ssh`. [GH-554]
|
48
|
+
- Ubuntu guests will now emit a `vagrant-mounted` upstart event after shared
|
49
|
+
folders are mounted.
|
50
|
+
- `attempts` is a new option on chef client and chef solo provisioners. This
|
51
|
+
will run the provisioner multiple times until erroring about failing
|
52
|
+
convergence. [GH-282]
|
53
|
+
- Removed Thor as a dependency for the command line interfaces. This resulted
|
54
|
+
in general speed increases across all command line commands.
|
55
|
+
- Linux uses `shutdown -h` instead of `halt` to hopefully more consistently
|
56
|
+
power off the system. [GH-575]
|
57
|
+
- Tweaks to SSH to hopefully be more reliable in coming up.
|
58
|
+
- Helpful error message when SCP is unavailable in the guest. [GH-568]
|
59
|
+
- Error message for improperly packaged box files. [GH-198]
|
60
|
+
- Copy insecure private key to user-owned directory so even
|
61
|
+
`sudo` installed Vagrant installations work. [GH-580]
|
62
|
+
- Provisioner stdout/stderr is now color coded based on stdout/stderr.
|
63
|
+
stdout is green, stderr is red. [GH-595]
|
64
|
+
- Chef solo now prompts users to run a `reload` if shared folders
|
65
|
+
are not found on the VM. [GH-253]
|
66
|
+
- "--no-provision" once again works for certain commands. [GH-591]
|
67
|
+
- Resuming a VM from a saved state will show an error message if there
|
68
|
+
would be port collisions. [GH-602]
|
69
|
+
- `vagrant ssh -c` will now exit with the same exit code as the command
|
70
|
+
run. [GH-598]
|
71
|
+
- `vagrant ssh -c` will now send stderr to stderr and stdout to stdout
|
72
|
+
on the host machine, instead of all output to stdout.
|
73
|
+
- `vagrant box add` path now accepts unexpanded shell paths such as
|
74
|
+
`~/foo` and will properly expand them. [GH-633]
|
75
|
+
- Vagrant can now be interrupted during the "importing" step.
|
76
|
+
- NFS exports will no longer be cleared when an expected error occurs. [GH-577]
|
77
|
+
|
1
78
|
## 0.8.10 (December 10, 2011)
|
2
79
|
|
3
80
|
- Revert the SSH tweaks made in 0.8.8. It affected stability
|
4
|
-
that I'd rather not test in a patch release.
|
5
81
|
|
6
82
|
## 0.8.8 (December 1, 2011)
|
7
83
|
|
data/Gemfile
CHANGED
@@ -1,17 +1,3 @@
|
|
1
|
-
require "rbconfig"
|
2
|
-
platform = RbConfig::CONFIG["host_os"].downcase
|
3
|
-
|
4
1
|
source "http://rubygems.org"
|
5
2
|
|
6
3
|
gemspec
|
7
|
-
|
8
|
-
# Use the following gems straight from git, since Vagrant dev
|
9
|
-
# typically coincides with it
|
10
|
-
gem "virtualbox", :git => "git://github.com/mitchellh/virtualbox.git"
|
11
|
-
|
12
|
-
if platform.include?("mingw") || platform.include?("mswin")
|
13
|
-
# JRuby requires these gems for development, but only
|
14
|
-
# on windows.
|
15
|
-
gem "jruby-openssl", "~> 0.7.4", :platforms => :jruby
|
16
|
-
gem "jruby-win32ole", "~> 0.8.5", :platforms => :jruby
|
17
|
-
end
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2010
|
3
|
+
Copyright (c) 2010-2012Mitchell Hashimoto and John Bender
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/bin/vagrant
CHANGED
@@ -1,33 +1,60 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
require 'log4r'
|
2
3
|
require 'vagrant'
|
3
4
|
require 'vagrant/cli'
|
5
|
+
require 'vagrant/util/platform'
|
4
6
|
|
5
|
-
|
7
|
+
# Create a logger right away
|
8
|
+
logger = Log4r::Logger.new("vagrant::bin::vagrant")
|
9
|
+
logger.info("`vagrant` invoked: #{ARGV.inspect}")
|
6
10
|
|
7
|
-
|
8
|
-
|
9
|
-
|
11
|
+
# Stdout/stderr should not buffer output
|
12
|
+
$stdout.sync = true
|
13
|
+
$stderr.sync = true
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
shell = Thor::Shell::Basic.new
|
15
|
-
else
|
16
|
-
shell = Thor::Base.shell.new
|
17
|
-
end
|
15
|
+
# These will be the options that are passed to initialze the Vagrant
|
16
|
+
# environment.
|
17
|
+
opts = {}
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
# Disable color if the proper argument was passed or if we're
|
20
|
+
# on Windows since the default Windows terminal doesn't support
|
21
|
+
# colors.
|
22
|
+
if !$stdout.tty? || ARGV.include?("--no-color") || Vagrant::Util::Platform.windows?
|
23
|
+
# Delete the argument from the list so that it doesn't cause any
|
24
|
+
# invalid arguments down the road.
|
25
|
+
ARGV.delete("--no-color")
|
26
|
+
opts[:ui_class] = Vagrant::UI::Basic
|
27
|
+
else
|
28
|
+
opts[:ui_class] = Vagrant::UI::Colored
|
29
|
+
end
|
30
|
+
|
31
|
+
env = nil
|
32
|
+
begin
|
33
|
+
# Create the environment, which is the cwd of wherever the
|
34
|
+
# `vagrant` command was invoked from
|
35
|
+
logger.debug("Creating Vagrant environment")
|
36
|
+
env = Vagrant::Environment.new(opts)
|
37
|
+
|
38
|
+
# Load the environment
|
39
|
+
logger.debug("Loading environment")
|
23
40
|
env.load!
|
24
41
|
|
25
|
-
#
|
26
|
-
|
42
|
+
# Execute the CLI interface
|
43
|
+
env.cli(ARGV)
|
27
44
|
rescue Vagrant::Errors::VagrantError => e
|
28
|
-
|
29
|
-
|
30
|
-
|
45
|
+
logger.error("Vagrant experienced an error! Details:")
|
46
|
+
logger.error(e.inspect)
|
47
|
+
logger.error(e.message)
|
48
|
+
logger.error(e.backtrace.join("\n"))
|
49
|
+
|
50
|
+
if env
|
51
|
+
opts = { :prefix => false }
|
52
|
+
env.ui.error e.message, opts if e.message
|
53
|
+
else
|
54
|
+
$stderr.puts "Vagrant failed to initialize at a very early stage:\n\n"
|
55
|
+
$stderr.puts e.message
|
56
|
+
end
|
57
|
+
|
31
58
|
exit e.status_code if e.respond_to?(:status_code)
|
32
59
|
exit 999 # An error occurred with no status code defined
|
33
60
|
end
|
data/config/default.rb
CHANGED
@@ -2,30 +2,22 @@ Vagrant::Config.run do |config|
|
|
2
2
|
# default config goes here
|
3
3
|
config.vagrant.dotfile_name = ".vagrant"
|
4
4
|
config.vagrant.host = :detect
|
5
|
-
config.vagrant.ssh_session_cache = false
|
6
5
|
|
7
6
|
config.ssh.username = "vagrant"
|
7
|
+
config.ssh.password = "vagrant"
|
8
8
|
config.ssh.host = "127.0.0.1"
|
9
|
-
config.ssh.
|
10
|
-
config.ssh.forwarded_port_destination = 22
|
9
|
+
config.ssh.guest_port = 22
|
11
10
|
config.ssh.max_tries = 100
|
12
|
-
config.ssh.timeout =
|
13
|
-
config.ssh.private_key_path = File.expand_path("keys/vagrant", Vagrant.source_root)
|
11
|
+
config.ssh.timeout = 10
|
14
12
|
config.ssh.forward_agent = false
|
15
13
|
config.ssh.forward_x11 = false
|
16
14
|
|
17
15
|
config.vm.auto_port_range = (2200..2250)
|
18
|
-
config.vm.box_ovf = "box.ovf"
|
19
16
|
config.vm.box_url = nil
|
20
17
|
config.vm.base_mac = nil
|
21
|
-
config.vm.forward_port
|
22
|
-
config.vm.boot_mode = "
|
23
|
-
config.vm.
|
24
|
-
|
25
|
-
config.vm.customize do |vm|
|
26
|
-
# Make VM name the name of the containing folder by default
|
27
|
-
vm.name = File.basename(config.env.cwd) + "_#{Time.now.to_i}"
|
28
|
-
end
|
18
|
+
config.vm.forward_port 22, 2222, :name => "ssh", :auto => true
|
19
|
+
config.vm.boot_mode = "headless"
|
20
|
+
config.vm.guest = :linux
|
29
21
|
|
30
22
|
# Share the root folder. This can then be overridden by
|
31
23
|
# other Vagrantfiles, if they wish.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
|
3
3
|
module Vagrant
|
4
|
-
|
4
|
+
module Action
|
5
5
|
module Box
|
6
6
|
class Destroy
|
7
7
|
def initialize(app, env)
|
@@ -10,8 +10,12 @@ module Vagrant
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def call(env)
|
13
|
-
|
14
|
-
|
13
|
+
# Delete the existing box
|
14
|
+
env[:ui].info I18n.t("vagrant.actions.box.destroy.destroying", :name => env[:box_name])
|
15
|
+
FileUtils.rm_rf(env[:box_directory])
|
16
|
+
|
17
|
+
# Reload the box collection
|
18
|
+
env[:box_collection].reload!
|
15
19
|
|
16
20
|
@app.call(env)
|
17
21
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Vagrant
|
2
|
-
|
2
|
+
module Action
|
3
3
|
module Box
|
4
4
|
class Download
|
5
5
|
BASENAME = "box"
|
@@ -36,9 +36,9 @@ module Vagrant
|
|
36
36
|
|
37
37
|
# Use the class if it matches the given URI or if this
|
38
38
|
# is the last class...
|
39
|
-
if classes.length == (i + 1) || klass.match?(@env["
|
40
|
-
@env
|
41
|
-
@downloader = klass.new(@env)
|
39
|
+
if classes.length == (i + 1) || klass.match?(@env["box_url"])
|
40
|
+
@env[:ui].info I18n.t("vagrant.actions.box.download.with", :class => klass.to_s)
|
41
|
+
@downloader = klass.new(@env[:ui])
|
42
42
|
break
|
43
43
|
end
|
44
44
|
end
|
@@ -47,7 +47,7 @@ module Vagrant
|
|
47
47
|
# just in case for now.
|
48
48
|
raise Errors::BoxDownloadUnknownType if !@downloader
|
49
49
|
|
50
|
-
@downloader.prepare(@env["
|
50
|
+
@downloader.prepare(@env["box_url"])
|
51
51
|
true
|
52
52
|
end
|
53
53
|
|
@@ -60,7 +60,7 @@ module Vagrant
|
|
60
60
|
|
61
61
|
def recover(env)
|
62
62
|
if temp_path && File.exist?(temp_path)
|
63
|
-
env
|
63
|
+
env[:ui].info I18n.t("vagrant.actions.box.download.cleaning")
|
64
64
|
File.unlink(temp_path)
|
65
65
|
end
|
66
66
|
end
|
@@ -72,11 +72,11 @@ module Vagrant
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def box_temp_path
|
75
|
-
@env
|
75
|
+
@env[:tmp_path].join(BASENAME + Time.now.to_i.to_s)
|
76
76
|
end
|
77
77
|
|
78
78
|
def download_to(f)
|
79
|
-
@downloader.download!(@env["
|
79
|
+
@downloader.download!(@env["box_url"], f)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'vagrant/action/general/package'
|
2
2
|
|
3
3
|
module Vagrant
|
4
|
-
|
4
|
+
module Action
|
5
5
|
module Box
|
6
6
|
# Packages a box which has already been unpackaged (such as
|
7
7
|
# for the `vagrant box repackage` command) by leveraging the
|
@@ -10,7 +10,7 @@ module Vagrant
|
|
10
10
|
# Alias instead of calling super for testability
|
11
11
|
alias_method :general_call, :call
|
12
12
|
def call(env)
|
13
|
-
env["package.directory"] = env["
|
13
|
+
env["package.directory"] = env["box_directory"]
|
14
14
|
general_call(env)
|
15
15
|
end
|
16
16
|
end
|
@@ -2,7 +2,7 @@ require 'fileutils'
|
|
2
2
|
require 'archive/tar/minitar'
|
3
3
|
|
4
4
|
module Vagrant
|
5
|
-
|
5
|
+
module Action
|
6
6
|
module Box
|
7
7
|
# Unpackages a downloaded box to a given directory with a given
|
8
8
|
# name.
|
@@ -37,16 +37,22 @@ module Vagrant
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def setup_box_directory
|
40
|
-
|
40
|
+
if File.directory?(@env["box_directory"])
|
41
|
+
raise Errors::BoxAlreadyExists, :name => @env["box_name"]
|
42
|
+
end
|
41
43
|
|
42
|
-
FileUtils.mkdir_p(@env["
|
43
|
-
@box_directory = @env["
|
44
|
+
FileUtils.mkdir_p(@env["box_directory"])
|
45
|
+
@box_directory = @env["box_directory"]
|
44
46
|
end
|
45
47
|
|
46
48
|
def decompress
|
47
|
-
Dir.chdir(@env["
|
48
|
-
@env
|
49
|
-
|
49
|
+
Dir.chdir(@env["box_directory"]) do
|
50
|
+
@env[:ui].info I18n.t("vagrant.actions.box.unpackage.extracting")
|
51
|
+
begin
|
52
|
+
Archive::Tar::Minitar.unpack(@env["download.temp_path"], @env["box_directory"].to_s)
|
53
|
+
rescue SystemCallError
|
54
|
+
raise Errors::BoxUnpackageFailure
|
55
|
+
end
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Vagrant
|
2
|
-
|
2
|
+
module Action
|
3
3
|
module Box
|
4
4
|
class Verify
|
5
5
|
def initialize(app, env)
|
@@ -8,10 +8,10 @@ module Vagrant
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def call(env)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
@env[:ui].info I18n.t("vagrant.actions.box.verify.verifying")
|
12
|
+
|
13
|
+
driver = Driver::VirtualBox.new(nil)
|
14
|
+
if !driver.verify_image(env["box_directory"].join("box.ovf").to_s)
|
15
15
|
raise Errors::BoxVerificationFailed
|
16
16
|
end
|
17
17
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Vagrant
|
2
|
-
|
2
|
+
module Action
|
3
3
|
# Action builder which provides a nice DSL for building up
|
4
4
|
# a middleware sequence for Vagrant actions. This code is based
|
5
5
|
# heavily off of `Rack::Builder` and `ActionDispatch::MiddlewareStack`
|
@@ -23,14 +23,6 @@ module Vagrant
|
|
23
23
|
instance_eval(&block) if block_given?
|
24
24
|
end
|
25
25
|
|
26
|
-
# Returns the current stack of middlewares. You probably won't
|
27
|
-
# need to use this directly, and it's recommended that you don't.
|
28
|
-
#
|
29
|
-
# @return [Array]
|
30
|
-
def stack
|
31
|
-
@stack ||= []
|
32
|
-
end
|
33
|
-
|
34
26
|
# Returns a mergeable version of the builder. If `use` is called with
|
35
27
|
# the return value of this method, then the stack will merge, instead
|
36
28
|
# of being treated as a separate single middleware.
|
@@ -46,10 +38,12 @@ module Vagrant
|
|
46
38
|
#
|
47
39
|
# @param [Class] middleware The middleware class
|
48
40
|
def use(middleware, *args, &block)
|
49
|
-
if
|
50
|
-
|
51
|
-
self.use(Env::Set,
|
41
|
+
# Prepend with a environment setter if args are given
|
42
|
+
if !args.empty? && args.first.is_a?(Hash) && middleware != Env::Set
|
43
|
+
self.use(Env::Set, args.shift, &block)
|
44
|
+
end
|
52
45
|
|
46
|
+
if middleware.kind_of?(Builder)
|
53
47
|
# Merge in the other builder's stack into our own
|
54
48
|
self.stack.concat(middleware.stack)
|
55
49
|
else
|
@@ -75,9 +69,9 @@ module Vagrant
|
|
75
69
|
insert(index + 1, middleware, *args, &block)
|
76
70
|
end
|
77
71
|
|
78
|
-
#
|
72
|
+
# Replaces the given middlware object or index with the new
|
79
73
|
# middleware.
|
80
|
-
def
|
74
|
+
def replace(index, middleware, *args, &block)
|
81
75
|
if index.is_a?(Integer)
|
82
76
|
delete(index)
|
83
77
|
insert(index, middleware, *args, &block)
|
@@ -93,6 +87,13 @@ module Vagrant
|
|
93
87
|
stack.delete_at(index)
|
94
88
|
end
|
95
89
|
|
90
|
+
# Runs the builder stack with the given environment.
|
91
|
+
def call(env)
|
92
|
+
to_app(env).call(env)
|
93
|
+
end
|
94
|
+
|
95
|
+
protected
|
96
|
+
|
96
97
|
# Returns the numeric index for the given middleware object.
|
97
98
|
#
|
98
99
|
# @param [Object] object The item to find the index for
|
@@ -105,6 +106,14 @@ module Vagrant
|
|
105
106
|
nil
|
106
107
|
end
|
107
108
|
|
109
|
+
# Returns the current stack of middlewares. You probably won't
|
110
|
+
# need to use this directly, and it's recommended that you don't.
|
111
|
+
#
|
112
|
+
# @return [Array]
|
113
|
+
def stack
|
114
|
+
@stack ||= []
|
115
|
+
end
|
116
|
+
|
108
117
|
# Converts the builder stack to a runnable action sequence.
|
109
118
|
#
|
110
119
|
# @param [Vagrant::Action::Environment] env The action environment
|
@@ -114,11 +123,6 @@ module Vagrant
|
|
114
123
|
# and predictable behavior upon exceptions.
|
115
124
|
Warden.new(stack.dup, env)
|
116
125
|
end
|
117
|
-
|
118
|
-
# Runs the builder stack with the given environment.
|
119
|
-
def call(env)
|
120
|
-
to_app(env).call(env)
|
121
|
-
end
|
122
126
|
end
|
123
127
|
end
|
124
128
|
end
|