39 lines
982 B
Makefile
39 lines
982 B
Makefile
include ../Makefile
|
|
NODE_CONFIG=data/config-$(NODE_LETTER)/innerring.yml
|
|
export NODE_CONFIG
|
|
|
|
.PHONY: up down down-fast
|
|
up: COMPOSE_ARGS=-d
|
|
up: network-up
|
|
down-fast: COMPOSE_ARGS=--timeout 0
|
|
down-fast: down
|
|
up down:
|
|
error=0; \
|
|
for NODE_ID in {1..$(NODE_COUNT)}; do \
|
|
GID=$$(id -g); \
|
|
export NODE_ID UID GID; \
|
|
docker-compose -p "innerring$$NODE_ID" $@ $(COMPOSE_ARGS) || error=$$?; \
|
|
done; \
|
|
exit $$error
|
|
|
|
.PHONY: innerring
|
|
innerring: wallet $(NODE_CONFIG) | $(IR) $(LOCODE) $(CLI)
|
|
mkdir -p log
|
|
$(IR) --config $(NODE_CONFIG) 2>&1 | tee --append log/$@$(NODE_ID)-$(NODE_LETTER)
|
|
|
|
$(NODE_CONFIG): innerring.yml
|
|
mkdir -p $(dir $@)
|
|
cp $< $@
|
|
sed -i \
|
|
-e 's/NODE_COUNT/$(NODE_COUNT)/g' \
|
|
-e 's/NODE_ID/$(NODE_ID)/g' \
|
|
-e 's/NODE_LETTER/$(NODE_LETTER)/g' \
|
|
-e 's/NODE_MINPEERS/$(NODE_MINPEERS)/g' \
|
|
$@
|
|
|
|
wallet:
|
|
ln -sf ../morph/$@ $@
|
|
|
|
.PHONY: healthcheck
|
|
healthcheck: | $(CLI)
|
|
$(CLI) control ir healthcheck -q --wallet wallet/az.json --endpoint $(IR_NODE1_IP):8099
|