jeanmonod / private-server

Script to build up our own private server
2 stars 0 forks source link

persist .deb packages to speed-up vagrant destroy/provision iterations #21

Closed gildegoma closed 12 years ago

gildegoma commented 12 years ago

context: With my poor internet bandwidth, I cannot afford to always download packages from internet

The easiest solution consists in sharing /var/cache/apt/archives directly on the host, and reuse it from the VMs (a similar way sysadmins share the whole /var partition across a LAN).

Other solution is to build a personal apt-get mirror repository, but it's too much work for setup and maintenance.

jeanmonod commented 12 years ago

OK, this can be done, BUT most of the time we will only use

vagrant provision

So this should not be a big issue. Plus the cookbook apt already provide a cache system? So the except if you did a destroy, you should not have caching problem...

gildegoma commented 12 years ago

so far I already make lots of destroy/up iterations (and spent too much time downloading with cheap internet provider bandwith ;-). I hope there will be fewer destroy operations when cookbooks are getting a bit more stable, but rebuild a VM from scratch (clean git branch, clean vagrant vm) is the best way to validate before commits, hence I will commit an optional setting directly in master

gildegoma commented 12 years ago

Once the changeset from 859df87 is integrated in your Vagrantfile, you can optionally enable local apt-cache, the following way:

vagrant halt
mkdir -p .vagrant-shared/var/cache/apt/archives/partial
vagrant up
jeanmonod commented 12 years ago

But, you didn't have to do any Vagrant config? Is it automatic?

gildegoma commented 12 years ago

@jeanmonod see 859df87 above in issue history (I reworded my previous comment to make it clearer)

jeanmonod commented 12 years ago

My fault sorry, I didn't see the commit :(

2012/4/10 Gilles Cornu < reply@reply.github.com

@jeanmonod see 859df87 above in issue history (I reworded my previous comment to make it clearer)


Reply to this email directly or view it on GitHub: https://github.com/jeanmonod/private-server/issues/21#issuecomment-5048565

David Jeanmonod david.jeanmonod@gmail.com 077 437 51 12