Use common /etc/hosts
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
bdb2eb6d67
commit
7d8fbc7754
6 changed files with 46 additions and 51 deletions
19
Makefile
19
Makefile
|
@ -34,14 +34,9 @@ pull:
|
|||
get: $(foreach SVC, $(GET_SVCS), get.$(SVC))
|
||||
@:
|
||||
|
||||
# Build custom environments
|
||||
.PHONY: rebuild
|
||||
rebuild: $(foreach SVC, $(BUILD_SVCS), build.$(SVC))
|
||||
@:
|
||||
|
||||
# Start environments
|
||||
.PHONY: up
|
||||
up: get
|
||||
up: get vendor/hosts
|
||||
$(foreach SVC, $(START_SVCS), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d))
|
||||
|
||||
# Stop environments
|
||||
|
@ -49,10 +44,9 @@ up: get
|
|||
down:
|
||||
$(foreach SVC, $(STOP_SVCS), $(shell docker-compose -f services/$(SVC)/docker-compose.yml down))
|
||||
|
||||
# Display changes for /etc/hosts
|
||||
.PHONY: hosts
|
||||
.PHONY: vendor/hosts
|
||||
.ONESHELL:
|
||||
hosts:
|
||||
vendor/hosts:
|
||||
@for file in $(HOSTS_LINES)
|
||||
do
|
||||
while read h
|
||||
|
@ -61,4 +55,9 @@ hosts:
|
|||
sed 's|IPV4_PREFIX|$(IPV4_PREFIX)|g' | \
|
||||
sed 's|LOCAL_DOMAIN|$(LOCAL_DOMAIN)|g'
|
||||
done < $${file};
|
||||
done
|
||||
done > $@
|
||||
|
||||
# Display changes for /etc/hosts
|
||||
.PHONY: hosts
|
||||
hosts: vendor/hosts
|
||||
@cat vendor/hosts
|
||||
|
|
|
@ -16,7 +16,8 @@ services:
|
|||
networks:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.10
|
||||
|
||||
volumes:
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
networks:
|
||||
internet:
|
||||
driver: bridge
|
||||
|
|
|
@ -23,6 +23,7 @@ services:
|
|||
- ./../../vendor/chain.gz:/chain.gz
|
||||
- ./protocol.privnet.yml:/config/protocol.privnet.yml
|
||||
- ./node-wallet.json:/wallets/node-wallet.json
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
|
||||
neofs_main_chain-healthy:
|
||||
image: alpine
|
||||
|
|
|
@ -11,11 +11,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.61
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./01.key:/01.key" ]
|
||||
volumes:
|
||||
- ./01.key:/01.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/01.key
|
||||
|
@ -29,11 +28,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.62
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./02.key:/02.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./02.key:/02.key" ]
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/02.key
|
||||
|
@ -47,11 +45,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.63
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./03.key:/03.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./03.key:/03.key" ]
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/03.key
|
||||
|
@ -65,11 +62,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.64
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./04.key:/04.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./04.key:/04.key" ]
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/04.key
|
||||
|
@ -83,11 +79,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.65
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./05.key:/05.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./05.key:/05.key" ]
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/05.key
|
||||
|
@ -101,11 +96,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.66
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./06.key:/06.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./06.key:/06.key" ]
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/06.key
|
||||
|
@ -119,11 +113,10 @@ services:
|
|||
ir_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.67
|
||||
extra_hosts:
|
||||
- "main_chain:${IPV4_PREFIX}.50"
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./07.key:/07.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./07.key:/07.key" ]
|
||||
env_file: [ ".env", ".ir.env" ]
|
||||
environment:
|
||||
- NEOFS_IR_KEY=/07.key
|
||||
|
|
|
@ -23,6 +23,7 @@ services:
|
|||
- ./../../vendor/morph_chain.gz:/morph_chain.gz
|
||||
- ./protocol.privnet.yml:/config/protocol.privnet.yml
|
||||
- ./node-wallet.json:/wallets/node-wallet.json
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
|
||||
neofs_morph_chain-healthy:
|
||||
image: alpine
|
||||
|
|
|
@ -11,10 +11,10 @@ services:
|
|||
storage_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.71
|
||||
extra_hosts:
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./01.key:/01.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./01.key:/01.key" ]
|
||||
env_file: [ ".env", ".storage.env" ]
|
||||
environment:
|
||||
- NEOFS_NODE_KEY=/01.key
|
||||
|
@ -31,10 +31,10 @@ services:
|
|||
storage_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.72
|
||||
extra_hosts:
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./02.key:/02.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./02.key:/02.key" ]
|
||||
env_file: [ ".env", ".storage.env" ]
|
||||
environment:
|
||||
- NEOFS_NODE_KEY=/02.key
|
||||
|
@ -50,10 +50,10 @@ services:
|
|||
storage_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.73
|
||||
extra_hosts:
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./03.key:/03.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./03.key:/03.key" ]
|
||||
env_file: [ ".env", ".storage.env" ]
|
||||
environment:
|
||||
- NEOFS_NODE_KEY=/03.key
|
||||
|
@ -69,10 +69,10 @@ services:
|
|||
storage_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.74
|
||||
extra_hosts:
|
||||
- "morph_chain:${IPV4_PREFIX}.90"
|
||||
volumes:
|
||||
- ./04.key:/04.key
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
stop_signal: SIGKILL
|
||||
volumes: [ "./04.key:/04.key" ]
|
||||
env_file: [ ".env", ".storage.env" ]
|
||||
environment:
|
||||
- NEOFS_NODE_KEY=/04.key
|
||||
|
|
Loading…
Reference in a new issue