From 0c2bb4e41489bdeda0d82ea67a4042cc7dee84d8 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Sat, 26 Jul 2014 22:51:49 +0200 Subject: [PATCH] Add support for the vagrant-cachier plugin Change-Id: Id3aeaa16e062f764412bd6c5fd9460b5867333a9 --- README.md | 22 +++++++++++++++++++--- Vagrantfile | 4 ++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 17ef1bd..569a18a 100644 --- a/README.md +++ b/README.md @@ -88,12 +88,18 @@ When someone updates the config, this process should allow you to bring up an up - `vagrant up` ## Improving Provisioning Speed -The slowest part of the provisioning process is the downloading of deb packages. To speed this up a local apt-cacher-ng can be used. -### Linux (Ubuntu) + +The slowest part of the provisioning process is the downloading of deb packages. + +### Local cache + +To speed this up a local apt-cacher-ng can be used. + +#### Linux (Ubuntu) ``` sudo apt-get install apt-cacher-ng ``` -### MacOS +#### MacOS ``` brew install apt-cacher-ng ``` @@ -102,6 +108,16 @@ That is all that is needed. From now on, the cache will be used. A report from the cache is found at http://localhost:3142/acng-report.html +### vagrant-cachier + +Instead of using apt-cacher-ng you can also use the Vagrant plugin +`vagrant-cachier` available at https://github.com/fgrehm/vagrant-cachier. To +use it with this Vagrant box you simply have to install the plugin. + +``` +sudo vagrant plugin install vagrant-cachier +``` + ## Cookbook Development To develop cookbook changes with Vagrant: diff --git a/Vagrantfile b/Vagrantfile index c3a1492..8c4b38a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,6 +7,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Settings for all vms config.berkshelf.enabled = true + if Vagrant.has_plugin?("vagrant-cachier") + config.cache.scope = :box + end + # Handle local proxy settings if Vagrant.has_plugin?("vagrant-proxyconf") if ENV["http_proxy"]