vagrant install plugin from github

2019-03-20 17:52发布

问题:

We are using Vagrant for deployment and we'd eventually like to deploy this cluster on Rackspace. The vagrant-rackspace plugin is a natural choice, but it has a few bugs that are not included in the latest 0.1.1 release (notably that vagrant provision doesn't work). I've resolved this issue in my personal fork of the repository by merging work from others. Is it possible to do install a vagrant plugin from github?

The obvious thing didn't work:

[unix]$ vagrant plugin install vagrant-rackspace --plugin-source https://github.com/deanmalmgren/vagrant-rackspace
Installing the 'vagrant-rackspace' plugin. This can take a few minutes...
The plugin 'vagrant-rackspace' could not be found in local or remote
repositories. Please check the name of the plugin and try again.

I'm new to vagrant and ruby, so any pointers here would be greatly appreciated. Thanks!

回答1:

As of today I see only two workarounds:

  1. you could rake build the plugin, upload the resulting .gem to gemfury, and then use this as the --plugin-source.
  2. you could install the plugin from a local source, e.g. vagrant plugin install /path/to/your/bugfixed.gem

In the end, I would love to see something like a Gemfile for Vagrant plugins. AFAIK there ain't no such thing yet but here is a feature request

EDIT: actually there is an awesome project called bindler now. The feature request to add git location support in bindler is still outstanding, but this is the place where it should be fixed imho