github.com/Oyster-zx/tendermint@v0.34.24-fork/Vagrantfile (about) 1 # -*- mode: ruby -*- 2 # vi: set ft=ruby : 3 4 Vagrant.configure("2") do |config| 5 config.vm.box = "ubuntu/focal64" 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 \ 23 curl \ 24 gnupg-agent \ 25 software-properties-common 26 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - 27 add-apt-repository \ 28 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 29 $(lsb_release -cs) \ 30 stable" 31 apt-get update 32 apt-get install -y docker-ce 33 usermod -aG docker vagrant 34 35 # install go 36 wget -q https://dl.google.com/go/go1.15.linux-amd64.tar.gz 37 tar -xvf go1.15.linux-amd64.tar.gz 38 mv go /usr/local 39 rm -f go1.15.linux-amd64.tar.gz 40 41 # install nodejs (for docs) 42 curl -sL https://deb.nodesource.com/setup_11.x | bash - 43 apt-get install -y nodejs 44 45 # cleanup 46 apt-get autoremove -y 47 48 # set env variables 49 echo 'export GOROOT=/usr/local/go' >> /home/vagrant/.bash_profile 50 echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.bash_profile 51 echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> /home/vagrant/.bash_profile 52 echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.bash_profile 53 echo 'cd go/src/github.com/tendermint/tendermint' >> /home/vagrant/.bash_profile 54 55 mkdir -p /home/vagrant/go/bin 56 mkdir -p /home/vagrant/go/src/github.com/tendermint 57 ln -s /vagrant /home/vagrant/go/src/github.com/tendermint/tendermint 58 59 chown -R vagrant:vagrant /home/vagrant/go 60 chown vagrant:vagrant /home/vagrant/.bash_profile 61 62 # get all deps and tools, ready to install/test 63 su - vagrant -c 'source /home/vagrant/.bash_profile' 64 su - vagrant -c 'cd /home/vagrant/go/src/github.com/tendermint/tendermint && make tools' 65 SHELL 66 end