- From: Mark Nichols <
>
- To: "
" <
>
- Cc: chef <
>
- Subject: [chef] Re: How to configure apt to not hit the repo every time?
- Date: Sat, 18 May 2013 07:25:39 -0500
On May 18, 2013, at 6:27 AM, millisami r <
">
> wrote: Hi, I'm developing a cookbook using Berkshelf and Vagrant latest.
There is a place in the recipe that runs apt-get update frequently and other dependent cookbooks too like the following:
[2013-05-18T11:21:48+00:00] INFO: Processing execute[apt-get update] action run (mysql::ruby line 23)
Its fine on the production node, but in the vagrant provision way, every time I run, it will hit the apt-get update which is a bit slow coz it hits via the internet.
How can I configure Vagrant to just hit only once in a single vagrant provision command? Or do I have to do change something else?
You might look into the resolver cookbook to set up your VM DNS. I found that by default the VM passes everything to VirtualBox and, only when that timed out, to the host machine's DNS gateway. My build times dropped 25% when I put resolver in as the first recipe in the run list.
Hope this helps, Mark
|
Archive powered by MHonArc 2.6.16.