|
@ -21,29 +21,31 @@ Vagrant.configure("2") do |config| |
|
|
|
|
|
|
|
|
# install base requirements |
|
|
# install base requirements |
|
|
apt-get update |
|
|
apt-get update |
|
|
|
|
|
apt-get upgrade -y |
|
|
apt-get install -y --no-install-recommends wget curl jq \ |
|
|
apt-get install -y --no-install-recommends wget curl jq \ |
|
|
make shellcheck bsdmainutils psmisc |
|
|
make shellcheck bsdmainutils psmisc |
|
|
apt-get install -y docker-ce golang-1.9-go |
|
|
apt-get install -y docker-ce golang-1.9-go |
|
|
|
|
|
apt-get install -y language-pack-en |
|
|
|
|
|
|
|
|
|
|
|
apt-get autoremove -y |
|
|
|
|
|
|
|
|
# needed for docker |
|
|
# needed for docker |
|
|
usermod -a -G docker ubuntu |
|
|
|
|
|
|
|
|
usermod -a -G docker vagrant |
|
|
|
|
|
|
|
|
# use "EOF" not EOF to avoid variable substitution of $PATH |
|
|
|
|
|
cat << "EOF" >> /home/ubuntu/.bash_profile |
|
|
|
|
|
export PATH=$PATH:/usr/lib/go-1.9/bin:/home/ubuntu/go/bin |
|
|
|
|
|
export GOPATH=/home/ubuntu/go |
|
|
|
|
|
export LC_ALL=en_US.UTF-8 |
|
|
|
|
|
cd go/src/github.com/tendermint/tendermint |
|
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
# set env variables |
|
|
|
|
|
echo 'export PATH=$PATH:/usr/lib/go-1.9/bin:/home/vagrant/go/bin' >> /home/vagrant/.bash_profile |
|
|
|
|
|
echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.bash_profile |
|
|
|
|
|
echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.bash_profile |
|
|
|
|
|
|
|
|
mkdir -p /home/ubuntu/go/bin |
|
|
|
|
|
mkdir -p /home/ubuntu/go/src/github.com/tendermint |
|
|
|
|
|
ln -s /vagrant /home/ubuntu/go/src/github.com/tendermint/tendermint |
|
|
|
|
|
|
|
|
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 ubuntu:ubuntu /home/ubuntu/go |
|
|
|
|
|
chown ubuntu:ubuntu /home/ubuntu/.bash_profile |
|
|
|
|
|
|
|
|
chown -R vagrant:vagrant /home/vagrant/go |
|
|
|
|
|
chown vagrant:vagrant /home/vagrant/.bash_profile |
|
|
|
|
|
|
|
|
# get all deps and tools, ready to install/test |
|
|
# get all deps and tools, ready to install/test |
|
|
su - ubuntu -c 'cd /home/ubuntu/go/src/github.com/tendermint/tendermint && make get_tools && make get_vendor_deps' |
|
|
|
|
|
|
|
|
source /home/vagrant/.bash_profile |
|
|
|
|
|
cd /home/vagrant/go/src/github.com/tendermint/tendermint && make get_tools && make get_vendor_deps |
|
|
SHELL |
|
|
SHELL |
|
|
end |
|
|
end |