github.com/franono/tendermint@v0.32.2-0.20200527150959-749313264ce9/Vagrantfile (about) 1 # -*- mode: ruby -*- 2 # vi: set ft=ruby : 3 4 Vagrant.configure("2") do |config| 5 config.vm.box = "ubuntu/xenial64" 6 7 config.vm.provider "virtualbox" do |v| 8 v.memory = 4096 9 v.cpus = 2 10 end 11 12 config.vm.provision "shell", inline: <<-SHELL 13 apt-get update 14 15 # install base requirements 16 apt-get install -y --no-install-recommends wget curl jq zip \ 17 make shellcheck bsdmainutils psmisc 18 apt-get install -y language-pack-en 19 20 # install docker 21 apt-get install -y --no-install-recommends apt-transport-https \ 22 ca-certificates curl software-properties-common 23 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - 24 add-apt-repository \ 25 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 26 $(lsb_release -cs) \ 27 stable" 28 apt-get install -y docker-ce 29 usermod -a -G docker vagrant 30 31 # install go 32 wget -q https://dl.google.com/go/go1.13.linux-amd64.tar.gz 33 tar -xvf go1.13.linux-amd64.tar.gz 34 mv go /usr/local 35 rm -f go1.13.linux-amd64.tar.gz 36 37 # install nodejs (for docs) 38 curl -sL https://deb.nodesource.com/setup_11.x | bash - 39 apt-get install -y nodejs 40 41 # cleanup 42 apt-get autoremove -y 43 44 # set env variables 45 echo 'export GOROOT=/usr/local/go' >> /home/vagrant/.bash_profile 46 echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.bash_profile 47 echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> /home/vagrant/.bash_profile 48 echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.bash_profile 49 echo 'cd go/src/github.com/franono/tendermint' >> /home/vagrant/.bash_profile 50 51 mkdir -p /home/vagrant/go/bin 52 mkdir -p /home/vagrant/go/src/github.com/tendermint 53 ln -s /vagrant /home/vagrant/go/src/github.com/franono/tendermint 54 55 chown -R vagrant:vagrant /home/vagrant/go 56 chown vagrant:vagrant /home/vagrant/.bash_profile 57 58 # get all deps and tools, ready to install/test 59 su - vagrant -c 'source /home/vagrant/.bash_profile' 60 su - vagrant -c 'cd /home/vagrant/go/src/github.com/franono/tendermint && make tools' 61 SHELL 62 end