-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ecab2c
commit 08e60ca
Showing
3 changed files
with
28 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,46 @@ | ||
# init servers env | ||
init: | ||
.DEFAULT_GOAL:=help | ||
|
||
init: ## init servers env | ||
ansible-playbook -i hosts init_server.yml | ||
|
||
# deploy prometheus | ||
prometheus: | ||
prometheus: ## deploy prometheus and grafana | ||
ansible-playbook -i hosts deploy_prometheus.yml | ||
|
||
# deploy jaeger server | ||
jaeger: | ||
jaeger: ## deploy jaeger server | ||
ansible-playbook -i hosts deploy_jaeger.yml | ||
|
||
# deploy muta exporter | ||
exporter: | ||
exporter: ## deploy muta monitor exporter | ||
server=`grep -A 1 "\[jaeger_server\]" hosts | grep -v "\[jaeger_server\]"`; \ | ||
ansible-playbook -i hosts deploy_exporter.yml --extra-vars "jaeger_server=$$server" | ||
|
||
# run muta-chain benchmark | ||
benchmark: | ||
benchmark: ## run muta-chain benchmark | ||
ansible-playbook -i hosts deploy_benchmark.yml | ||
|
||
# deploy muta-chain services | ||
muta: | ||
muta: ## deploy muta-chain services | ||
ansible-playbook -i hosts deploy_muta.yml | ||
|
||
# start all muta-chain services as daemon | ||
start: | ||
start: ## start all muta-chain services as daemon | ||
@echo "[start]Starting all services" | ||
ansible-playbook -i hosts deploy_muta.yml --skip-tags build_config -t start | ||
|
||
# restart all muta-chain services | ||
restart: | ||
restart: ## restart all muta-chain services | ||
ansible-playbook -i hosts deploy_muta.yml --skip-tags build_config -t "stop,start" | ||
|
||
# stop all muta-chain services | ||
stop: | ||
stop: ## stop all muta-chain services | ||
@echo "[stop]Stop all services" | ||
ansible-playbook -i hosts deploy_muta.yml --skip-tags build_config -t stop | ||
|
||
# delete all muta-chain data | ||
clear: | ||
clear: ## delete all muta-chain data | ||
ansible-playbook -i hosts deploy_muta.yml --skip-tags build_config -t "stop,clear" | ||
|
||
# build muta-chain binary | ||
build: | ||
build: ## build muta-chain binary | ||
ansible-playbook -i hosts build_muta.yml | ||
|
||
# list muta-chain process | ||
ps: | ||
ps: ## list muta-chain process | ||
ansible -i hosts muta_node -m shell -a "ps -ef | grep muta-chain | grep -v grep" | ||
|
||
# Test node availability | ||
test: | ||
test: ## Test node availability | ||
ansible -i hosts allhost -m ping | ||
|
||
help: ## Display this help | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters