Commit Graph

4880 Commits

Author SHA1 Message Date
Mitchell Hashimoto 9a419c3f63 Merge pull request #2784 from mitchellh/f-host-capabilities
Host Capabilities
2014-01-08 08:54:26 -08:00
Teemu Matilainen 64ea647e09 provisioners/chef-solo: Fix copy&paste "Puppet" from a deprecation message 2014-01-08 13:27:35 -03:00
Mitchell Hashimoto eb6488d89b website/docs: document host capabilities 2014-01-07 21:31:17 -08:00
Mitchell Hashimoto e2af545182 kernel/v2: a host always exists, remove dumb check 2014-01-07 21:20:28 -08:00
Mitchell Hashimoto e9f6c81ab7 hosts/*: proper detect API 2014-01-07 21:18:36 -08:00
Mitchell Hashimoto 5f832467b3 core: event he default host shuld have proper API 2014-01-07 21:16:48 -08:00
Mitchell Hashimoto 26b564566b hosts/null: needs to accept env as param 2014-01-07 21:14:33 -08:00
Mitchell Hashimoto a72e7473d5 hosts/windows: convert 2014-01-07 21:13:21 -08:00
Mitchell Hashimoto 4d47dae5b9 many more hosts converted 2014-01-07 21:11:59 -08:00
Mitchell Hashimoto 4cec8b48d9 hosts/freebsd: convert 2014-01-07 21:01:03 -08:00
Mitchell Hashimoto a6c7cc481e convert more hosts: arch and linux 2014-01-07 20:53:39 -08:00
Mitchell Hashimoto bdb88da743 hosts/bsd: convert to new style 2014-01-07 20:39:24 -08:00
Mitchell Hashimoto 09a425030b core: pass environment into all host caps 2014-01-07 20:34:33 -08:00
Mitchell Hashimoto 5e490e3746 Get tests to pass 2014-01-07 19:26:03 -08:00
Mitchell Hashimoto 93e365bb33 core: Vagrant::Environment uses new host settings 2014-01-07 19:11:08 -08:00
Mitchell Hashimoto 21a610b59b core: whitespace 2014-01-07 18:39:38 -08:00
Mitchell Hashimoto 5922241fcb core: Modify plugin interfaces and API for hosts 2014-01-07 18:38:49 -08:00
Mitchell Hashimoto 04a5e6bcd2 core: Remove Vagrant::Hosts and add Vagrant::Host, a CapabilityHost 2014-01-07 18:34:19 -08:00
Mitchell Hashimoto a83498e32a Merge pull request #2781 from mitchellh/f-abstract-capability
Abstract "Capability" system so it can be used with hosts
2014-01-07 16:35:57 -08:00
Mitchell Hashimoto c1d56da1ca core: get tests passing for changes 2014-01-07 16:29:05 -08:00
Mitchell Hashimoto 40babfc3f7 core: modify Guest to use new CapabilityHost mixin 2014-01-07 16:27:12 -08:00
Mitchell Hashimoto 1f760b2c48 core: pass extra args to detect? when detecting capability host 2014-01-07 16:26:58 -08:00
Mitchell Hashimoto b15cb22e3e core: errors expose their extra data 2014-01-07 16:15:32 -08:00
Mitchell Hashimoto 1f6095f912 core: Vagrant::CapabilityHost is a module for adding capabilities to
things
2014-01-07 16:12:12 -08:00
Mitchell Hashimoto 72dd32e69c website/docs: note sendfile 2014-01-07 14:26:56 -08:00
Mitchell Hashimoto fea63500a0 Update README 2014-01-07 14:22:59 -08:00
Mitchell Hashimoto 484998574a Merge pull request #2767 from joestump/master
Update README to note running Vagrant in a bundle disables plugins by default.
2014-01-07 14:22:10 -08:00
Mitchell Hashimoto ea502c5c3d commands/plugin: vagrant plugin install can accept multiple 2014-01-07 14:17:48 -08:00
Mitchell Hashimoto 24a2892236 Update CHANGELOG and website 2014-01-07 14:11:33 -08:00
Ryan S. Brown b53ae446d2 Allow `vagrant (un)install plugin1 plugin2 plugin3` 2014-01-07 14:09:31 -08:00
Mitchell Hashimoto 5c4973beb8 Merge pull request #2658 from gildegoma/ansible_doc_small_improvements
website/docs: cosmetic improvements on Ansible
2014-01-07 14:07:57 -08:00
Mitchell Hashimoto e24f6e50b5 core: depend on Vagrant by path, rather than by version 2014-01-07 14:04:13 -08:00
Mitchell Hashimoto 7a78e2bca7 Update changelog 2014-01-07 13:59:51 -08:00
Mitchell Hashimoto 3f4058471c core: installing a plugin from a gem doesn't constrain it 2014-01-07 13:56:51 -08:00
Mitchell Hashimoto ba85627c21 Merge pull request #2769 from mitchellh/f-bundlerize
Plugin dependency management revamp

This is a huge revamp of how plugin dependency management is done. To understand the changes here, a brief history lesson is in order:

Since Vagrant 1.1, plugins have been loaded as RubyGems. Once Vagrant was loaded, it would iterate through a list of installed plugins, and `require` that plugin. This mostly worked okay. But the devil is in the details, and the edge cases were _really_ bad. In addition to the edge cases (mentioned below), building things like updaters, version constraints (">= 1.0", "< 1.1"), etc. all had to be done manually. This seemed silly, since RubyGems itself (and Bundler) do these sort of things for you. Why reinvent the wheel?

As for edge cases: the primary edge case is that since the dependencies of Vagrant and its respective plugins weren't resolved as a whole, you can run into cases where plugin installation succeeded, but plugin loading failed because Vagrant already loaded a common dependency with the wrong version. An example explains this best:

* Vagrant depends on "A >= 1.0, < 1.2"
* vagrant-plugin depends on "A = 1.1"
* When you run Vagrant, it loads the latest possible matching dependencies, so it would load A 1.2
* When Vagrant loads vagrant-plugin, it can't load, because A 1.2 is active, so A 1.1 can't be loaded.

The error above should never happen: the versions available for A should satisfy both Vagrant and vagrant-plugin (by loading v1.1 for both). 

With this new branch, all plugin installation, dependency resolution, updating, etc. is managed by [Bundler](http://gembundler.com). This has yielded numerous benefits:

* Vagrant now resolves dependencies before Vagrant is even loaded. This ensures that all plugins will be able to load. No more conflicts at run-time.

* Conflicts are detected at `vagrant plugin install` time. This means that if there would be a crash if that plugin were to load, the plugin won't even install and a human-friendly error is shown to the end user.

* `vagrant plugin install` now accepts complex version constraints such as "~> 1.0.0" or ">= 1.0, < 1.1". Vagrant stores these constraints for updating, which leads to the next point.

* `vagrant plugin update` without arguments now updates all installed plugins, respecting the constraints specified by `vagrant plugin install`.

* `vagrant plugin update NAME` will only update that gem (still respecting constraints). 

* Internally, there are a lot more unit tests. /cc @phinze :)

The goal of this branch was to replace the _existing_ system and functionality with Bundler-ized management. It did not introduce any new features except where they naturally fell into place (version constraints). However, with this new system, many new possibilities are also available:

* Vagrant environment local plugins (i.e. a Gemfile but for a specific Vagrant environment). 

* Plugin installation from git

I'm sure those will be pursued at some point in the future.

This fixes: #2612, #2406, #2428
2014-01-07 10:53:41 -08:00
Mitchell Hashimoto 4f623f6422 Remove temporary line 2014-01-07 10:52:07 -08:00
Mitchell Hashimoto 79602ab37b update vagrant-spec config 2014-01-07 10:51:01 -08:00
Mitchell Hashimoto 582e1096e4 Allow forcing plugins with VAGRANT_FORCE_PLUGINS 2014-01-07 10:50:10 -08:00
Mitchell Hashimoto b353865da1 core: specific versions "0.1.0" don't equate to "= 0.1.0" 2014-01-07 10:13:30 -08:00
Mitchell Hashimoto 198e142794 commands/plugin: add more tests for installgem 2014-01-06 10:55:34 -08:00
Mitchell Hashimoto 3cefcda1e3 core: when installig local plugins, don't fetch remote 2014-01-06 10:52:14 -08:00
Mitchell Hashimoto 5197d3d86f core: generate bogus gemfile so that a random lockfile isn't loaded 2014-01-06 10:43:20 -08:00
Mitchell Hashimoto 86cab61c27 commands/plugin: support installing from file 2014-01-06 09:27:37 -08:00
Mitchell Hashimoto 3f9fb2ef03 core: reset the specification lookup when isolating gems 2014-01-06 09:27:26 -08:00
Joe Stump 83f68630d6 Update README to note running Vagrant in a bundle disables plugins by default. 2014-01-06 09:29:16 -07:00
Thomas Grainger feb748f488 Allow defining of <install-type> and <install-type-args> 2014-01-06 12:22:43 +00:00
Mitchell Hashimoto 677275e43c core: whoops, don't print Gemfile 2014-01-05 23:14:43 -08:00
Mitchell Hashimoto f612ec7549 core: support plugin sources, and mask Bundler errors 2014-01-05 23:13:49 -08:00
Mitchell Hashimoto 84ecca5c15 core: statefile can track sources, not sure if we'll use it though 2014-01-05 22:50:55 -08:00
Mitchell Hashimoto 35d711c91b commands/plugin: add tests for UpdateGems 2014-01-05 22:37:29 -08:00