From 27e0fbc9e63588fef591760d1fa2b32d758f60c4 Mon Sep 17 00:00:00 2001 From: Koustubh Sinkar Date: Fri, 5 May 2017 14:23:40 +0530 Subject: [PATCH] containers/vagrant Adding support for Debian 1. Making the Ubuntu build work 2. Adding support for Debian 3. Adding support for CentOS --- containers/vagrant/Vagrantfile | 5 +++++ containers/vagrant/provisioners/shell/centos.sh | 10 +++++++++- containers/vagrant/provisioners/shell/debian.sh | 11 +++++++++++ containers/vagrant/provisioners/shell/ubuntu.sh | 14 +++++--------- 4 files changed, 30 insertions(+), 10 deletions(-) create mode 100755 containers/vagrant/provisioners/shell/debian.sh diff --git a/containers/vagrant/Vagrantfile b/containers/vagrant/Vagrantfile index cdf66c666c..72ec366e21 100644 --- a/containers/vagrant/Vagrantfile +++ b/containers/vagrant/Vagrantfile @@ -13,6 +13,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| ubuntu.vm.provision "shell", :path => "provisioners/shell/ubuntu.sh" end + config.vm.define "debian", :primary => true do |debian| + debian.vm.box = "debian/jessie64" + debian.vm.provision "shell", :path => "provisioners/shell/debian.sh" + end + config.vm.define "centos", :autostart => false do |centos| centos.vm.box = "centos/7" centos.vm.provision "shell", :path => "provisioners/shell/centos.sh" diff --git a/containers/vagrant/provisioners/shell/centos.sh b/containers/vagrant/provisioners/shell/centos.sh index bc5b4ac96b..744da4bfd4 100755 --- a/containers/vagrant/provisioners/shell/centos.sh +++ b/containers/vagrant/provisioners/shell/centos.sh @@ -1,3 +1,11 @@ #!/bin/bash -#sudo yum install -y golang git +sudo yum install -y git wget +sudo yum update -y + +wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz + +GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/" + +echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc diff --git a/containers/vagrant/provisioners/shell/debian.sh b/containers/vagrant/provisioners/shell/debian.sh new file mode 100755 index 0000000000..1c1793336d --- /dev/null +++ b/containers/vagrant/provisioners/shell/debian.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +sudo apt-get install -y build-essential git-all wget +sudo apt-get update + +wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz + +GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/" + +echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc diff --git a/containers/vagrant/provisioners/shell/ubuntu.sh b/containers/vagrant/provisioners/shell/ubuntu.sh index a91b42ac99..1c1793336d 100755 --- a/containers/vagrant/provisioners/shell/ubuntu.sh +++ b/containers/vagrant/provisioners/shell/ubuntu.sh @@ -1,15 +1,11 @@ #!/bin/bash -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 install -y build-essential git-all wget sudo apt-get update -sudo apt-get install -y build-essential golang git-all +wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz -GOPATH=/home/vagrant/go go get github.com/tools/godep +GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/" -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 +echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc