Add vagrant setup for local testing

This commit is contained in:
Jose Diaz-Gonzalez
2016-01-17 21:06:21 -05:00
parent 1c364fca3c
commit 996368201f
2 changed files with 31 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
tests/dokku
tests/fixtures
tests/bin/plugn
.vagrant

30
Vagrantfile vendored Normal file
View File

@@ -0,0 +1,30 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-14.04"
BOX_MEMORY = ENV["BOX_MEMORY"] || "512"
DOKKU_VERSION = "master"
Vagrant.configure(2) do |config|
config.vm.box = BOX_NAME
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
# Ubuntu's Raring 64-bit cloud image is set to a 32-bit Ubuntu OS type by
# default in Virtualbox and thus will not boot. Manually override that.
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
vb.customize ["modifyvm", :id, "--memory", BOX_MEMORY]
end
config.vm.provider :vmware_fusion do |v, override|
v.vmx["memsize"] = BOX_MEMORY
end
config.vm.define "default", primary: true do |vm|
vm.vm.synced_folder File.dirname(__FILE__), "/vagrant"
vm.vm.provision :shell, :inline => "apt-get update > /dev/null && apt-get install -y -qq git software-properties-common"
vm.vm.provision :shell, :inline => "cd /vagrant && DOKKU_VERSION=#{DOKKU_VERSION} make setup"
vm.vm.provision :shell, :inline => "cd /vagrant && DOKKU_TRACE=1 DOKKU_VERSION=#{DOKKU_VERSION} make test"
end
end