aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-11-06 10:42:57 +0000
committerMark Longair <mhl@pobox.com>2013-11-07 15:46:56 +0000
commitec7de3b0fa332ce82baaff342644ca425b1aa7ff (patch)
treec2c6963b66dcfa0a5e4789134eade4889316dd2a
parent039e5f203fd91f02586559694d97799b65e10726 (diff)
Add a Vagrantfile to use the install script in a Vagrant box
This should be used with: vagrant --no-color up ... which (after some time) will leave you with a running site at: http://alaveteli.10.10.10.30.xip.io Many thanks to Simon Coffey (@urbanautomaton) and Chris Adams (@mrchrisadams) who produced a working Vagrantfile with a independent install script while our installation script work was ongoing - their advice and that script were very helpful for creating this Vagrantfile that uses our generic mySociety installation script.
-rw-r--r--config/Vagrantfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/config/Vagrantfile b/config/Vagrantfile
new file mode 100644
index 000000000..4253215fc
--- /dev/null
+++ b/config/Vagrantfile
@@ -0,0 +1,23 @@
+# This Vagrantfile should be used with the --no-color option, e.g.
+# vagrant --no-color up
+# Then you should be able to visit the site at:
+# http://alaveteli.10.10.10.30.xip.io
+
+Vagrant::Config.run do |config|
+ config.vm.box = "precise64"
+ config.vm.box_url = "http://files.vagrantup.com/precise64.box"
+ config.vm.network :hostonly, "10.10.10.30"
+ # The bundle install fails unless you have quite a large amount of
+ # memory; insist on 1.5GiB:
+ config.vm.customize ["modifyvm", :id, "--memory", 1536]
+ # Fetch and run the install script:
+ config.vm.provision :shell, :inline => "wget -O install-site.sh https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh"
+ config.vm.provision :shell, :inline => "chmod a+rx install-site.sh"
+ # This is only needed before the install-script branch is merged to
+ # master:
+ config.vm.provision :shell, :inline => "sed -i -e 's/BRANCH=master/BRANCH=install-script/' install-site.sh"
+ config.vm.provision :shell, :inline => "./install-site.sh " \
+ "alaveteli " \
+ "alaveteli " \
+ "alaveteli.10.10.10.30.xip.io"
+end