diff options
| author | Gareth Rees <gareth@mysociety.org> | 2014-03-10 12:48:46 +0000 |
|---|---|---|
| committer | Gareth Rees <gareth@mysociety.org> | 2014-03-11 10:57:22 +0000 |
| commit | 508e6ba621136a95807997c3ff664b6bee73f22f (patch) | |
| tree | 3072d468f991da1d519440ad61573905d8114986 /Vagrantfile | |
| parent | 73e1a58f1aa492be12fc5aed20ad40a0c5fc0ff6 (diff) | |
Move Vagrantfile to repo root
For a better workflow
http://mysociety.github.io/installation-standards.html#silver
# Host
# Note that --recursive must be specified to include commonlib
# submodule
$ git clone --recursive git@github.com:mysociety/alaveteli.git
$ cd alaveteli && vagrant up
$ vagrant ssh
# Guest
$ cd /home/vagrant/alaveteli && bundle exec rake spec
Diffstat (limited to 'Vagrantfile')
| -rw-r--r-- | Vagrantfile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..d238fb8b6 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,36 @@ +# 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 +# +# You can customise the FQDN in your environment +# export ALAVETELI_VAGRANT_FQDN=alaveteli.dev +# +VAGRANTFILE_API_VERSION = "2" +ALAVETELI_FQDN = ENV['ALAVETELI_VAGRANT_FQDN'] || "alaveteli.10.10.10.30.xip.io" +ALAVETELI_MEMORY = ENV['ALAVETELI_VAGRANT_MEMORY'] || 1536 + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "precise64" + config.vm.box_url = "http://files.vagrantup.com/precise64.box" + config.vm.network :private_network, :ip => "10.10.10.30" + config.vm.synced_folder ".", "/home/vagrant/alaveteli", :owner => "vagrant", :group => "vagrant" + + config.ssh.forward_agent = true + + # The bundle install fails unless you have quite a large amount of + # memory; insist on 1.5GiB: + config.vm.provider "virtualbox" do |vb| + vb.customize ["modifyvm", :id, "--memory", ALAVETELI_MEMORY] + end + + # 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" + config.vm.provision :shell, :inline => "./install-site.sh " \ + "--dev " \ + "alaveteli " \ + "vagrant " \ + "#{ ALAVETELI_FQDN }" +end |
