Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache omnibus download, expose config options #73

Merged
merged 8 commits into from
Apr 25, 2014
Merged

Cache omnibus download, expose config options #73

merged 8 commits into from
Apr 25, 2014

Conversation

tknerr
Copy link
Contributor

@tknerr tknerr commented Mar 20, 2014

I messed up history in #71. This one is rebased on master.

Fixes #68

Instead of using an env var the config option config.omnibus.cache_packages is introduced. By default it is true, so it can be turned off if you don't want the caching behaviour.

Additionally the config.omnibus.install_url option has been exposed. The $OMNIBUS_INSTALL_URL is still considered, but has lower precedence than the config option.

cache_packages

Caching kicks in only iff:

  • cache_packages is truthy
  • the vagrant-cachier plugin is present
  • the vagrant-cachier plugin has config.cachier.auto_detect enabled (which is the default)

If caching kicks in -d /tmp/vagrant-cache/vagrant_omnibus will be passed to install.sh so this will be the location on the guest to which a) the omnibus package will be downloaded and b) which will be cached by vagrant-cachier.

The config option is truthy. Currently we default to true, but if more caching strategies would be implemented in the future it could be :cachier, :something_else or :whatever as well. Only false or nil will disable the caching behaviour.

install_script

The precedence is now:

  1. try config.omnibus.install_url if set
  2. try ENV['OMNIBUS_INSTALL_URL'] if set
  3. use default url for install(.sh|.msi)

There is some basic validation in place at install time (didn't change anything here). You can pass in for example:

config.omnibus.install_url = 'http://some_path.com/install.sh'
config.omnibus.install_url = 'http://some_path.com/install.msi'
config.omnibus.install_url = '/some/path/on/the/host'

@tknerr
Copy link
Contributor Author

tknerr commented Mar 20, 2014

@schisamo build fails due to a bug in rubocop 0.19.1 that is already fixed in master (see rubocop/rubocop#892). I have now pinned rubocop to 0.18.1 in the gemspec to unblock the travis build here.

@schisamo
Copy link
Contributor

Thanks for the PR! Hoping to have some time to get this integrated next week.

@ivanoats
Copy link

excited for this, especially because I'm commenting from hotel wifi while waiting for omnibus 👍

@fgrehm
Copy link
Contributor

fgrehm commented Mar 25, 2014

👍 great work 🎆

@drpebcak
Copy link

Any idea when there is going to be a release that includes this? I'm stoked to be able to use this!

@woodsae
Copy link

woodsae commented Apr 3, 2014

👍 Can't wait for this!

@gwaldo
Copy link

gwaldo commented Apr 14, 2014

Likewise, I am excited for this to be released! (I just read through a couple github comment threads on this issue/feature.)

@esciara
Copy link

esciara commented Apr 15, 2014

Yes! When is this going to be released?! Looking forward to have my tests speeding up as a result. :)

@cromulus
Copy link

👍 Awesome work Humans of Github! My development workflow and sanity thanks you.

@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop', '0.18.1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANK YOU! I think that was the last sane version of Rubocop! 😄

schisamo added a commit that referenced this pull request Apr 25, 2014
…rebased

Cache omnibus download, expose config options (rebased)
@schisamo schisamo merged commit 894c2c0 into chef-boneyard:master Apr 25, 2014
@tas50 tas50 changed the title Cache omnibus download, expose config options (rebased) Cache omnibus download, expose config options Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

10 participants