[#33] Move storage nodes shards to volumes

Need to save node's data between runs. Useful for test cases.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
Stanislav Bogatyrev 2021-01-13 13:28:19 +03:00 committed by Stanislav Bogatyrev
parent 3c571faab6
commit 88b9e200d6
2 changed files with 20 additions and 0 deletions

View file

@ -71,5 +71,15 @@ hosts: vendor/hosts
# Clean-up the envirinment # Clean-up the envirinment
.PHONY: clean .PHONY: clean
.ONESHELL:
clean: clean:
@rm -rf vendor/* @rm -rf vendor/*
@for svc in $(START_SVCS)
do
vols=`docker-compose -f services/$${svc}/docker-compose.yml config --volumes`
if [[ ! -z "$${vols}" ]]; then
for vol in $${vols}; do
docker volume rm "$${svc}_$${vol}" 2> /dev/null
done
fi
done

View file

@ -15,6 +15,7 @@ services:
volumes: volumes:
- ./01.key:/01.key - ./01.key:/01.key
- ./../../vendor/hosts:/etc/hosts - ./../../vendor/hosts:/etc/hosts
- storage_s01:/storage
stop_signal: SIGKILL stop_signal: SIGKILL
env_file: [ ".env", ".storage.env" ] env_file: [ ".env", ".storage.env" ]
environment: environment:
@ -36,6 +37,7 @@ services:
volumes: volumes:
- ./02.key:/02.key - ./02.key:/02.key
- ./../../vendor/hosts:/etc/hosts - ./../../vendor/hosts:/etc/hosts
- storage_s02:/storage
stop_signal: SIGKILL stop_signal: SIGKILL
env_file: [ ".env", ".storage.env" ] env_file: [ ".env", ".storage.env" ]
environment: environment:
@ -57,6 +59,7 @@ services:
volumes: volumes:
- ./03.key:/03.key - ./03.key:/03.key
- ./../../vendor/hosts:/etc/hosts - ./../../vendor/hosts:/etc/hosts
- storage_s03:/storage
stop_signal: SIGKILL stop_signal: SIGKILL
env_file: [ ".env", ".storage.env" ] env_file: [ ".env", ".storage.env" ]
environment: environment:
@ -78,6 +81,7 @@ services:
volumes: volumes:
- ./04.key:/04.key - ./04.key:/04.key
- ./../../vendor/hosts:/etc/hosts - ./../../vendor/hosts:/etc/hosts
- storage_s04:/storage
stop_signal: SIGKILL stop_signal: SIGKILL
env_file: [ ".env", ".storage.env" ] env_file: [ ".env", ".storage.env" ]
environment: environment:
@ -86,6 +90,12 @@ services:
- NEOFS_GRPC_ENDPOINT=s04.${LOCAL_DOMAIN}:8080 - NEOFS_GRPC_ENDPOINT=s04.${LOCAL_DOMAIN}:8080
- NEOFS_NODE_ATTRIBUTE_0=/Location:Europe/Country:Finalnd/City:Helsinki - NEOFS_NODE_ATTRIBUTE_0=/Location:Europe/Country:Finalnd/City:Helsinki
volumes:
storage_s01:
storage_s02:
storage_s03:
storage_s04:
networks: networks:
storage_int: storage_int:
internet: internet: