@ -178,6 +178,14 @@ metalinter_all:
@echo "--> Running linter (all)"
@echo "--> Running linter (all)"
gometalinter.v2 --vendor --deadline= 600s --enable-all --disable= lll ./...
gometalinter.v2 --vendor --deadline= 600s --enable-all --disable= lll ./...
###########################################################
### Docker image
build-docker :
cp build/tendermint DOCKER/tendermint
docker build --label= tendermint --tag= "tendermint/tendermint" DOCKER
rm -rf DOCKER/tendermint
###########################################################
###########################################################
### Local testnet using docker
### Local testnet using docker
@ -199,22 +207,23 @@ docker-stop:
# Server management
# Server management
server-setup :
server-setup :
@if [ -z " $( DO_API_TOKEN) " ] ; then echo "DO_API_TOKEN environment variable not set." ; false ; fi
@if ! [ -f $( HOME) /.ssh/id_rsa.pub ] ; then ssh-keygen ; fi
@if ! [ -f $( HOME) /.ssh/id_rsa.pub ] ; then ssh-keygen ; fi
cd networks/remote/terraform && terraform init && terraform apply -var DO_API_TOKEN = " $( DO_API_TOKEN) " -var SSH_KEY_FILE = " $( HOME) /.ssh/id_rsa.pub "
cd networks/remote/terraform && terraform init && terraform apply -var DO_API_TOKEN = " $( DO_API_TOKEN) " -var SSH_KEY_FILE = " $( HOME) /.ssh/id_rsa.pub "
# @if ! [ -f $(CURDIR)/build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/tendermint:Z tendermint/localnode testnet --n 4 --o . ; fi
build/tendermint testnet --n 4 --o build/
cd networks/remote/ansible && ansible-playbook -i inventory/digital_ocean.py -l remotenet --ssh-common-args '-o StrictHostKeyChecking=False' install.yml
$( MAKE) server-config
server-destroy :
cd networks/remote/terraform && terraform destroy
@if ! [ -f $( CURDIR) /build/node0/config/genesis.json ] ; then docker run --rm -v $( CURDIR) /build:/tendermint:Z tendermint/localnode testnet --v 0 --n 4 --o . ; fi
cd networks/remote/ansible && ANSIBLE_HOST_KEY_CHECKING = False ansible-playbook -i inventory/digital_ocean.py -l remotenet install.yml
@echo "Next step: Add your validator setup in the genesis.json and config.tml files and run \"make server-config\". (Public key of validator, chain ID, peer IP and node ID.)"
# Configuration management
# Configuration management
server-config :
server-config :
cd networks/remote/ansible && ansible-playbook -i inventory/digital_ocean.py -l remotenet reconfig.yml -e BINARY = $( CURDIR) /build/tendermint -e CONFIGDIR = $( CURDIR) /build
cd networks/remote/ansible && ansible-playbook -i inventory/digital_ocean.py -l remotenet config.yml -e BINARY = $( CURDIR) /build/tendermint -e CONFIGDIR = $( CURDIR) /build
server-destroy :
@if [ -z " $( DO_API_TOKEN) " ] ; then echo "DO_API_TOKEN environment variable not set." ; false ; fi
cd networks/remote/terraform && terraform destroy -var DO_API_TOKEN = " $( DO_API_TOKEN) " -var SSH_KEY_FILE = " $( HOME) /.ssh/id_rsa.pub "
# To avoid unintended conflicts with file names, always add to .PHONY
# To avoid unintended conflicts with file names, always add to .PHONY
# unless there is a reason not to.
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY : check build build_race dist install check_tools get_tools update_tools get_vendor_deps draw_deps test_cover test_apps test_persistence test_p 2p test test_race test_integrations test_release test 100 vagrant_test fmt build -linux docker -start docker -stop
.PHONY : check build build_race dist install check_tools get_tools update_tools get_vendor_deps draw_deps test_cover test_apps test_persistence test_p 2p test test_race test_integrations test_release test 100 vagrant_test fmt build -linux docker -start docker -stop build -docker server -setup server -config server -destroy