fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.07k stars 111 forks source link

Cachier should cache metadata too #70

Closed purpleidea closed 10 years ago

purpleidea commented 10 years ago

Awesome plugin first of all.

In addition to caching the packages, it would be great if somehow this could cache metadata and other things that are still checked on the server... My goal is to be able to provision machines completely offline when I have zero access to internet.

Obviously, I'd like to avoid hosting an entire apt/yum repository on my machine, since this has historically been a harder/error prone problem.

Cheers!

tmatilai commented 10 years ago

@purpleidea As long as you only have HTTP traffic, check out polipo-box with vagrant-proxyconf. That should work fine in offline mode too. I haven't found any MitM hacks for polipo so it can't cache SSL traffic. (Squid should be able, but I haven't got into building it up yet. And you need to install the signing CA cert to all VMs...)

If you only need apt/yum cache, apt-cacher-ng is a better and smarter fit. Although I haven't tried how it behaves offline.

Both of the proxy servers are really easy to set up and require no maintenance. Even with all apt data cached apt-get update etc. will still fail if offline so some provisioning runs would anyway fail.

fgrehm commented 10 years ago

@purpleidea I'm glad you liked the plugin but this is about caching packages files :-)

For advanced stuff, you can do what @tmatilai suggested and use vagrant-proxyconf (and you can even have proxyconf and cachier running alongside). Eventually we'll have support for caching specific folders and you'll be able to cache metadada folders if you still want to do that :-)

purpleidea commented 10 years ago

Cool. Thanks for the ideas everyone!

fgrehm commented 10 years ago

@purpleidea just so you know, this ended up being implemented with the ideas from GH-84 ;)