vagrantup 1.0.7 → 1.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/LICENSE +2 -2
- data/README.md +11 -13
- data/bin/vagrant +29 -5
- data/config/default.rb +14 -9
- data/contrib/bash/completion.sh +3 -0
- data/keys/README.md +3 -3
- data/lib/vagrant.rb +156 -102
- data/lib/vagrant/action.rb +26 -47
- data/lib/vagrant/action/builder.rb +49 -23
- data/lib/vagrant/action/builtin/box_add.rb +85 -0
- data/lib/vagrant/action/builtin/call.rb +67 -0
- data/lib/vagrant/action/builtin/config_validate.rb +30 -0
- data/lib/vagrant/action/builtin/confirm.rb +38 -0
- data/lib/vagrant/action/builtin/env_set.rb +24 -0
- data/lib/vagrant/action/builtin/graceful_halt.rb +73 -0
- data/lib/vagrant/action/builtin/handle_box_url.rb +43 -0
- data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +117 -0
- data/lib/vagrant/action/builtin/lock.rb +57 -0
- data/lib/vagrant/action/builtin/nfs.rb +117 -0
- data/lib/vagrant/action/builtin/provision.rb +70 -0
- data/lib/vagrant/action/builtin/set_hostname.rb +27 -0
- data/lib/vagrant/action/builtin/ssh_exec.rb +42 -0
- data/lib/vagrant/action/builtin/ssh_run.rb +43 -0
- data/lib/vagrant/action/general/package.rb +19 -18
- data/lib/vagrant/action/hook.rb +103 -0
- data/lib/vagrant/action/runner.rb +21 -5
- data/lib/vagrant/action/warden.rb +20 -9
- data/lib/vagrant/box.rb +75 -26
- data/lib/vagrant/box_collection.rb +301 -35
- data/lib/vagrant/cli.rb +20 -14
- data/lib/vagrant/config.rb +23 -9
- data/lib/vagrant/config/loader.rb +131 -36
- data/lib/vagrant/config/v1.rb +9 -0
- data/lib/vagrant/config/v1/dummy_config.rb +13 -0
- data/lib/vagrant/config/v1/loader.rb +105 -0
- data/lib/vagrant/config/v1/root.rb +60 -0
- data/lib/vagrant/config/v2.rb +9 -0
- data/lib/vagrant/config/v2/dummy_config.rb +13 -0
- data/lib/vagrant/config/v2/loader.rb +141 -0
- data/lib/vagrant/config/v2/root.rb +105 -0
- data/lib/vagrant/config/v2/util.rb +21 -0
- data/lib/vagrant/config/version_base.rb +80 -0
- data/lib/vagrant/downloaders/base.rb +0 -3
- data/lib/vagrant/downloaders/file.rb +10 -4
- data/lib/vagrant/downloaders/http.rb +29 -10
- data/lib/vagrant/environment.rb +447 -240
- data/lib/vagrant/errors.rb +138 -97
- data/lib/vagrant/hosts.rb +3 -12
- data/lib/vagrant/machine.rb +325 -0
- data/lib/vagrant/machine_state.rb +45 -0
- data/lib/vagrant/plugin.rb +3 -78
- data/lib/vagrant/plugin/v1.rb +19 -0
- data/lib/vagrant/plugin/v1/command.rb +169 -0
- data/lib/vagrant/plugin/v1/communicator.rb +98 -0
- data/lib/vagrant/plugin/v1/config.rb +112 -0
- data/lib/vagrant/plugin/v1/errors.rb +15 -0
- data/lib/vagrant/plugin/v1/guest.rb +92 -0
- data/lib/vagrant/plugin/v1/host.rb +66 -0
- data/lib/vagrant/plugin/v1/manager.rb +131 -0
- data/lib/vagrant/plugin/v1/plugin.rb +229 -0
- data/lib/vagrant/plugin/v1/provider.rb +68 -0
- data/lib/vagrant/plugin/v1/provisioner.rb +50 -0
- data/lib/vagrant/plugin/v2.rb +22 -0
- data/lib/vagrant/plugin/v2/command.rb +234 -0
- data/lib/vagrant/plugin/v2/communicator.rb +98 -0
- data/lib/vagrant/plugin/v2/components.rb +29 -0
- data/lib/vagrant/plugin/v2/config.rb +101 -0
- data/lib/vagrant/plugin/v2/errors.rb +15 -0
- data/lib/vagrant/plugin/v2/guest.rb +92 -0
- data/lib/vagrant/plugin/v2/host.rb +66 -0
- data/lib/vagrant/plugin/v2/manager.rb +158 -0
- data/lib/vagrant/plugin/v2/plugin.rb +217 -0
- data/lib/vagrant/plugin/v2/provider.rb +69 -0
- data/lib/vagrant/plugin/v2/provisioner.rb +47 -0
- data/lib/vagrant/registry.rb +43 -17
- data/lib/vagrant/ssh.rb +15 -9
- data/lib/vagrant/ui.rb +7 -5
- data/lib/vagrant/util/is_port_open.rb +1 -1
- data/lib/vagrant/util/platform.rb +19 -0
- data/lib/vagrant/util/retryable.rb +8 -2
- data/lib/vagrant/util/safe_exec.rb +2 -2
- data/lib/vagrant/util/scoped_hash_override.rb +45 -0
- data/lib/vagrant/util/ssh.rb +126 -0
- data/lib/vagrant/util/string_block_editor.rb +75 -0
- data/lib/vagrant/util/subprocess.rb +33 -10
- data/lib/vagrant/util/which.rb +43 -0
- data/lib/vagrant/version.rb +1 -1
- data/plugins/README.md +5 -0
- data/plugins/commands/box/command/add.rb +46 -0
- data/plugins/commands/box/command/list.rb +41 -0
- data/plugins/commands/box/command/remove.rb +37 -0
- data/plugins/commands/box/command/repackage.rb +43 -0
- data/plugins/commands/box/command/root.rb +75 -0
- data/plugins/commands/box/plugin.rb +15 -0
- data/plugins/commands/destroy/command.rb +31 -0
- data/plugins/commands/destroy/plugin.rb +18 -0
- data/plugins/commands/halt/command.rb +33 -0
- data/plugins/commands/halt/plugin.rb +18 -0
- data/{lib/vagrant/command/init.rb → plugins/commands/init/command.rb} +4 -4
- data/plugins/commands/init/plugin.rb +18 -0
- data/plugins/commands/package/command.rb +83 -0
- data/plugins/commands/package/plugin.rb +18 -0
- data/plugins/commands/plugin/action.rb +52 -0
- data/plugins/commands/plugin/action/bundler_check.rb +25 -0
- data/plugins/commands/plugin/action/install_gem.rb +70 -0
- data/plugins/commands/plugin/action/license_plugin.rb +54 -0
- data/plugins/commands/plugin/action/list_plugins.rb +54 -0
- data/plugins/commands/plugin/action/prune_gems.rb +149 -0
- data/plugins/commands/plugin/action/uninstall_plugin.rb +23 -0
- data/plugins/commands/plugin/command/base.rb +22 -0
- data/plugins/commands/plugin/command/install.rb +39 -0
- data/plugins/commands/plugin/command/license.rb +31 -0
- data/plugins/commands/plugin/command/list.rb +28 -0
- data/plugins/commands/plugin/command/root.rb +75 -0
- data/plugins/commands/plugin/command/uninstall.rb +28 -0
- data/plugins/commands/plugin/gem_helper.rb +74 -0
- data/plugins/commands/plugin/plugin.rb +22 -0
- data/plugins/commands/plugin/state_file.rb +57 -0
- data/plugins/commands/provision/command.rb +34 -0
- data/plugins/commands/provision/plugin.rb +18 -0
- data/plugins/commands/reload/command.rb +37 -0
- data/plugins/commands/reload/plugin.rb +18 -0
- data/plugins/commands/resume/command.rb +25 -0
- data/plugins/commands/resume/plugin.rb +17 -0
- data/{lib/vagrant/command/ssh.rb → plugins/commands/ssh/command.rb} +17 -41
- data/plugins/commands/ssh/plugin.rb +17 -0
- data/{lib/vagrant/command/ssh_config.rb → plugins/commands/ssh_config/command.rb} +14 -16
- data/plugins/commands/ssh_config/plugin.rb +18 -0
- data/plugins/commands/status/command.rb +39 -0
- data/plugins/commands/status/plugin.rb +18 -0
- data/plugins/commands/suspend/command.rb +25 -0
- data/plugins/commands/suspend/plugin.rb +18 -0
- data/plugins/commands/up/command.rb +45 -0
- data/plugins/commands/up/plugin.rb +17 -0
- data/{lib/vagrant/command → plugins/commands/up}/start_mixins.rb +6 -6
- data/{lib/vagrant/communication/ssh.rb → plugins/communicators/ssh/communicator.rb} +139 -52
- data/plugins/communicators/ssh/plugin.rb +19 -0
- data/plugins/guests/arch/guest.rb +41 -0
- data/plugins/guests/arch/plugin.rb +15 -0
- data/{lib/vagrant/guest/debian.rb → plugins/guests/debian/guest.rb} +21 -13
- data/plugins/guests/debian/plugin.rb +15 -0
- data/{lib/vagrant/guest/fedora.rb → plugins/guests/fedora/guest.rb} +19 -14
- data/plugins/guests/fedora/plugin.rb +15 -0
- data/plugins/guests/freebsd/config.rb +13 -0
- data/plugins/guests/freebsd/guest.rb +70 -0
- data/plugins/guests/freebsd/plugin.rb +20 -0
- data/plugins/guests/gentoo/guest.rb +51 -0
- data/plugins/guests/gentoo/plugin.rb +15 -0
- data/plugins/guests/linux/config.rb +13 -0
- data/{lib/vagrant/guest/linux.rb → plugins/guests/linux/guest.rb} +35 -34
- data/plugins/guests/linux/plugin.rb +20 -0
- data/plugins/guests/openbsd/guest.rb +13 -0
- data/plugins/guests/openbsd/plugin.rb +15 -0
- data/{lib/vagrant/guest/redhat.rb → plugins/guests/redhat/guest.rb} +22 -15
- data/plugins/guests/redhat/plugin.rb +15 -0
- data/plugins/guests/solaris/config.rb +18 -0
- data/plugins/guests/solaris/guest.rb +73 -0
- data/plugins/guests/solaris/plugin.rb +20 -0
- data/plugins/guests/suse/guest.rb +24 -0
- data/plugins/guests/suse/plugin.rb +15 -0
- data/plugins/guests/ubuntu/guest.rb +44 -0
- data/plugins/guests/ubuntu/plugin.rb +15 -0
- data/{lib/vagrant/hosts/arch.rb → plugins/hosts/arch/host.rb} +18 -5
- data/plugins/hosts/arch/plugin.rb +15 -0
- data/{lib/vagrant/hosts/bsd.rb → plugins/hosts/bsd/host.rb} +16 -11
- data/plugins/hosts/bsd/plugin.rb +15 -0
- data/{lib/vagrant/hosts/fedora.rb → plugins/hosts/fedora/host.rb} +8 -4
- data/plugins/hosts/fedora/plugin.rb +15 -0
- data/{lib/vagrant/hosts/freebsd.rb → plugins/hosts/freebsd/host.rb} +10 -8
- data/plugins/hosts/freebsd/plugin.rb +15 -0
- data/{lib/vagrant/hosts/gentoo.rb → plugins/hosts/gentoo/host.rb} +7 -3
- data/plugins/hosts/gentoo/plugin.rb +15 -0
- data/{lib/vagrant/hosts/linux.rb → plugins/hosts/linux/host.rb} +12 -11
- data/plugins/hosts/linux/plugin.rb +15 -0
- data/{lib/vagrant/hosts/opensuse.rb → plugins/hosts/opensuse/host.rb} +8 -4
- data/plugins/hosts/opensuse/plugin.rb +15 -0
- data/{lib/vagrant/hosts/windows.rb → plugins/hosts/windows/host.rb} +5 -4
- data/plugins/hosts/windows/plugin.rb +15 -0
- data/plugins/kernel_v1/config/nfs.rb +20 -0
- data/plugins/kernel_v1/config/package.rb +17 -0
- data/plugins/kernel_v1/config/ssh.rb +46 -0
- data/plugins/kernel_v1/config/vagrant.rb +31 -0
- data/plugins/kernel_v1/config/vm.rb +184 -0
- data/plugins/kernel_v1/plugin.rb +44 -0
- data/plugins/kernel_v2/config/nfs.rb +10 -0
- data/plugins/kernel_v2/config/package.rb +9 -0
- data/plugins/kernel_v2/config/ssh.rb +35 -0
- data/plugins/kernel_v2/config/vagrant.rb +9 -0
- data/plugins/kernel_v2/config/vm.rb +314 -0
- data/plugins/kernel_v2/config/vm_provisioner.rb +40 -0
- data/plugins/kernel_v2/config/vm_subvm.rb +30 -0
- data/plugins/kernel_v2/plugin.rb +44 -0
- data/plugins/providers/virtualbox/action.rb +308 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/boot.rb +12 -16
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/check_accessible.rb +5 -5
- data/plugins/providers/virtualbox/action/check_created.rb +21 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/check_guest_additions.rb +18 -11
- data/plugins/providers/virtualbox/action/check_running.rb +21 -0
- data/plugins/providers/virtualbox/action/check_virtualbox.rb +22 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/clean_machine_folder.rb +5 -5
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/clear_forwarded_ports.rb +4 -4
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/clear_network_interfaces.rb +4 -4
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/clear_shared_folders.rb +4 -5
- data/plugins/providers/virtualbox/action/created.rb +20 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/customize.rb +7 -7
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/destroy.rb +5 -5
- data/plugins/providers/virtualbox/action/destroy_confirm.rb +17 -0
- data/plugins/providers/virtualbox/action/destroy_unused_network_interfaces.rb +16 -0
- data/plugins/providers/virtualbox/action/discard_state.rb +20 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/export.rb +7 -7
- data/plugins/providers/virtualbox/action/forced_halt.rb +25 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/forward_ports.rb +29 -42
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/import.rb +15 -12
- data/plugins/providers/virtualbox/action/is_paused.rb +20 -0
- data/plugins/providers/virtualbox/action/is_running.rb +20 -0
- data/plugins/providers/virtualbox/action/is_saved.rb +20 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/match_mac_address.rb +5 -5
- data/plugins/providers/virtualbox/action/message_not_created.rb +16 -0
- data/plugins/providers/virtualbox/action/message_not_running.rb +16 -0
- data/plugins/providers/virtualbox/action/message_will_not_destroy.rb +17 -0
- data/plugins/providers/virtualbox/action/network.rb +366 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/package.rb +4 -7
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/package_vagrantfile.rb +5 -8
- data/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb +35 -0
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +51 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/prune_nfs_exports.rb +5 -5
- data/plugins/providers/virtualbox/action/resume.rb +25 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/sane_defaults.rb +41 -32
- data/plugins/providers/virtualbox/action/set_name.rb +40 -0
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/setup_package_files.rb +5 -8
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/share_folders.rb +24 -25
- data/{lib/vagrant/action/vm → plugins/providers/virtualbox/action}/suspend.rb +5 -5
- data/plugins/providers/virtualbox/config.rb +82 -0
- data/plugins/providers/virtualbox/driver/base.rb +344 -0
- data/plugins/providers/virtualbox/driver/meta.rb +142 -0
- data/plugins/providers/virtualbox/driver/version_4_0.rb +485 -0
- data/plugins/providers/virtualbox/driver/version_4_1.rb +485 -0
- data/plugins/providers/virtualbox/driver/version_4_2.rb +475 -0
- data/plugins/providers/virtualbox/model/forwarded_port.rb +58 -0
- data/plugins/providers/virtualbox/plugin.rb +42 -0
- data/plugins/providers/virtualbox/provider.rb +92 -0
- data/plugins/providers/virtualbox/util/compile_forwarded_ports.rb +31 -0
- data/plugins/provisioners/chef/config/base.rb +65 -0
- data/plugins/provisioners/chef/config/chef_client.rb +39 -0
- data/plugins/provisioners/chef/config/chef_solo.rb +87 -0
- data/plugins/provisioners/chef/plugin.rb +33 -0
- data/plugins/provisioners/chef/provisioner/base.rb +91 -0
- data/plugins/provisioners/chef/provisioner/chef_client.rb +103 -0
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +182 -0
- data/plugins/provisioners/puppet/config/puppet.rb +70 -0
- data/plugins/provisioners/puppet/config/puppet_server.rb +16 -0
- data/plugins/provisioners/puppet/plugin.rb +33 -0
- data/plugins/provisioners/puppet/provisioner/puppet.rb +110 -0
- data/plugins/provisioners/puppet/provisioner/puppet_server.rb +67 -0
- data/plugins/provisioners/shell/config.rb +46 -0
- data/plugins/provisioners/shell/plugin.rb +23 -0
- data/plugins/provisioners/shell/provisioner.rb +66 -0
- data/templates/commands/init/Vagrantfile.erb +33 -21
- data/templates/commands/ssh_config/config.erb +1 -0
- data/templates/config/messages.erb +14 -0
- data/templates/config/validation_failed.erb +3 -3
- data/templates/guests/arch/network_dhcp.erb +4 -7
- data/templates/guests/arch/network_static.erb +6 -7
- data/templates/guests/debian/network_dhcp.erb +5 -0
- data/templates/locales/en.yml +336 -100
- data/templates/rgloader.rb +9 -0
- data/test/acceptance/support/isolated_environment.rb +3 -2
- data/test/support/tempdir.rb +13 -4
- data/test/unit/base.rb +6 -0
- data/test/unit/support/dummy_provider.rb +16 -0
- data/test/unit/support/isolated_environment.rb +132 -0
- data/test/unit/support/shared/base_context.rb +74 -0
- data/test/unit/vagrant/action/builder_test.rb +88 -48
- data/test/unit/vagrant/action/builtin/call_test.rb +145 -0
- data/test/unit/vagrant/action/builtin/confirm_test.rb +36 -0
- data/test/unit/vagrant/action/builtin/env_set_test.rb +20 -0
- data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +61 -0
- data/test/unit/vagrant/action/builtin/lock_test.rb +98 -0
- data/test/unit/vagrant/action/builtin/ssh_exec_test.rb +57 -0
- data/test/unit/vagrant/action/hook_test.rb +101 -0
- data/test/unit/vagrant/action/runner_test.rb +15 -9
- data/test/unit/vagrant/box_collection_test.rb +219 -38
- data/test/unit/vagrant/box_test.rb +94 -19
- data/test/unit/vagrant/cli_test.rb +27 -0
- data/test/unit/vagrant/config/loader_test.rb +154 -49
- data/test/unit/vagrant/config/v1/dummy_config_test.rb +24 -0
- data/test/unit/vagrant/config/v1/loader_test.rb +145 -0
- data/test/unit/vagrant/config/v1/root_test.rb +40 -0
- data/test/unit/vagrant/config/v2/dummy_config_test.rb +24 -0
- data/test/unit/vagrant/config/v2/loader_test.rb +151 -0
- data/test/unit/vagrant/config/v2/root_test.rb +97 -0
- data/test/unit/vagrant/config/v2/util_test.rb +21 -0
- data/test/unit/vagrant/config_test.rb +40 -1
- data/test/unit/vagrant/downloaders/base_test.rb +0 -4
- data/test/unit/vagrant/downloaders/file_test.rb +21 -9
- data/test/unit/vagrant/downloaders/http_test.rb +4 -0
- data/test/unit/vagrant/environment_test.rb +414 -63
- data/test/unit/vagrant/hosts_test.rb +10 -9
- data/test/unit/vagrant/machine_state_test.rb +26 -0
- data/test/unit/vagrant/machine_test.rb +418 -0
- data/test/unit/vagrant/{command/base_test.rb → plugin/v1/command_test.rb} +2 -9
- data/test/unit/vagrant/plugin/v1/communicator_test.rb +9 -0
- data/test/unit/vagrant/plugin/v1/config_test.rb +50 -0
- data/test/unit/vagrant/plugin/v1/host_test.rb +5 -0
- data/test/unit/vagrant/plugin/v1/manager_test.rb +114 -0
- data/test/unit/vagrant/plugin/v1/plugin_test.rb +267 -0
- data/test/unit/vagrant/plugin/v1/provider_test.rb +18 -0
- data/test/unit/vagrant/plugin/v2/command_test.rb +238 -0
- data/test/unit/vagrant/plugin/v2/communicator_test.rb +9 -0
- data/test/unit/vagrant/plugin/v2/components_test.rb +17 -0
- data/test/unit/vagrant/plugin/v2/config_test.rb +60 -0
- data/test/unit/vagrant/plugin/v2/host_test.rb +5 -0
- data/test/unit/vagrant/plugin/v2/manager_test.rb +157 -0
- data/test/unit/vagrant/plugin/v2/plugin_test.rb +287 -0
- data/test/unit/vagrant/plugin/v2/provider_test.rb +18 -0
- data/test/unit/vagrant/registry_test.rb +59 -5
- data/test/unit/vagrant/util/scoped_hash_override_test.rb +48 -0
- data/test/unit/vagrant/util/ssh_test.rb +30 -0
- data/test/unit/vagrant/util/string_block_editor_test.rb +98 -0
- data/test/unit/vagrant/util/which_test.rb +43 -0
- data/test/unit/vagrant_test.rb +42 -13
- data/vagrant.gemspec +6 -7
- data/vagrant.gemspecbak +6 -7
- metadata +273 -358
- data/lib/vagrant/action/box/destroy.rb +0 -25
- data/lib/vagrant/action/box/download.rb +0 -84
- data/lib/vagrant/action/box/package.rb +0 -19
- data/lib/vagrant/action/box/unpackage.rb +0 -61
- data/lib/vagrant/action/box/verify.rb +0 -23
- data/lib/vagrant/action/builtin.rb +0 -171
- data/lib/vagrant/action/env/set.rb +0 -21
- data/lib/vagrant/action/environment.rb +0 -12
- data/lib/vagrant/action/general/check_virtualbox.rb +0 -28
- data/lib/vagrant/action/general/validate.rb +0 -18
- data/lib/vagrant/action/vm/check_box.rb +0 -33
- data/lib/vagrant/action/vm/check_port_collisions.rb +0 -89
- data/lib/vagrant/action/vm/default_name.rb +0 -22
- data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +0 -20
- data/lib/vagrant/action/vm/discard_state.rb +0 -22
- data/lib/vagrant/action/vm/halt.rb +0 -32
- data/lib/vagrant/action/vm/host_name.rb +0 -21
- data/lib/vagrant/action/vm/network.rb +0 -403
- data/lib/vagrant/action/vm/nfs.rb +0 -196
- data/lib/vagrant/action/vm/provision.rb +0 -61
- data/lib/vagrant/action/vm/provisioner_cleanup.rb +0 -26
- data/lib/vagrant/action/vm/resume.rb +0 -20
- data/lib/vagrant/command.rb +0 -24
- data/lib/vagrant/command/base.rb +0 -167
- data/lib/vagrant/command/box.rb +0 -58
- data/lib/vagrant/command/box_add.rb +0 -37
- data/lib/vagrant/command/box_list.rb +0 -28
- data/lib/vagrant/command/box_remove.rb +0 -27
- data/lib/vagrant/command/box_repackage.rb +0 -27
- data/lib/vagrant/command/destroy.rb +0 -64
- data/lib/vagrant/command/gem.rb +0 -39
- data/lib/vagrant/command/halt.rb +0 -39
- data/lib/vagrant/command/package.rb +0 -75
- data/lib/vagrant/command/provision.rb +0 -40
- data/lib/vagrant/command/reload.rb +0 -39
- data/lib/vagrant/command/resume.rb +0 -33
- data/lib/vagrant/command/status.rb +0 -36
- data/lib/vagrant/command/suspend.rb +0 -33
- data/lib/vagrant/command/up.rb +0 -40
- data/lib/vagrant/communication.rb +0 -7
- data/lib/vagrant/communication/base.rb +0 -56
- data/lib/vagrant/config/base.rb +0 -82
- data/lib/vagrant/config/error_recorder.rb +0 -19
- data/lib/vagrant/config/nfs.rb +0 -8
- data/lib/vagrant/config/package.rb +0 -7
- data/lib/vagrant/config/ssh.rb +0 -27
- data/lib/vagrant/config/top.rb +0 -72
- data/lib/vagrant/config/vagrant.rb +0 -14
- data/lib/vagrant/config/vm.rb +0 -168
- data/lib/vagrant/config/vm/provisioner.rb +0 -52
- data/lib/vagrant/config/vm/sub_vm.rb +0 -17
- data/lib/vagrant/data_store.rb +0 -92
- data/lib/vagrant/driver.rb +0 -8
- data/lib/vagrant/driver/virtualbox.rb +0 -134
- data/lib/vagrant/driver/virtualbox_4_0.rb +0 -459
- data/lib/vagrant/driver/virtualbox_4_1.rb +0 -459
- data/lib/vagrant/driver/virtualbox_4_2.rb +0 -606
- data/lib/vagrant/driver/virtualbox_base.rb +0 -326
- data/lib/vagrant/guest.rb +0 -18
- data/lib/vagrant/guest/arch.rb +0 -56
- data/lib/vagrant/guest/base.rb +0 -99
- data/lib/vagrant/guest/freebsd.rb +0 -86
- data/lib/vagrant/guest/gentoo.rb +0 -46
- data/lib/vagrant/guest/linux/config.rb +0 -19
- data/lib/vagrant/guest/linux/error.rb +0 -9
- data/lib/vagrant/guest/openbsd.rb +0 -20
- data/lib/vagrant/guest/solaris.rb +0 -118
- data/lib/vagrant/guest/suse.rb +0 -17
- data/lib/vagrant/guest/ubuntu.rb +0 -23
- data/lib/vagrant/hosts/base.rb +0 -66
- data/lib/vagrant/provisioners.rb +0 -12
- data/lib/vagrant/provisioners/base.rb +0 -44
- data/lib/vagrant/provisioners/chef.rb +0 -168
- data/lib/vagrant/provisioners/chef_client.rb +0 -132
- data/lib/vagrant/provisioners/chef_solo.rb +0 -234
- data/lib/vagrant/provisioners/puppet.rb +0 -176
- data/lib/vagrant/provisioners/puppet_server.rb +0 -78
- data/lib/vagrant/provisioners/shell.rb +0 -103
- data/lib/vagrant/vm.rb +0 -195
- data/test/buildbot/README.md +0 -72
- data/test/buildbot/buildbot_config/__init__.py +0 -0
- data/test/buildbot/buildbot_config/config/__init__.py +0 -0
- data/test/buildbot/buildbot_config/config/loader.py +0 -24
- data/test/buildbot/buildbot_config/config/master.py +0 -24
- data/test/buildbot/buildbot_config/config/slave.py +0 -22
- data/test/buildbot/buildbot_config/master/__init__.py +0 -6
- data/test/buildbot/buildbot_config/master/builders.py +0 -78
- data/test/buildbot/buildbot_config/master/buildsteps.py +0 -100
- data/test/buildbot/buildbot_config/master/change_sources.py +0 -8
- data/test/buildbot/buildbot_config/master/schedulers.py +0 -32
- data/test/buildbot/buildbot_config/master/slaves.py +0 -60
- data/test/buildbot/buildbot_config/master/status.py +0 -52
- data/test/buildbot/master/Makefile.sample +0 -28
- data/test/buildbot/master/buildbot.tac +0 -36
- data/test/buildbot/master/master.cfg +0 -67
- data/test/buildbot/master/public_html/bg_gradient.jpg +0 -0
- data/test/buildbot/master/public_html/default.css +0 -545
- data/test/buildbot/master/public_html/favicon.ico +0 -0
- data/test/buildbot/master/public_html/robots.txt +0 -10
- data/test/buildbot/master/public_html/static/css/bootstrap-1.4.0.min.css +0 -356
- data/test/buildbot/master/public_html/static/css/prettify.css +0 -97
- data/test/buildbot/master/public_html/static/css/syntax.css +0 -60
- data/test/buildbot/master/public_html/static/css/vagrant.base.css +0 -205
- data/test/buildbot/master/public_html/static/images/base_box_mac.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/getting-started/success.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/icons/error.png +0 -0
- data/test/buildbot/master/public_html/static/images/vagrant_chilling.png +0 -0
- data/test/buildbot/master/public_html/static/images/vagrant_holding.png +0 -0
- data/test/buildbot/master/public_html/static/images/vagrant_looking.png +0 -0
- data/test/buildbot/master/public_html/static/images/windows/alter_path.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/edit_path.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/environment_variables_button.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/port_and_ppk_path.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/ppk_selection.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/putty_first_screen.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/save_result.jpg +0 -0
- data/test/buildbot/master/public_html/static/images/windows/vbox_manage_default_location.jpg +0 -0
- data/test/buildbot/master/public_html/static/js/bootstrap-tabs.js +0 -80
- data/test/buildbot/master/public_html/static/js/jquery-1.7.min.js +0 -4
- data/test/buildbot/master/templates/authfail.html +0 -9
- data/test/buildbot/master/templates/build.html +0 -205
- data/test/buildbot/master/templates/builder.html +0 -118
- data/test/buildbot/master/templates/builders.html +0 -33
- data/test/buildbot/master/templates/buildslave.html +0 -72
- data/test/buildbot/master/templates/buildslaves.html +0 -70
- data/test/buildbot/master/templates/change.html +0 -15
- data/test/buildbot/master/templates/layouts/base.html +0 -58
- data/test/buildbot/master/templates/macros/box.html +0 -37
- data/test/buildbot/master/templates/macros/build_line.html +0 -50
- data/test/buildbot/master/templates/macros/change.html +0 -81
- data/test/buildbot/master/templates/macros/forms.html +0 -300
- data/test/buildbot/master/templates/root.html +0 -42
- data/test/buildbot/master/templates/waterfall.html +0 -53
- data/test/buildbot/requirements.txt +0 -4
- data/test/buildbot/scripts/deploy.sh +0 -38
- data/test/buildbot/scripts/setup.sh +0 -107
- data/test/buildbot/slave/buildbot.tac +0 -43
- data/test/buildbot/slave/info/admin +0 -1
- data/test/buildbot/slave/info/host +0 -1
- data/test/buildbot/tests/__init__.py +0 -0
- data/test/buildbot/tests/master/__init__.py +0 -0
- data/test/buildbot/tests/master/test_slaves.py +0 -41
- data/test/buildbot/vendor/choices-0.4.0.tar.gz +0 -0
- data/test/unit/vagrant/action/environment_test.rb +0 -16
- data/test/unit/vagrant/config/base_test.rb +0 -48
- data/test/unit/vagrant/config/ssh_test.rb +0 -17
- data/test/unit/vagrant/config/top_test.rb +0 -69
- data/test/unit/vagrant/config/vm_test.rb +0 -71
- data/test/unit/vagrant/data_store_test.rb +0 -79
- data/test/unit_legacy/locales/en.yml +0 -8
- data/test/unit_legacy/test_helper.rb +0 -32
- data/test/unit_legacy/vagrant/action/box/destroy_test.rb +0 -18
- data/test/unit_legacy/vagrant/action/box/download_test.rb +0 -125
- data/test/unit_legacy/vagrant/action/box/package_test.rb +0 -25
- data/test/unit_legacy/vagrant/action/box/unpackage_test.rb +0 -84
- data/test/unit_legacy/vagrant/action/box/verify_test.rb +0 -30
- data/test/unit_legacy/vagrant/action/env/set_test.rb +0 -24
- data/test/unit_legacy/vagrant/action/general/package_test.rb +0 -268
- data/test/unit_legacy/vagrant/action/general/validate_test.rb +0 -31
- data/test/unit_legacy/vagrant/action/vm/boot_test.rb +0 -66
- data/test/unit_legacy/vagrant/action/vm/check_accessible_test.rb +0 -61
- data/test/unit_legacy/vagrant/action/vm/check_box_test.rb +0 -61
- data/test/unit_legacy/vagrant/action/vm/check_guest_additions_test.rb +0 -9
- data/test/unit_legacy/vagrant/action/vm/clean_machine_folder_test.rb +0 -84
- data/test/unit_legacy/vagrant/action/vm/clear_forwarded_ports_test.rb +0 -52
- data/test/unit_legacy/vagrant/action/vm/clear_nfs_exports_test.rb +0 -22
- data/test/unit_legacy/vagrant/action/vm/clear_shared_folders_test.rb +0 -40
- data/test/unit_legacy/vagrant/action/vm/customize_test.rb +0 -37
- data/test/unit_legacy/vagrant/action/vm/destroy_test.rb +0 -25
- data/test/unit_legacy/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +0 -49
- data/test/unit_legacy/vagrant/action/vm/discard_state_test.rb +0 -45
- data/test/unit_legacy/vagrant/action/vm/export_test.rb +0 -107
- data/test/unit_legacy/vagrant/action/vm/forward_ports_helpers_test.rb +0 -77
- data/test/unit_legacy/vagrant/action/vm/forward_ports_test.rb +0 -197
- data/test/unit_legacy/vagrant/action/vm/halt_test.rb +0 -79
- data/test/unit_legacy/vagrant/action/vm/host_name_test.rb +0 -36
- data/test/unit_legacy/vagrant/action/vm/import_test.rb +0 -66
- data/test/unit_legacy/vagrant/action/vm/match_mac_address_test.rb +0 -40
- data/test/unit_legacy/vagrant/action/vm/modify_test.rb +0 -38
- data/test/unit_legacy/vagrant/action/vm/network_test.rb +0 -286
- data/test/unit_legacy/vagrant/action/vm/nfs_helpers_test.rb +0 -26
- data/test/unit_legacy/vagrant/action/vm/nfs_test.rb +0 -260
- data/test/unit_legacy/vagrant/action/vm/package_test.rb +0 -25
- data/test/unit_legacy/vagrant/action/vm/package_vagrantfile_test.rb +0 -46
- data/test/unit_legacy/vagrant/action/vm/provision_test.rb +0 -65
- data/test/unit_legacy/vagrant/action/vm/provisioner_cleanup_test.rb +0 -56
- data/test/unit_legacy/vagrant/action/vm/resume_test.rb +0 -35
- data/test/unit_legacy/vagrant/action/vm/share_folders_test.rb +0 -144
- data/test/unit_legacy/vagrant/action/vm/suspend_test.rb +0 -35
- data/test/unit_legacy/vagrant/action_test.rb +0 -89
- data/test/unit_legacy/vagrant/box_collection_test.rb +0 -45
- data/test/unit_legacy/vagrant/box_test.rb +0 -74
- data/test/unit_legacy/vagrant/cli_test.rb +0 -35
- data/test/unit_legacy/vagrant/command/base_test.rb +0 -23
- data/test/unit_legacy/vagrant/command/group_base_test.rb +0 -15
- data/test/unit_legacy/vagrant/command/helpers_test.rb +0 -88
- data/test/unit_legacy/vagrant/command/init_test.rb +0 -10
- data/test/unit_legacy/vagrant/command/package_test.rb +0 -27
- data/test/unit_legacy/vagrant/config/base_test.rb +0 -52
- data/test/unit_legacy/vagrant/config/error_recorder_test.rb +0 -18
- data/test/unit_legacy/vagrant/config/ssh_test.rb +0 -12
- data/test/unit_legacy/vagrant/config/vagrant_test.rb +0 -35
- data/test/unit_legacy/vagrant/config/vm/provisioner_test.rb +0 -92
- data/test/unit_legacy/vagrant/config/vm_test.rb +0 -47
- data/test/unit_legacy/vagrant/config_test.rb +0 -148
- data/test/unit_legacy/vagrant/downloaders/http_test.rb +0 -93
- data/test/unit_legacy/vagrant/environment_test.rb +0 -539
- data/test/unit_legacy/vagrant/errors_test.rb +0 -42
- data/test/unit_legacy/vagrant/hosts/base_test.rb +0 -46
- data/test/unit_legacy/vagrant/hosts/bsd_test.rb +0 -53
- data/test/unit_legacy/vagrant/hosts/linux_test.rb +0 -54
- data/test/unit_legacy/vagrant/plugin_test.rb +0 -9
- data/test/unit_legacy/vagrant/provisioners/base_test.rb +0 -63
- data/test/unit_legacy/vagrant/provisioners/chef_client_test.rb +0 -190
- data/test/unit_legacy/vagrant/provisioners/chef_solo_test.rb +0 -115
- data/test/unit_legacy/vagrant/provisioners/chef_test.rb +0 -209
- data/test/unit_legacy/vagrant/provisioners/puppet_server_test.rb +0 -68
- data/test/unit_legacy/vagrant/provisioners/puppet_test.rb +0 -182
- data/test/unit_legacy/vagrant/provisioners/shell_test.rb +0 -79
- data/test/unit_legacy/vagrant/ssh/session_test.rb +0 -40
- data/test/unit_legacy/vagrant/ssh_test.rb +0 -304
- data/test/unit_legacy/vagrant/systems/base_test.rb +0 -18
- data/test/unit_legacy/vagrant/systems/linux_test.rb +0 -104
- data/test/unit_legacy/vagrant/util/busy_test.rb +0 -106
- data/test/unit_legacy/vagrant/util/counter_test.rb +0 -29
- data/test/unit_legacy/vagrant/util/platform_test.rb +0 -18
- data/test/unit_legacy/vagrant/util/stacked_proc_runner_test.rb +0 -43
- data/test/unit_legacy/vagrant/util/template_renderer_test.rb +0 -145
- data/test/unit_legacy/vagrant/vm_test.rb +0 -300
- data/vagrant-1.1.4.gem +0 -0
- data/vagrantup-0.1.0.gem +0 -0
- data/vagrantup-0.1.1.gem +0 -0
- data/vagrantup-0.1.2.gem +0 -0
- data/vagrantup-0.1.3.gem +0 -0
- data/vagrantup-0.1.4.gem +0 -0
- data/vagrantup-0.2.0.gem +0 -0
- data/vagrantup-0.3.0.gem +0 -0
- data/vagrantup-0.3.1.gem +0 -0
- data/vagrantup-0.3.2.gem +0 -0
- data/vagrantup-0.3.3.gem +0 -0
- data/vagrantup-0.3.4.gem +0 -0
- data/vagrantup-0.4.0.gem +0 -0
- data/vagrantup-0.4.1.gem +0 -0
- data/vagrantup-0.4.3.dev.gem +0 -0
- data/vagrantup-0.5.0.gem +0 -0
- data/vagrantup-0.5.1.gem +0 -0
- data/vagrantup-0.5.2.gem +0 -0
- data/vagrantup-0.5.3.gem +0 -0
- data/vagrantup-0.5.4.gem +0 -0
- data/vagrantup-0.6.0.gem +0 -0
- data/vagrantup-0.6.1.gem +0 -0
- data/vagrantup-0.6.2.gem +0 -0
- data/vagrantup-0.6.3.gem +0 -0
- data/vagrantup-0.6.4.gem +0 -0
- data/vagrantup-0.6.5.gem +0 -0
- data/vagrantup-0.6.6.gem +0 -0
- data/vagrantup-0.6.7.gem +0 -0
- data/vagrantup-0.6.8.gem +0 -0
- data/vagrantup-0.6.9.gem +0 -0
- data/vagrantup-0.7.0.gem +0 -0
- data/vagrantup-0.7.1.gem +0 -0
- data/vagrantup-0.7.2.gem +0 -0
- data/vagrantup-0.7.3.gem +0 -0
- data/vagrantup-0.7.4.gem +0 -0
- data/vagrantup-0.7.5.gem +0 -0
- data/vagrantup-0.7.6.gem +0 -0
- data/vagrantup-0.7.7.gem +0 -0
- data/vagrantup-0.7.8.gem +0 -0
- data/vagrantup-0.8.0.gem +0 -0
- data/vagrantup-0.8.1.gem +0 -0
- data/vagrantup-0.8.10.gem +0 -0
- data/vagrantup-0.8.2.gem +0 -0
- data/vagrantup-0.8.3.gem +0 -0
- data/vagrantup-0.8.4.gem +0 -0
- data/vagrantup-0.8.5.gem +0 -0
- data/vagrantup-0.8.6.gem +0 -0
- data/vagrantup-0.8.7.gem +0 -0
- data/vagrantup-0.8.8.gem +0 -0
- data/vagrantup-0.8.9.gem +0 -0
- data/vagrantup-0.9.0.gem +0 -0
- data/vagrantup-0.9.1.gem +0 -0
- data/vagrantup-0.9.2.gem +0 -0
- data/vagrantup-0.9.3.gem +0 -0
- data/vagrantup-0.9.4.gem +0 -0
- data/vagrantup-0.9.5.gem +0 -0
- data/vagrantup-0.9.6.gem +0 -0
- data/vagrantup-0.9.7.gem +0 -0
- data/vagrantup-0.9.99.1.gem +0 -0
- data/vagrantup-0.9.99.2.gem +0 -0
- data/vagrantup-1.0.0.gem +0 -0
- data/vagrantup-1.0.1.gem +0 -0
- data/vagrantup-1.0.2.gem +0 -0
- data/vagrantup-1.0.3.gem +0 -0
- data/vagrantup-1.0.4.gem +0 -0
- data/vagrantup-1.0.5.gem +0 -0
- data/vagrantup-1.0.6.gem +0 -0
- data/vagrantup-1.1.4.gem +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
require 'vagrant/util/template_renderer'
|
|
2
|
-
|
|
3
|
-
module Vagrant
|
|
4
|
-
module Guest
|
|
5
|
-
# A general Vagrant system implementation for "freebsd".
|
|
6
|
-
#
|
|
7
|
-
# Contributed by Kenneth Vestergaard <kvs@binarysolutions.dk>
|
|
8
|
-
class FreeBSD < Base
|
|
9
|
-
# A custom config class which will be made accessible via `config.freebsd`
|
|
10
|
-
# This is not necessary for all system implementers, of course. However,
|
|
11
|
-
# generally, Vagrant tries to make almost every aspect of its execution
|
|
12
|
-
# configurable, and this assists that goal.
|
|
13
|
-
class FreeBSDConfig < Vagrant::Config::Base
|
|
14
|
-
attr_accessor :halt_timeout
|
|
15
|
-
attr_accessor :halt_check_interval
|
|
16
|
-
|
|
17
|
-
def initialize
|
|
18
|
-
@halt_timeout = 30
|
|
19
|
-
@halt_check_interval = 1
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
# Here for whenever it may be used.
|
|
24
|
-
class FreeBSDError < Errors::VagrantError
|
|
25
|
-
error_namespace("vagrant.guest.freebsd")
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def halt
|
|
29
|
-
vm.channel.sudo("shutdown -p now")
|
|
30
|
-
|
|
31
|
-
# Wait until the VM's state is actually powered off. If this doesn't
|
|
32
|
-
# occur within a reasonable amount of time (15 seconds by default),
|
|
33
|
-
# then simply return and allow Vagrant to kill the machine.
|
|
34
|
-
count = 0
|
|
35
|
-
while vm.state != :poweroff
|
|
36
|
-
count += 1
|
|
37
|
-
|
|
38
|
-
return if count >= vm.config.freebsd.halt_timeout
|
|
39
|
-
sleep vm.config.freebsd.halt_check_interval
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# TODO: vboxsf is currently unsupported in FreeBSD, if you are able to
|
|
44
|
-
# help out with this project, please contact vbox@FreeBSD.org
|
|
45
|
-
#
|
|
46
|
-
# See: http://wiki.freebsd.org/VirtualBox/ToDo
|
|
47
|
-
# def mount_shared_folder(ssh, name, guestpath)
|
|
48
|
-
# ssh.exec!("sudo mkdir -p #{guestpath}")
|
|
49
|
-
# # Using a custom mount method here; could use improvement.
|
|
50
|
-
# ssh.exec!("sudo mount -t vboxfs v-root #{guestpath}")
|
|
51
|
-
# ssh.exec!("sudo chown #{vm.config.ssh.username} #{guestpath}")
|
|
52
|
-
# end
|
|
53
|
-
|
|
54
|
-
def mount_nfs(ip, folders)
|
|
55
|
-
folders.each do |name, opts|
|
|
56
|
-
vm.channel.sudo("mkdir -p #{opts[:guestpath]}")
|
|
57
|
-
vm.channel.sudo("mount #{ip}:#{opts[:hostpath]} #{opts[:guestpath]}")
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def configure_networks(networks)
|
|
62
|
-
# Remove any previous network additions to the configuration file.
|
|
63
|
-
vm.channel.sudo("sed -i '' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.conf")
|
|
64
|
-
|
|
65
|
-
networks.each do |network|
|
|
66
|
-
entry = TemplateRenderer.render("guests/freebsd/network_#{network[:type]}",
|
|
67
|
-
:options => network)
|
|
68
|
-
vm.channel.upload(StringIO.new(entry), "/tmp/vagrant-network-entry")
|
|
69
|
-
vm.channel.sudo("su -m root -c 'cat /tmp/vagrant-network-entry >> /etc/rc.conf'")
|
|
70
|
-
if network[:type].to_sym == :static
|
|
71
|
-
vm.channel.sudo("ifconfig em#{network[:interface]} inet #{network[:ip]} netmask #{network[:netmask]}")
|
|
72
|
-
elsif network[:type].to_sym == :dhcp
|
|
73
|
-
vm.channel.sudo("dhclient em#{network[:interface]}")
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def change_host_name(name)
|
|
79
|
-
if !vm.channel.test("hostname -f | grep '^#{name}$' || hostname -s | grep '^#{name}$'")
|
|
80
|
-
vm.channel.sudo("sed -i '' 's/^hostname=.*$/hostname=#{name}/' /etc/rc.conf")
|
|
81
|
-
vm.channel.sudo("hostname #{name}")
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
data/lib/vagrant/guest/gentoo.rb
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
require 'tempfile'
|
|
2
|
-
|
|
3
|
-
require 'vagrant/util/template_renderer'
|
|
4
|
-
|
|
5
|
-
module Vagrant
|
|
6
|
-
module Guest
|
|
7
|
-
class Gentoo < Linux
|
|
8
|
-
# Make the TemplateRenderer top-level
|
|
9
|
-
include Vagrant::Util
|
|
10
|
-
|
|
11
|
-
def configure_networks(networks)
|
|
12
|
-
# Remove any previous host only network additions to the interface file
|
|
13
|
-
vm.channel.sudo("sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/conf.d/net > /tmp/vagrant-network-interfaces")
|
|
14
|
-
vm.channel.sudo("cat /tmp/vagrant-network-interfaces > /etc/conf.d/net")
|
|
15
|
-
|
|
16
|
-
# Configure each network interface
|
|
17
|
-
networks.each do |network|
|
|
18
|
-
entry = TemplateRenderer.render("guests/gentoo/network_#{network[:type]}",
|
|
19
|
-
:options => network)
|
|
20
|
-
|
|
21
|
-
# Upload the entry to a temporary location
|
|
22
|
-
temp = Tempfile.new("vagrant")
|
|
23
|
-
temp.binmode
|
|
24
|
-
temp.write(entry)
|
|
25
|
-
temp.close
|
|
26
|
-
|
|
27
|
-
vm.channel.upload(temp.path, "/tmp/vagrant-network-entry")
|
|
28
|
-
|
|
29
|
-
# Configure the interface
|
|
30
|
-
vm.channel.sudo("ln -fs /etc/init.d/net.lo /etc/init.d/net.eth#{network[:interface]}")
|
|
31
|
-
vm.channel.sudo("/etc/init.d/net.eth#{network[:interface]} stop 2> /dev/null")
|
|
32
|
-
vm.channel.sudo("cat /tmp/vagrant-network-entry >> /etc/conf.d/net")
|
|
33
|
-
vm.channel.sudo("/etc/init.d/net.eth#{network[:interface]} start")
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def change_host_name(name)
|
|
38
|
-
if !vm.channel.test("sudo hostname --fqdn | grep '#{name}'")
|
|
39
|
-
vm.channel.sudo("echo 'hostname=#{name.split('.')[0]}' > /etc/conf.d/hostname")
|
|
40
|
-
vm.channel.sudo("sed -i 's@^\\(127[.]0[.]1[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
|
|
41
|
-
vm.channel.sudo("hostname #{name.split('.')[0]}")
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Guest
|
|
3
|
-
class Linux < Vagrant::Guest::Base
|
|
4
|
-
# A custom config class which will be made accessible via `config.linux`
|
|
5
|
-
# This is not necessary for all system implementers, of course. However,
|
|
6
|
-
# generally, Vagrant tries to make almost every aspect of its execution
|
|
7
|
-
# configurable, and this assists that goal.
|
|
8
|
-
class LinuxConfig < Vagrant::Config::Base
|
|
9
|
-
attr_accessor :halt_timeout
|
|
10
|
-
attr_accessor :halt_check_interval
|
|
11
|
-
|
|
12
|
-
def initialize
|
|
13
|
-
@halt_timeout = 30
|
|
14
|
-
@halt_check_interval = 1
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Guest
|
|
3
|
-
class OpenBSD < Base
|
|
4
|
-
def halt
|
|
5
|
-
vm.channel.sudo("shutdown -p -h now")
|
|
6
|
-
|
|
7
|
-
# Wait until the VM's state is actually powered off. If this doesn't
|
|
8
|
-
# occur within a reasonable amount of time then simply return which
|
|
9
|
-
# will cause Vagrant to force kill the machine.
|
|
10
|
-
count = 0
|
|
11
|
-
while vm.state != :poweroff
|
|
12
|
-
count += 1
|
|
13
|
-
|
|
14
|
-
return if count >= 30
|
|
15
|
-
sleep 1
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Guest
|
|
3
|
-
# A general Vagrant system implementation for "solaris".
|
|
4
|
-
#
|
|
5
|
-
# Contributed by Blake Irvin <b.irvin@modcloth.com>
|
|
6
|
-
class Solaris < Base
|
|
7
|
-
# A custom config class which will be made accessible via `config.solaris`
|
|
8
|
-
# This is not necessary for all system implementers, of course. However,
|
|
9
|
-
# generally, Vagrant tries to make almost every aspect of its execution
|
|
10
|
-
# configurable, and this assists that goal.
|
|
11
|
-
class SolarisConfig < Vagrant::Config::Base
|
|
12
|
-
attr_accessor :halt_timeout
|
|
13
|
-
attr_accessor :halt_check_interval
|
|
14
|
-
# This sets the command to use to execute items as a superuser. sudo is default
|
|
15
|
-
attr_accessor :suexec_cmd
|
|
16
|
-
attr_accessor :device
|
|
17
|
-
|
|
18
|
-
def initialize
|
|
19
|
-
@halt_timeout = 30
|
|
20
|
-
@halt_check_interval = 1
|
|
21
|
-
@suexec_cmd = 'sudo'
|
|
22
|
-
@device = "e1000g"
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Here for whenever it may be used.
|
|
27
|
-
class SolarisError < Errors::VagrantError
|
|
28
|
-
error_namespace("vagrant.guest.solaris")
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def configure_networks(networks)
|
|
32
|
-
networks.each do |network|
|
|
33
|
-
device = "#{vm.config.solaris.device}#{network[:interface]}"
|
|
34
|
-
su_cmd = vm.config.solaris.suexec_cmd
|
|
35
|
-
ifconfig_cmd = "#{su_cmd} /sbin/ifconfig #{device}"
|
|
36
|
-
|
|
37
|
-
vm.channel.execute("#{ifconfig_cmd} plumb")
|
|
38
|
-
|
|
39
|
-
if network[:type].to_sym == :static
|
|
40
|
-
vm.channel.execute("#{ifconfig_cmd} inet #{network[:ip]} netmask #{network[:netmask]}")
|
|
41
|
-
vm.channel.execute("#{ifconfig_cmd} up")
|
|
42
|
-
vm.channel.execute("#{su_cmd} sh -c \"echo '#{network[:ip]}' > /etc/hostname.#{device}\"")
|
|
43
|
-
elsif network[:type].to_sym == :dhcp
|
|
44
|
-
vm.channel.execute("#{ifconfig_cmd} dhcp start")
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def change_host_name(name)
|
|
50
|
-
su_cmd = vm.config.solaris.suexec_cmd
|
|
51
|
-
|
|
52
|
-
# Only do this if the hostname is not already set
|
|
53
|
-
if !vm.channel.test("#{su_cmd} hostname | grep '#{name}'")
|
|
54
|
-
vm.channel.execute("#{su_cmd} sh -c \"echo '#{name}' > /etc/nodename\"")
|
|
55
|
-
vm.channel.execute("#{su_cmd} uname -S #{name}")
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# There should be an exception raised if the line
|
|
60
|
-
#
|
|
61
|
-
# vagrant::::profiles=Primary Administrator
|
|
62
|
-
#
|
|
63
|
-
# does not exist in /etc/user_attr. TODO
|
|
64
|
-
def halt
|
|
65
|
-
# Wait until the VM's state is actually powered off. If this doesn't
|
|
66
|
-
# occur within a reasonable amount of time (15 seconds by default),
|
|
67
|
-
# then simply return and allow Vagrant to kill the machine.
|
|
68
|
-
count = 0
|
|
69
|
-
last_error = nil
|
|
70
|
-
while vm.state != :poweroff
|
|
71
|
-
begin
|
|
72
|
-
vm.channel.execute("#{vm.config.solaris.suexec_cmd} /usr/sbin/poweroff")
|
|
73
|
-
rescue IOError => e
|
|
74
|
-
# Save the last error; if it's not shutdown in a reasonable amount
|
|
75
|
-
# of attempts we will re-raise the error so it's not hidden for
|
|
76
|
-
# all time
|
|
77
|
-
last_error = e
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
count += 1
|
|
81
|
-
if count >= vm.config.solaris.halt_timeout
|
|
82
|
-
# Check for last error and re-raise it
|
|
83
|
-
if last_error != nil
|
|
84
|
-
raise last_error
|
|
85
|
-
else
|
|
86
|
-
# Otherwise, just return
|
|
87
|
-
return
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Still opportunities remaining; sleep and loop
|
|
92
|
-
sleep vm.config.solaris.halt_check_interval
|
|
93
|
-
end # while
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def mount_shared_folder(name, guestpath, options)
|
|
97
|
-
# These are just far easier to use than the full options syntax
|
|
98
|
-
owner = options[:owner]
|
|
99
|
-
group = options[:group]
|
|
100
|
-
|
|
101
|
-
# Create the shared folder
|
|
102
|
-
vm.channel.execute("#{vm.config.solaris.suexec_cmd} mkdir -p #{guestpath}")
|
|
103
|
-
|
|
104
|
-
# We have to use this `id` command instead of `/usr/bin/id` since this
|
|
105
|
-
# one accepts the "-u" and "-g" flags.
|
|
106
|
-
id_cmd = "/usr/xpg4/bin/id"
|
|
107
|
-
|
|
108
|
-
# Mount the folder with the proper owner/group
|
|
109
|
-
mount_options = "-o uid=`#{id_cmd} -u #{owner}`,gid=`#{id_cmd} -g #{group}`"
|
|
110
|
-
mount_options += ",#{options[:extra]}" if options[:extra]
|
|
111
|
-
vm.channel.execute("#{vm.config.solaris.suexec_cmd} /sbin/mount -F vboxfs #{mount_options} #{name} #{guestpath}")
|
|
112
|
-
|
|
113
|
-
# chown the folder to the proper owner/group
|
|
114
|
-
vm.channel.execute("#{vm.config.solaris.suexec_cmd} chown `#{id_cmd} -u #{owner}`:`#{id_cmd} -g #{group}` #{guestpath}")
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
end
|
data/lib/vagrant/guest/suse.rb
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Guest
|
|
3
|
-
class Suse < Redhat
|
|
4
|
-
def network_scripts_dir
|
|
5
|
-
'/etc/sysconfig/network/'
|
|
6
|
-
end
|
|
7
|
-
def change_host_name(name)
|
|
8
|
-
# Only do this if the hostname is not already set
|
|
9
|
-
if !vm.channel.test("sudo hostname | grep '#{name}'")
|
|
10
|
-
vm.channel.sudo("echo #{name} > /etc/HOSTNAME")
|
|
11
|
-
vm.channel.sudo("hostname #{name}")
|
|
12
|
-
vm.channel.sudo("sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
data/lib/vagrant/guest/ubuntu.rb
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
require 'vagrant/guest/debian'
|
|
2
|
-
|
|
3
|
-
module Vagrant
|
|
4
|
-
module Guest
|
|
5
|
-
class Ubuntu < Debian
|
|
6
|
-
def mount_shared_folder(name, guestpath, options)
|
|
7
|
-
# Mount it like normal
|
|
8
|
-
super
|
|
9
|
-
|
|
10
|
-
# Emit an upstart event if upstart is available
|
|
11
|
-
vm.channel.sudo("[ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=#{guestpath}")
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def change_host_name(name)
|
|
15
|
-
if !vm.channel.test("sudo hostname | grep '^#{name}$'")
|
|
16
|
-
vm.channel.sudo("sed -i 's/.*$/#{name}/' /etc/hostname")
|
|
17
|
-
vm.channel.sudo("sed -i 's@^\\(127[.]0[.]1[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
|
|
18
|
-
vm.channel.sudo("service hostname start")
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
data/lib/vagrant/hosts/base.rb
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Hosts
|
|
3
|
-
# Interface for classes which house behavior that is specific
|
|
4
|
-
# to the host OS that is running Vagrant.
|
|
5
|
-
#
|
|
6
|
-
# By default, Vagrant will attempt to choose the best option
|
|
7
|
-
# for your machine, but the host may also be explicitly set
|
|
8
|
-
# via the `config.vagrant.host` parameter.
|
|
9
|
-
class Base
|
|
10
|
-
# This returns true/false depending on if the current running system
|
|
11
|
-
# matches the host class.
|
|
12
|
-
#
|
|
13
|
-
# @return [Boolean]
|
|
14
|
-
def self.match?
|
|
15
|
-
nil
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# The precedence of the host when checking for matches. This is to
|
|
19
|
-
# allow certain host such as generic OS's ("Linux", "BSD", etc.)
|
|
20
|
-
# to be specified last.
|
|
21
|
-
#
|
|
22
|
-
# The hosts with the higher numbers will be checked first.
|
|
23
|
-
#
|
|
24
|
-
# If you're implementing a basic host, you can probably ignore this.
|
|
25
|
-
def self.precedence
|
|
26
|
-
5
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Initializes a new host class.
|
|
30
|
-
#
|
|
31
|
-
# The only required parameter is a UI object so that the host
|
|
32
|
-
# objects have some way to communicate with the outside world.
|
|
33
|
-
#
|
|
34
|
-
# @param [UI] ui UI for the hosts to output to.
|
|
35
|
-
def initialize(ui)
|
|
36
|
-
@ui = ui
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# Returns true of false denoting whether or not this host supports
|
|
40
|
-
# NFS shared folder setup. This method ideally should verify that
|
|
41
|
-
# NFS is installed.
|
|
42
|
-
#
|
|
43
|
-
# @return [Boolean]
|
|
44
|
-
def nfs?
|
|
45
|
-
false
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# Exports the given hash of folders via NFS.
|
|
49
|
-
#
|
|
50
|
-
# @param [String] id A unique ID that is guaranteed to be unique to
|
|
51
|
-
# match these sets of folders.
|
|
52
|
-
# @param [String] ip IP of the guest machine.
|
|
53
|
-
# @param [Hash] folders Shared folders to sync.
|
|
54
|
-
def nfs_export(id, ip, folders)
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Prunes any NFS exports made by Vagrant which aren't in the set
|
|
58
|
-
# of valid ids given.
|
|
59
|
-
#
|
|
60
|
-
# @param [Array<String>] valid_ids Valid IDs that should not be
|
|
61
|
-
# pruned.
|
|
62
|
-
def nfs_prune(valid_ids)
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
data/lib/vagrant/provisioners.rb
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# These aren't autoloaded because they have to register things such
|
|
2
|
-
# as configuration classes right away with Vagrant.
|
|
3
|
-
module Vagrant
|
|
4
|
-
module Provisioners
|
|
5
|
-
autoload :Base, 'vagrant/provisioners/base'
|
|
6
|
-
autoload :ChefSolo, 'vagrant/provisioners/chef_solo'
|
|
7
|
-
autoload :ChefClient, 'vagrant/provisioners/chef_client'
|
|
8
|
-
autoload :Puppet, 'vagrant/provisioners/puppet'
|
|
9
|
-
autoload :PuppetServer, 'vagrant/provisioners/puppet_server'
|
|
10
|
-
autoload :Shell, 'vagrant/provisioners/shell'
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Provisioners
|
|
3
|
-
# The base class for a "provisioner." A provisioner is responsible for
|
|
4
|
-
# provisioning a Vagrant system.
|
|
5
|
-
#
|
|
6
|
-
# This has been abstracted out so it is easy to provide support for
|
|
7
|
-
# multiple solutions.
|
|
8
|
-
class Base
|
|
9
|
-
include Vagrant::Util
|
|
10
|
-
|
|
11
|
-
# The environment which provisioner is running in. This is the
|
|
12
|
-
# action environment, not a Vagrant::Environment.
|
|
13
|
-
attr_reader :env
|
|
14
|
-
|
|
15
|
-
# The configuration for this provisioner. This will be an instance of
|
|
16
|
-
# the `Config` class which is part of the provisioner.
|
|
17
|
-
attr_reader :config
|
|
18
|
-
|
|
19
|
-
def initialize(env, config)
|
|
20
|
-
@env = env
|
|
21
|
-
@config = config
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# This method is expected to return a class that is used for configuration
|
|
25
|
-
# for the provisioner.
|
|
26
|
-
def self.config_class; end
|
|
27
|
-
|
|
28
|
-
# This is the method called to "prepare" the provisioner. This is called
|
|
29
|
-
# before any actions are run by the action runner (see {Vagrant::Actions::Runner}).
|
|
30
|
-
# This can be used to setup shared folders, forward ports, etc. Whatever is
|
|
31
|
-
# necessary on a "meta" level.
|
|
32
|
-
def prepare; end
|
|
33
|
-
|
|
34
|
-
# This is the method called to provision the system. This method
|
|
35
|
-
# is expected to do whatever necessary to provision the system (create files,
|
|
36
|
-
# SSH, etc.)
|
|
37
|
-
def provision!; end
|
|
38
|
-
|
|
39
|
-
# This is the method called to when the system is being destroyed
|
|
40
|
-
# and allows the provisioners to engage in any cleanup tasks necessary.
|
|
41
|
-
def cleanup; end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|