[#208] Use neofs-adm to deploy sidechain environment

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
Alexey Vanin 2022-09-08 18:26:04 +03:00 committed by Alex Vanin
parent d93f2fc79e
commit aacbb8f82f
4 changed files with 6 additions and 24 deletions

8
.env
View file

@ -8,10 +8,6 @@ CA_CERTS_TRUSTED_STORE=/etc/ssl/certs
CHAIN_URL="https://github.com/nspcc-dev/neofs-contract/releases/download/v0.15.5/devenv_mainchain_notary_disabled.gz"
NEOGO_VERSION=0.99.2
# NeoGo sidechain
#MORPH_CHAIN_PATH="/path/to/morph-devenv.dump.gz"
MORPH_CHAIN_URL="https://github.com/nspcc-dev/neofs-contract/releases/download/v0.15.5/devenv_sidechain.gz"
# NeoFS InnerRing nodes
IR_VERSION=0.31.0
IR_IMAGE=nspccdev/neofs-ir
@ -47,9 +43,9 @@ NEOFS_CLI_URL=https://github.com/nspcc-dev/neofs-node/releases/download/v0.31.0/
# NeoFS ADM tool binary
NEOFS_ADM_VERSION=v0.31.0
NEOFS_ADM_URL=https://github.com/nspcc-dev/neofs-node/releases/download/${NEOFS_ADM_VERSION}/neofs-adm-amd64.tar.gz
#NEOFS_ADM_PATH=/path/to/neofs-adm
#NEOFS_ADM_PATH=/path/to/neofs-adm-binary
# Compiled NeoFS Smart Contracts
NEOFS_CONTRACTS_VERSION=v0.15.5
NEOFS_CONTRACTS_URL=https://github.com/nspcc-dev/neofs-contract/releases/download/${NEOFS_CONTRACTS_VERSION}/neofs-contract-${NEOFS_CONTRACTS_VERSION}.tar.gz
#NEOFS_CONTRACTS_PATH=/path/to/neofs-contracts
#NEOFS_CONTRACTS_PATH=/path/to/unpacked/neofs-contracts-dir

View file

@ -72,6 +72,9 @@ up/basic: up/essential
.PHONY: up/essential
up/essential: get vendor/hosts
@$(foreach SVC, $(START_ESSENTIAL), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d))
@./vendor/neofs-adm --config services/ir/neofs-adm.yml morph init --alphabet-wallets ./services/ir --contracts vendor/contracts || exit 1
@for f in ./services/storage/wallet*.json; do echo "Transfer GAS to wallet $${f}" && ./vendor/neofs-adm -c services/ir/neofs-adm.yml morph refill-gas --storage-wallet $${f} --gas 10.0 --alphabet-wallets services/ir || exit 1; done
@echo "NeoFS sidechain environment is deployed"
# Build up certain service
.PHONY: up/%

View file

@ -1,19 +1,5 @@
# Download NeoFS sidechain dump with pre-deployed NeoFS contracts
# Download NeoFS Contracts and Adm tool to deploy environment
get.morph_chain: get.contracts get.adm
get.morph_chain: MORPH_CHAIN_DUMP_NAME=neo.morph.dump.
get.morph_chain: MORPH_CHAIN_PATH?=
get.morph_chain:
@mkdir -p ./vendor
ifeq (${MORPH_CHAIN_PATH},)
@echo "⇒ Download morph chain dump from ${MORPH_CHAIN_URL}"
@curl \
-sSL "${MORPH_CHAIN_URL}" \
-o ./vendor/morph_chain.gz
else
@echo "⇒ Copy local archive ${MORPH_CHAIN_PATH}"
@cp ${MORPH_CHAIN_PATH} ./vendor/morph_chain.gz
endif
get.contracts: NEOFS_CONTRACTS_DEST=./vendor/contracts
get.contracts: NEOFS_CONTRACTS_ARCHIVE=neofs-contracts.tar.gz

View file

@ -14,10 +14,7 @@ services:
ipv4_address: ${IPV4_PREFIX}.90
stop_signal: SIGKILL
env_file: [ ".int_test.env" ]
environment:
- ACC=/morph_chain.gz
volumes:
- ./../../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