From 0a7a190cd1526fe31cf66e4e5896632d0bdb7c7c Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Mon, 22 Jan 2018 13:40:32 +0100 Subject: [PATCH 1/5] Fix vagrantfile If you get an error, please run `vagrant box update`. --- .gitignore | 1 + Vagrantfile | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 22a6be0b..b031ce18 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ test/logs coverage.txt docs/_build docs/tools +*.log scripts/wal2json/wal2json scripts/cutWALUntil/cutWALUntil diff --git a/Vagrantfile b/Vagrantfile index 12cfce47..abbb719f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -21,29 +21,31 @@ Vagrant.configure("2") do |config| # install base requirements apt-get update + apt-get upgrade -y apt-get install -y --no-install-recommends wget curl jq \ make shellcheck bsdmainutils psmisc apt-get install -y docker-ce golang-1.9-go + apt-get install -y language-pack-en + + apt-get autoremove -y # 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 - 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 end From 2f147ec000a0f5f4394224c716845a50d4aff1ed Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Mon, 22 Jan 2018 14:55:58 +0100 Subject: [PATCH 2/5] Remove upgrade step --- Vagrantfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index abbb719f..9213f32f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -21,7 +21,6 @@ Vagrant.configure("2") do |config| # install base requirements apt-get update - apt-get upgrade -y apt-get install -y --no-install-recommends wget curl jq \ make shellcheck bsdmainutils psmisc apt-get install -y docker-ce golang-1.9-go From fc860c3a07865772a13c4cb270f7ad97532ccdbb Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Mon, 22 Jan 2018 15:33:09 +0100 Subject: [PATCH 3/5] Final Vagrantfile --- Vagrantfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 9213f32f..3979c779 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -26,6 +26,7 @@ Vagrant.configure("2") do |config| apt-get install -y docker-ce golang-1.9-go apt-get install -y language-pack-en + # cleanup apt-get autoremove -y # needed for docker @@ -44,7 +45,7 @@ Vagrant.configure("2") do |config| chown vagrant:vagrant /home/vagrant/.bash_profile # get all deps and tools, ready to install/test - source /home/vagrant/.bash_profile - cd /home/vagrant/go/src/github.com/tendermint/tendermint && make get_tools && make get_vendor_deps + 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 end From 4b63b3aa0ba915607a3e8a20cc96f2e3e306d8ff Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Thu, 25 Jan 2018 11:35:14 +0100 Subject: [PATCH 4/5] Switch to correct directory in Vagrant --- CONTRIBUTING.md | 5 ++++- Vagrantfile | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 787fd718..5b980071 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,6 +44,9 @@ Run `bash scripts/glide/status.sh` to get a list of vendored dependencies that m If you are a [Vagrant](https://www.vagrantup.com/) user, all you have to do to get started hacking Tendermint is: +In case you installed Vagrant in 2017, you might need to run +`vagrant box update` to upgrade to the latest `ubuntu/xenial64`. + ``` vagrant up vagrant ssh @@ -97,4 +100,4 @@ especially `go-p2p` and `go-rpc`, as their versions are referenced in tendermint - push to hotfix-vX.X.X to run the extended integration tests on the CI - merge hotfix-vX.X.X to master - merge hotfix-vX.X.X to develop -- delete the hotfix-vX.X.X branch \ No newline at end of file +- delete the hotfix-vX.X.X branch diff --git a/Vagrantfile b/Vagrantfile index 3979c779..ee878649 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -36,6 +36,7 @@ Vagrant.configure("2") do |config| 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 + 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 From 4a99a2a07d47407dcfdc7d8ae4adf979933efe05 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 26 Jan 2018 01:18:33 -0500 Subject: [PATCH 5/5] update contributing.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5b980071..b991bcc4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,18 +42,18 @@ Run `bash scripts/glide/status.sh` to get a list of vendored dependencies that m ## Vagrant -If you are a [Vagrant](https://www.vagrantup.com/) user, all you have to do to get started hacking Tendermint is: +If you are a [Vagrant](https://www.vagrantup.com/) user, you can get started hacking Tendermint with the commands below. -In case you installed Vagrant in 2017, you might need to run +NOTE: In case you installed Vagrant in 2017, you might need to run `vagrant box update` to upgrade to the latest `ubuntu/xenial64`. ``` vagrant up vagrant ssh -cd ~/go/src/github.com/tendermint/tendermint make test ``` + ## Testing All repos should be hooked up to circle.