Skip to content

Commit

Permalink
add Vagrantfile to allow testing within a virtual machine.
Browse files Browse the repository at this point in the history
  • Loading branch information
Braxton Huggins committed Jan 18, 2016
1 parent cac1a63 commit c366703
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ _cgo_gotypes.go
_cgo_export.*

_testmain.go
.vagrant

*.exe
*.test
Expand Down
38 changes: 38 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# determine vagrant provider
ENV['VAGRANT_DEFAULT_PROVIDER'] = ENV['NANOBOX_BUILD_VAGRANT_PROVIDER'] || 'virtualbox'

Vagrant.configure('2') do |config|

config.vm.box = 'ubuntu/trusty64'

config.vm.provider 'virtualbox' do |v|
v.memory = 1024
v.cpus = 1
end

config.vm.provider "vmware_fusion" do |v, override|
v.vmx["memsize"] = "1024"
v.vmx["numvcpus"] = "1"
v.gui = false
override.vm.box = "trusty64_vmware"
override.vm.box_url = 'https://github.com/pagodabox/vagrant-packer-templates/releases/download/v0.2.0/trusty64_vmware.box'
end

config.vm.network "private_network", type: "dhcp"

config.vm.provision "shell", inline: <<-SCRIPT
echo "installing build tools..."
apt-get -y update -qq
apt-get -y upgrade
apt-get install -y build-essential software-properties-common python-software-properties ipvsadm
add-apt-repository -y ppa:ubuntu-lxc/lxd-stable
apt-get -y update -qq
apt-get install -y golang
apt-get install git mercurial bzr
apt-get -y autoremove
SCRIPT

end

0 comments on commit c366703

Please sign in to comment.