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

1  2 
docs/fdroid.texi
makebuildserver

index 4e87eaf3c7717ffeadc4966fdea38564e8855eab,dacf6cc955b92d5c01e0efb4958ea974b5df6deb..3ac3927c439f84eead6b8d26ac41164064eb30b2
@@@ -115,8 -113,11 +115,10 @@@ VirtualBox (debian package virtualbox
  @item
  Ruby (debian packages ruby and rubygems)
  @item
 -Vagrant (unpackaged) Be sure to use 1.3.x because 1.4.x is completely broken
 -(at the time of writing, the forthcoming 1.4.3 might work)
 +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)
diff --cc makebuildserver
index 5eba80493d9101e43401d65532c566bdacd4e1a1,1c9ef248ae97bb9657878fa5e76619d0baaa4fc0..5b4862f31bf3ddd13020196ad5b609b48d2fbb4f
@@@ -168,8 -144,15 +168,15 @@@ for f, src, shasum in cachefiles
  # Generate an appropriate Vagrantfile for the buildserver, based on our
  # settings...
  vagrantfile = """
 -Vagrant::Config.run do |config|
 +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}"