tendermint/Vagrantfile

59 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2015-03-18 01:02:04 -07:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
2015-03-18 01:02:04 -07:00
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
2015-03-18 01:02:04 -07:00
end
config.vm.provision "shell", inline: <<-SHELL
2018-05-16 23:43:38 -07:00
apt-get update
# install base requirements
apt-get install -y --no-install-recommends wget curl jq zip \
make shellcheck bsdmainutils psmisc
apt-get install -y language-pack-en
2018-05-16 23:43:38 -07:00
# install docker
apt-get install -y --no-install-recommends apt-transport-https \
ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get install -y docker-ce
usermod -a -G docker vagrant
# install go
2018-09-10 03:55:06 -07:00
wget -q https://dl.google.com/go/go1.11.linux-amd64.tar.gz
tar -xvf go1.11.linux-amd64.tar.gz
2018-05-16 23:43:38 -07:00
mv go /usr/local
2018-09-10 03:55:06 -07:00
rm -f go1.11.linux-amd64.tar.gz
2018-05-16 23:43:38 -07:00
2018-01-22 06:33:09 -08:00
# cleanup
apt-get autoremove -y
# set env variables
2018-05-16 23:43:38 -07:00
echo 'export GOROOT=/usr/local/go' >> /home/vagrant/.bash_profile
echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.bash_profile
2018-05-16 23:43:38 -07:00
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> /home/vagrant/.bash_profile
echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.bash_profile
2018-01-25 02:35:14 -08:00
echo 'cd go/src/github.com/tendermint/tendermint' >> /home/vagrant/.bash_profile
mkdir -p /home/vagrant/go/bin
mkdir -p /home/vagrant/go/src/github.com/tendermint
ln -s /vagrant /home/vagrant/go/src/github.com/tendermint/tendermint
chown -R vagrant:vagrant /home/vagrant/go
chown vagrant:vagrant /home/vagrant/.bash_profile
# get all deps and tools, ready to install/test
2018-01-22 06:33:09 -08:00
su - vagrant -c 'source /home/vagrant/.bash_profile'
su - vagrant -c 'cd /home/vagrant/go/src/github.com/tendermint/tendermint && make get_tools && make get_vendor_deps'
SHELL
2015-03-18 01:02:04 -07:00
end