berkshelf / vagrant-berkshelf

A Vagrant plugin to add Berkshelf integration to the Chef provisioners
Other
379 stars 100 forks source link

Discussion: (optionally) self-contained vagrant-berkshelf #250

Closed tknerr closed 9 years ago

tknerr commented 9 years ago

Just thinking out loud: wouldn't it be useful if vagrant-berkshelf would optionally include the berkshelf gem?

I know that since 3.x there is a dependency to ChefDK (or any other berks executable on the PATH), which substantially reduces the installation time (and gecode issues while installing the gem).

However. The dependency to ChefDK is quite a big one. Where I previously could distribute Vagrant-based development environments without anything other than Vagrant + VirtualBox required, I now need to tell users that they need do install ChefDK just for the berks executable.

Would it be possible to somehow re-enable the inclusion of berkshelf optionally?

Things that come to my mind (just brainstorming):

What do you think?

sethvargo commented 9 years ago

@tknerr

Would it be possible to somehow re-enable the inclusion of berkshelf optionally?

No. It is not possible to specify optional dependencies in Rubygems. Additionally, it is possible to use Berkshelf as a gem, but not something we support. YMMV.

  • vagrant-berkshelf auto-installing the berkshelf gem into the vagrant embedded ruby if no berks executable was found on the PATH

That's not possible without shelling out to gem install, which seems really bad.

  • vagrant-berkshelf being published in two variants: one with the berkshelf dependency in the gemspec and one without (no idea how to do that technically though)

Again, not possible.

  • creating another plugin, e.g. "vagrant-berkshelf-complete" which depends on both vagrant-berkshelf plus a compatible berkshelf version

If this is something you would like to pursue, there is nothing I can do to stop you. However, this will not be an officially supported plugin and you will quickly realize the headaches that come with trying to install Berkshelf across a number of systems, making it work with all Vagrant's gems, and making it work with other Vagrant plugins.

tknerr commented 9 years ago

If this is something you would like to pursue, there is nothing I can do to stop you.

Not sure yet if I really want to do that and whether it would be worth dedicating time to it. For now I just want to get some feedback whether it would be something useful for others too.

Thanks for yours @sethvargo !

However, this will not be an officially supported plugin

Yes, and that should be written in BIG BOLD LETTERS on the README :-)

and you will quickly realize the headaches that come with trying to install Berkshelf across a number of systems, making it work with all Vagrant's gems, and making it work with other Vagrant plugin

Probably. I never had problems with it though (it just took some time for installing). It would definitely be an additional option and use at your own risk.

I don't need it now, but I'll keep it in the back of my head...

sethvargo commented 9 years ago

Yes, and that should be written in BIG BOLD LETTERS on the README :-)

If we detect you aren't running ChefDK, you get this lovely message on each command.

Probably. I never had problems with it though (it just took some time for installing). It would definitely be an additional option and use at your own risk.

If it's in core, we have to support it, which is why we chose not to put it in core.

tknerr commented 9 years ago

1) thanks for the pointer and 2) yes, totally reaonable