-
Notifications
You must be signed in to change notification settings - Fork 63
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
Accomodate caching via vagrant-cachier plugin #22
Comments
We're discussing this problem here: fgrehm/vagrant-cachier#13 (comment) The issue can soon be solved by As referenced in the vagrant-cachier issue above, two things would be needed from
This isn't currently possible with the current Also, perhaps the issue title could be updated to: Accomodate caching via vagrant-cachier plugin ? |
hashicorp/vagrant#1897 has been merged #justsaying ;) |
In other words, we're just about ready to merge fgrehm/vagrant-cachier#14, which means we can easily cache |
@patcon: as of vagrant 1.2.7 and vagrant-cachier 0.3.0 it's still not being cached, is it? Or should it be? |
Ah, now I see. It won't be cached because the install.sh the vagrant-omnibus plugin delegates to uses an arbitrary tmp directory:
|
@tknerr @patcon @gondo I've been thinking about this and I believe we can just use what do u guys think? |
@fgrehm yes that would be worth a try. I understand though why 'install.sh' is not using '/var/chef/cache' before it installs chef which creates that directory. Not really a chicken/egg problem but we have to ensure that the omnibus installer does not bail out if that directory already exists. |
@fgrehm that's actually a really great idea! Perhaps we could patch vagrant-omnibus instead? EDIT: Oops. Thought we were in the vagrant-cachier queues. Of course this would be a vagrant-omnibus fix :) /EDIT The
which is used to construct lines like this later in the script:
so we could replace the script command inline with something like: def install(version, destination_dir)
command = <<-INSTALL_OMNIBUS
if command -v wget &>/dev/null; then
wget -qO- #{INSTALL_SH} | sed "s/^tmp_dir=.*$/tmp_dir=#{destination_dir}/" | sudo bash -s -- -v #{version}
elif command -v curl &>/dev/null; then
curl -L #{INSTALL_SH} | sed "s/^tmp_dir=.*$/tmp_dir=#{destination_dir}/" | sudo bash -s -- -v #{version}
else
echo "Neither wget nor curl found. Please install one." >&2
exit 1
fi
INSTALL_OMNIBUS
end So the sed should search a replace the destination tmp_dir with something of our choosing. Haven't tested, so my regex might be off. I'm a vacay for another week, so likely won't get to this for a few weeks. |
@patcon yeah, or we can use |
@patcon @fgrehm just noticed that you can set This could be used as a temporary workaround, but haven't verified it yet... |
@patcon @fgrehm gnaaah didn't work :-( It's the same issue as in tmatilai/vagrant-proxyconf#13, i.e. vagrant-omnibus kicks in before vagrant-cachier configures the cache buckets:
You can find the sample above using a slightly modified install.sh is on the cache-omnibus branch here. @fgrehm mind hooking in vagrant-cachier before vagrant-omnibus similar to tmatilai/vagrant-proxyconf@bcbdc39? |
Splitting the fetching of `install.sh` from the actual execution of said script will improve the user experience. It will also allow us to modify the `install.sh` if needed (see #22).
i'm working on a -f flag to install.sh to download or install from cached file |
Splitting the fetching of `install.sh` from the actual execution of said script will improve the user experience. It will also allow us to modify the `install.sh` if needed (see #22). We also switched to using Vagrant's built in `Vagrant::Util::Downloader` class which is a pure-Ruby downloader which removes requirement of the guest OS having `wget` or `curl` installed.
Splitting the fetching of `install.sh` from the actual execution of said script will improve the user experience. It will also allow us to modify the `install.sh` if needed (see #22). We also switched to using Vagrant's built in `Vagrant::Util::Downloader` class which is a pure-Ruby downloader which removes requirement of the guest OS having `wget` or `curl` installed.
This would be fixed via #68 |
Now that #73 has been merged this should be fixed. |
it would be very nice to have some kind of caching in place, so i dont have to download chef each time i do
vagrant up
The text was updated successfully, but these errors were encountered: