-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Vagrantfile to allow testing within a virtual machine.
- Loading branch information
Braxton Huggins
committed
Jan 18, 2016
1 parent
cac1a63
commit c366703
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ _cgo_gotypes.go | |
_cgo_export.* | ||
|
||
_testmain.go | ||
.vagrant | ||
|
||
*.exe | ||
*.test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |