chiark / gitweb /
Merge branch 'support-vagrant-cachier' into 'master'
authorHans-Christoph Steiner <hans@guardianproject.info>
Wed, 26 Aug 2015 12:44:36 +0000 (12:44 +0000)
committerHans-Christoph Steiner <hans@guardianproject.info>
Wed, 26 Aug 2015 12:44:36 +0000 (12:44 +0000)
Add optional support for vagrant-cachier plugin

Building the basebox is excruciating for people on slow connections. I'm particularly sensitive to this after living in Central America for awhile :)

This won't affect anyone who hasn't installed the plugin. For those who do, it creates a persistent shared folder for each box (ie. testing23.box) and detects directories to cache between VM builds (apt, gems, pip, chef cache, etc.)

(The only downside is that, for those following server setup does who are not aware what vagrant-cachier does, it might be unexpected that artifacts persist between vagrant destroys.)

See merge request !25

docs/fdroid.texi
makebuildserver

index 4e87eaf3c7717ffeadc4966fdea38564e8855eab..3ac3927c439f84eead6b8d26ac41164064eb30b2 100644 (file)
@@ -117,6 +117,8 @@ Ruby (debian packages ruby and rubygems)
 @item
 Vagrant (unpackaged, tested on v1.4.3)
 @item
+vagrant-cachier plugin (unpackaged): `vagrant plugin install vagrant-cachier`
+@item
 Paramiko (debian package python-paramiko)
 @item
 Imaging (debian package python-imaging)
index 5eba80493d9101e43401d65532c566bdacd4e1a1..5b4862f31bf3ddd13020196ad5b609b48d2fbb4f 100755 (executable)
@@ -170,6 +170,13 @@ for f, src, shasum in cachefiles:
 vagrantfile = """
 Vagrant.configure("2") do |config|
 
+  if Vagrant.has_plugin?("vagrant-cachier")
+    config.cache.scope = :box
+    config.cache.auto_detect = false
+    config.cache.enable :apt
+    config.cache.enable :chef
+  end
+
   config.vm.box = "{0}"
   config.vm.box_url = "{1}"