dev icon indicating copy to clipboard operation
dev copied to clipboard

should support plugin installation with env var options

Open hieptranquoc opened this issue 7 years ago • 5 comments

make sure vagrant-libvirt plugin installed correctly.

hieptranquoc avatar Sep 28 '18 10:09 hieptranquoc

plugin installation requires some more options, so we're going to support that kind of options so that we can install the plugin via yaml config

https://github.com/vagrant-libvirt/vagrant-libvirt#installation

If you have issues building ruby-libvirt, try the following:

CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH vagrant plugin install vagrant-libvirt

hoatle avatar Sep 28 '18 10:09 hoatle

required by https://github.com/teracyhq-incubator/teracy-dev-essential/issues/10

hoatle avatar Sep 28 '18 10:09 hoatle

note: I'm not sure if we can support to install the plugin out of the box.

Otherwise, this could work with our normal plugin config (if this work, we should follow this for simpler plugin config schema):

$ CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH vagrant up

hoatle avatar Sep 28 '18 10:09 hoatle

related: https://github.com/teracyhq/dev/issues/486

hoatle avatar Oct 02 '18 03:10 hoatle

Note: we can use vagrant trigger feature to resolve this issue. The trigger can be run before the vagrant command or after the vagrant command. related: https://github.com/hashicorp/vagrant/blob/85acf0cac724ef4bfda593a66e0c17f7e4110da0/plugins/kernel_v2/config/trigger.rb#L15

related: https://github.com/hashicorp/vagrant/blob/608863809af3611c0ec72b766f9523f54f905938/lib/vagrant/plugin/v2/trigger.rb

https://github.com/hashicorp/vagrant/search?q=vagrant+trigger&unscoped_q=vagrant+trigger

hieptranquoc avatar Nov 24 '18 08:11 hieptranquoc