Merge pull request #1140 from tendermint/feature/vagrant
Fix Vagrantfile
This commit is contained in:
commit
18d96266bc
|
@ -17,6 +17,7 @@ test/logs
|
||||||
coverage.txt
|
coverage.txt
|
||||||
docs/_build
|
docs/_build
|
||||||
docs/tools
|
docs/tools
|
||||||
|
*.log
|
||||||
|
|
||||||
scripts/wal2json/wal2json
|
scripts/wal2json/wal2json
|
||||||
scripts/cutWALUntil/cutWALUntil
|
scripts/cutWALUntil/cutWALUntil
|
||||||
|
|
|
@ -42,15 +42,18 @@ Run `bash scripts/glide/status.sh` to get a list of vendored dependencies that m
|
||||||
|
|
||||||
## Vagrant
|
## 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.
|
||||||
|
|
||||||
|
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 up
|
||||||
vagrant ssh
|
vagrant ssh
|
||||||
cd ~/go/src/github.com/tendermint/tendermint
|
|
||||||
make test
|
make test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
All repos should be hooked up to circle.
|
All repos should be hooked up to circle.
|
||||||
|
@ -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
|
- 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 master
|
||||||
- merge hotfix-vX.X.X to develop
|
- merge hotfix-vX.X.X to develop
|
||||||
- delete the hotfix-vX.X.X branch
|
- delete the hotfix-vX.X.X branch
|
||||||
|
|
|
@ -24,26 +24,29 @@ Vagrant.configure("2") do |config|
|
||||||
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
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
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
|
# set env variables
|
||||||
cat << "EOF" >> /home/ubuntu/.bash_profile
|
echo 'export PATH=$PATH:/usr/lib/go-1.9/bin:/home/vagrant/go/bin' >> /home/vagrant/.bash_profile
|
||||||
export PATH=$PATH:/usr/lib/go-1.9/bin:/home/ubuntu/go/bin
|
echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.bash_profile
|
||||||
export GOPATH=/home/ubuntu/go
|
echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.bash_profile
|
||||||
export LC_ALL=en_US.UTF-8
|
echo 'cd go/src/github.com/tendermint/tendermint' >> /home/vagrant/.bash_profile
|
||||||
cd go/src/github.com/tendermint/tendermint
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p /home/ubuntu/go/bin
|
mkdir -p /home/vagrant/go/bin
|
||||||
mkdir -p /home/ubuntu/go/src/github.com/tendermint
|
mkdir -p /home/vagrant/go/src/github.com/tendermint
|
||||||
ln -s /vagrant /home/ubuntu/go/src/github.com/tendermint/tendermint
|
ln -s /vagrant /home/vagrant/go/src/github.com/tendermint/tendermint
|
||||||
|
|
||||||
chown -R ubuntu:ubuntu /home/ubuntu/go
|
chown -R vagrant:vagrant /home/vagrant/go
|
||||||
chown ubuntu:ubuntu /home/ubuntu/.bash_profile
|
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'
|
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
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue