From 3ab1fb021550655e6a97f6c10383b2bfec94e291 Mon Sep 17 00:00:00 2001 From: Prasanna Pendse Date: Sat, 23 Jan 2016 21:39:44 -0500 Subject: [PATCH] Added Vagrantfile so that developers can spin up a VM to build geth --- .gitignore | 2 ++ containers/vagrant/Vagrantfile | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 containers/vagrant/Vagrantfile diff --git a/.gitignore b/.gitignore index 3b34d32c28..e8e10db2ff 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ cmd/mist/assets/ext/ethereum.js/ profile.tmp profile.cov +# vagrant +.vagrant diff --git a/containers/vagrant/Vagrantfile b/containers/vagrant/Vagrantfile new file mode 100644 index 0000000000..5d263eb765 --- /dev/null +++ b/containers/vagrant/Vagrantfile @@ -0,0 +1,29 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure(2) do |config| + config.vm.box = "ubuntu/trusty64" + + config.vm.provider "virtualbox" do |vb| + vb.memory = "2048" + end + + config.vm.synced_folder "../../", "/home/vagrant/go/src/github.com/ethereum/go-ethereum" + config.vm.synced_folder ".", "/vagrant", disabled: true + + config.vm.provision "shell", inline: <<-SHELL + sudo apt-get install software-properties-common + sudo add-apt-repository -y ppa:ethereum/ethereum + sudo add-apt-repository -y ppa:ethereum/ethereum-dev + sudo apt-get update + + sudo apt-get install -y build-essential golang git-all + + GOPATH=/home/vagrant/go go get github.com/tools/godep + + sudo chown -R vagrant:vagrant ~vagrant/go + + echo "export GOPATH=/home/vagrant/go" >> ~vagrant/.bashrc + echo "export PATH=\\\$PATH:\\\$GOPATH/bin:/usr/local/go/bin" >> ~vagrant/.bashrc + SHELL +end