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 #33

Merged
merged 4 commits into from
Mar 5, 2014

Conversation

tknerr
Copy link
Contributor

@tknerr tknerr commented Mar 4, 2014

As discussed in fgrehm/vagrant-cachier#13 the install.sh script should not download the omnibus package over and over again if the -d or -f option is used and the file is locally available AND the checksum matches (e.g. when using vagrant-cachier or an nfs mount).

The behaviour is now as proposed here:

  • the metadata file is always downloaded to $tmp_dir (which will be removed afterwards)
  • if neither -d or -f are specified the omnibus package is downloaded to $tmp_dir as well (i.e. it will also be cleaned up afterwards)
  • if -d (directory) is specified the omnibus package will be downloaded to that directory with its original filename (as specified in the metadata file). If that file already exists in the given location AND the checksum matches it will just use the already present file instead of downloading again.
  • if -f (path to filename) is specified the omnibus package will be downloaded to that file. If a file with that name already exists AND the checksum matches it will just use the already present file instead of downloading again.

In essence this means that the we will always check the web service for the latest filename / checksums, but allow for caching if either -d or -f are used.

@tknerr
Copy link
Contributor Author

tknerr commented Mar 4, 2014

@lamont-granquist I believe this also fixes a not yet reported bug in master where $4 should actually be $1: https://github.com/opscode/opscode-omnitruck/blob/master/views/install.sh.erb#L329

@tknerr
Copy link
Contributor Author

tknerr commented Mar 4, 2014

this PR is also a prerequisite for accomodating caching in chef-boneyard/vagrant-omnibus#22

@lamont-granquist
Copy link
Contributor

actually the 'md5' is for MacOSX where i get this output:

% md5 .tcshrc
MD5 (.tcshrc) = 6c08bf8bfa3edc6997273e7d6eeada94

$1 will break that.

@tknerr
Copy link
Contributor Author

tknerr commented Mar 5, 2014

@lamont-granquist thanks! undid the "fix" and reverted back to $4 as it was before

@tknerr
Copy link
Contributor Author

tknerr commented Mar 8, 2014

@lamont-granquist thanks! btw: any estimate when this will go live?

@lamont-granquist
Copy link
Contributor

we need to push out a patch to allow installing .pkg's on macs which needs to happen soon so that we can do an rc release of chef... so, will be working on it next week... not sure exactly when it'll get released but it'll be blocking stuff we need to get done well in advance of chefconf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants