diff --git a/.env b/.env index 509ee51..1ff6e05 100644 --- a/.env +++ b/.env @@ -1,25 +1,25 @@ # Basenet settings LOCAL_DOMAIN=neofs.devenv IPV4_PREFIX=192.168.130 -CA_CERTS_TRUSTED_STORE=${PWD}/vendor/certs +CA_CERTS_TRUSTED_STORE="${PWD}/vendor/certs" # Bastion image BASTION_VERSION=10 BASTION_IMAGE=debian #NEOGO -NEOGO_VERSION=0.107.1 +NEOGO_VERSION=0.110.0 NEOGO_IMAGE=nspccdev/neo-go NEO_GO_PLATFORM=linux-amd64 -NEO_GO_URL=https://github.com/nspcc-dev/neo-go/releases/download/v${NEOGO_VERSION}/neo-go-${NEO_GO_PLATFORM} +NEO_GO_URL="https://github.com/nspcc-dev/neo-go/releases/download/v${NEOGO_VERSION}/neo-go-${NEO_GO_PLATFORM}" # NeoFS InnerRing nodes -IR_VERSION=0.44.1 +IR_VERSION=0.47.0 IR_IMAGE=nspccdev/neofs-ir IR_NUMBER_OF_NODES=1 # NeoFS Storage nodes -NODE_VERSION=0.44.1 +NODE_VERSION=0.47.0 NODE_IMAGE=nspccdev/neofs-storage # REST Gate @@ -34,28 +34,29 @@ S3_GW_IMAGE=nspccdev/neofs-s3-gw #S3_GW_URL=https://github.com/nspcc-dev/neofs-s3-gw/releases/download/v${S3_GW_VERSION}/neofs-s3-gw-${S3_GW_PLATFORM} # NeoFS CLI binary -NEOFS_CLI_URL=https://github.com/nspcc-dev/neofs-node/releases/download/v0.44.1/neofs-cli-linux-amd64 +NEOFS_CLI_VERSION=v0.47.0 +NEOFS_CLI_URL="https://github.com/nspcc-dev/neofs-node/releases/download/${NEOFS_CLI_VERSION}/neofs-cli-linux-amd64" #NEOFS_CLI_PATH=/path/to/neofs-cli-binary # NeoFS ADM tool binary -NEOFS_ADM_VERSION=v0.44.1 -NEOFS_ADM_URL=https://github.com/nspcc-dev/neofs-node/releases/download/${NEOFS_ADM_VERSION}/neofs-adm-linux-amd64 +NEOFS_ADM_VERSION=v0.47.0 +NEOFS_ADM_URL="https://github.com/nspcc-dev/neofs-node/releases/download/${NEOFS_ADM_VERSION}/neofs-adm-linux-amd64" #NEOFS_ADM_PATH=/path/to/neofs-adm-binary # Compiled NeoFS Smart Contracts NEOFS_CONTRACTS_VERSION=v0.20.0 -NEOFS_CONTRACTS_URL=https://github.com/nspcc-dev/neofs-contract/releases/download/${NEOFS_CONTRACTS_VERSION}/neofs-contract-${NEOFS_CONTRACTS_VERSION}.tar.gz +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/unpacked/neofs-contracts-dir # Control service addresses used for healthchecks -NEOFS_IR_CONTROL_GRPC_ENDPOINT_1=ir01.${LOCAL_DOMAIN}:16512 -NEOFS_IR_CONTROL_GRPC_ENDPOINT_2=ir02.${LOCAL_DOMAIN}:16512 -NEOFS_IR_CONTROL_GRPC_ENDPOINT_3=ir03.${LOCAL_DOMAIN}:16512 -NEOFS_IR_CONTROL_GRPC_ENDPOINT_4=ir04.${LOCAL_DOMAIN}:16512 -NEOFS_IR_CONTROL_GRPC_ENDPOINT_5=ir05.${LOCAL_DOMAIN}:16512 -NEOFS_IR_CONTROL_GRPC_ENDPOINT_6=ir06.${LOCAL_DOMAIN}:16512 -NEOFS_IR_CONTROL_GRPC_ENDPOINT_7=ir07.${LOCAL_DOMAIN}:16512 -NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1=s01.${LOCAL_DOMAIN}:8081 -NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2=s02.${LOCAL_DOMAIN}:8081 -NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3=s03.${LOCAL_DOMAIN}:8081 -NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_4=s04.${LOCAL_DOMAIN}:8081 +NEOFS_IR_CONTROL_GRPC_ENDPOINT_1="ir01.${LOCAL_DOMAIN}:16512" +NEOFS_IR_CONTROL_GRPC_ENDPOINT_2="ir02.${LOCAL_DOMAIN}:16512" +NEOFS_IR_CONTROL_GRPC_ENDPOINT_3="ir03.${LOCAL_DOMAIN}:16512" +NEOFS_IR_CONTROL_GRPC_ENDPOINT_4="ir04.${LOCAL_DOMAIN}:16512" +NEOFS_IR_CONTROL_GRPC_ENDPOINT_5="ir05.${LOCAL_DOMAIN}:16512" +NEOFS_IR_CONTROL_GRPC_ENDPOINT_6="ir06.${LOCAL_DOMAIN}:16512" +NEOFS_IR_CONTROL_GRPC_ENDPOINT_7="ir07.${LOCAL_DOMAIN}:16512" +NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1="s01.${LOCAL_DOMAIN}:8081" +NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2="s02.${LOCAL_DOMAIN}:8081" +NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3="s03.${LOCAL_DOMAIN}:8081" +NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_4="s04.${LOCAL_DOMAIN}:8081" diff --git a/Makefile b/Makefile index 84e80c0..2bed9be 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ check_nodes: pull: @for svc in $(PULL_SVCS); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml pull 2>&1 | tee -a docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml pull 2>&1 | tee -a docker compose.err; \ done $(call error_handler,$@); @: @@ -92,7 +92,7 @@ pull: get: @for svc in $(GET_SVCS); do \ echo "$@ for service: $${svc}"; \ - make get.$$svc 2>&1 | tee -a docker-compose.err; \ + make get.$$svc 2>&1 | tee -a docker compose.err; \ done $(call error_handler,$@); @: @@ -102,7 +102,7 @@ get: up: up/basic @for svc in $(START_SVCS); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ done $(call error_handler,$@); @echo "Full NeoFS Developer Environment is ready" @@ -112,7 +112,7 @@ up: up/basic up/basic: up/bootstrap @for svc in $(START_BASIC); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ done @./bin/tick.sh @./bin/config.sh SystemDNS container @@ -125,7 +125,7 @@ up/bootstrap: check_nodes get vendor/hosts @echo "NEOFS_IR_CONTRACTS_NEOFS="`./vendor/neo-go contract calc-hash -s NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --in vendor/contracts/neofs/contract.nef -m vendor/contracts/neofs/manifest.json | grep -Eo '[a-fA-F0-9]{40}'` > services/ir${IR_NUMBER_OF_NODES}/.ir.env @for svc in $(START_BOOTSTRAP); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ done @source ./bin/helper.sh @docker exec main_chain neo-go wallet nep17 transfer --force --await --wallet-config /wallets/config.yml -r http://main-chain.neofs.devenv:30333 --from NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y --to NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --token GAS --amount 1000 @@ -141,7 +141,7 @@ up/bootstrap: check_nodes get vendor/hosts # Build up certain service .PHONY: up/% up/%: get vendor/hosts - @docker-compose -f services/$*/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err + @docker compose -f services/$*/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err $(call error_handler,$@); @echo "Developer Environment for $* service is ready" @@ -154,7 +154,7 @@ down: down/add down/basic down/bootstrap down/add: @for svc in $(STOP_SVCS); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee -a docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee -a docker-compose.err; \ done $(call error_handler,$@); @@ -163,7 +163,7 @@ down/add: down/basic: @for svc in $(STOP_BASIC); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee -a docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee -a docker-compose.err; \ done $(call error_handler,$@); @@ -172,14 +172,14 @@ down/basic: down/bootstrap: @for svc in $(STOP_BOOTSTRAP); do \ echo "$@ for service: $${svc}"; \ - docker-compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee docker-compose.err; \ + docker compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee docker-compose.err; \ done $(call error_handler,$@); # Stop certain service .PHONY: down/% down/%: - @docker-compose -f services/$*/docker-compose.yml down 2>&1 | tee docker-compose.err + @docker compose -f services/$*/docker-compose.yml down 2>&1 | tee docker-compose.err $(call error_handler,$@); # Generate changes for /etc/hosts @@ -208,7 +208,7 @@ clean: @rm -rf vendor/* services/storage/s04tls.* services/k6_node/id_ed25519* @for svc in $(PULL_SVCS) do - vols=`docker-compose -f services/$${svc}/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err` + vols=`docker compose -f services/$${svc}/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err` if [[ ! -z "$${vols}" ]]; then for vol in $${vols}; do docker volume rm -f "$${svc}_$${vol}" 2> /dev/null @@ -228,12 +228,12 @@ env: # Restart storage nodes with clean volumes .PHONY: restart.storage-clean restart.storage-clean: - @docker-compose -f ./services/storage/docker-compose.yml down 2>&1 | tee -a docker-compose.err - vols=`docker-compose -f services/storage/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err` + @docker compose -f ./services/storage/docker-compose.yml down 2>&1 | tee -a docker-compose.err + vols=`docker compose -f services/storage/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err` if [ ! -z "$${vols}" ]; then for vol in $${vols}; do docker volume rm -f "storage_$${vol}" 2> /dev/null done fi - @docker-compose -f ./services/storage/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err + @docker compose -f ./services/storage/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err $(call error_handler,$@); diff --git a/README.md b/README.md index 4012c16..4f04113 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,7 @@ Tools to set up local NeoFS network and N3 privnets. Devenv, for short. ## Prerequisites Make sure you have installed all of the following prerequisites on your machine: -* docker -* docker-compose +* docker compose * make (`3.82+`) * expect * openssl diff --git a/services/chain/protocol.privnet4.yml b/services/chain/protocol.privnet4.yml index 7aa0846..dc2e94d 100644 --- a/services/chain/protocol.privnet4.yml +++ b/services/chain/protocol.privnet4.yml @@ -15,12 +15,6 @@ ProtocolConfiguration: - 039a1c33ed18bb57f6e6b3e712b54b924d2b9137c4906cf433ee8693a3810e380e - 02d3088931c034a390c5bea16d19ef2debe9702019270c94913528a8ac30e17373 - 02fb7531661401222dcf2711bbd78597e8152ba886612e44ea530a08bbe4eba810 - P2PNotary: - - 0345eefc50545e83dfc7ec9ab648210dddbeb3996912a8ff6416e2d3ec51a8e324 - - 039a1c33ed18bb57f6e6b3e712b54b924d2b9137c4906cf433ee8693a3810e380e - - 02d3088931c034a390c5bea16d19ef2debe9702019270c94913528a8ac30e17373 - - 02fb7531661401222dcf2711bbd78597e8152ba886612e44ea530a08bbe4eba810 - ApplicationConfiguration: SkipBlockVerification: false diff --git a/services/chain/protocol.privnet7.yml b/services/chain/protocol.privnet7.yml index da0c925..0336ffc 100644 --- a/services/chain/protocol.privnet7.yml +++ b/services/chain/protocol.privnet7.yml @@ -18,15 +18,6 @@ ProtocolConfiguration: - 03a90f6e7dcb49cf9603dde786781c4fdbd43f8a57c5b23fe93d4ecc33952599fd - 03c7aa35ab64aad9b85a35647b1f0aec59344271a6c2ed7644faf1997ee098bbab - 02ca9097295d28e28e2ae55eb62ca0b1ac48b2d9b6dcb64ddb936a64d80cb8b795 - P2PNotary: - - 022c0bf9e1a0c864905d2b8909555ae421db9a52f86ab268a84d9be42a6ad9d858 - - 024a640c8cbe3e34f0cd927950c64f6d0d239770397fe645d52bf920fddd655bf8 - - 024f19ec7a8e35722c8cdd7d21fcc2090f2658b2fd67b7b23f1936dc5e7b54b216 - - 03797de54a6abb6d19c22a5afabf30d320a9348b0f294315e74cb3b423b1ac9dc9 - - 03a90f6e7dcb49cf9603dde786781c4fdbd43f8a57c5b23fe93d4ecc33952599fd - - 03c7aa35ab64aad9b85a35647b1f0aec59344271a6c2ed7644faf1997ee098bbab - - 02ca9097295d28e28e2ae55eb62ca0b1ac48b2d9b6dcb64ddb936a64d80cb8b795 - ApplicationConfiguration: SkipBlockVerification: false diff --git a/services/ir1/cfg/config.yml b/services/ir1/cfg/config.yml index ff53db4..ae19cfd 100644 --- a/services/ir1/cfg/config.yml +++ b/services/ir1/cfg/config.yml @@ -79,11 +79,6 @@ emit: storage: amount: 1000000000 # Fixed8 value of sidechain GAS emitted to all storage nodes once per GAS emission cycle; disabled by default -# Storage node removal settings -netmap_cleaner: - enabled: true # Enable voting for removing stale storage nodes from network map - threshold: 3 # Number of NeoFS epoch without bootstrap request from storage node before it considered stale - # Audit settings audit: pdp: @@ -93,3 +88,6 @@ audit: settlement: basic_income_rate: 100000000 # Optional: override basic income rate value from network config; applied only in debug mode audit_fee: 100000 # Optional: override audit fee value from network config; applied only in debug mode + +experimental: + chain_meta_data: true # Optional: allows creating containers with metadata handled via FS chain diff --git a/services/ir4/cfg/config.yml b/services/ir4/cfg/config.yml index 7cace37..6d2dfa5 100644 --- a/services/ir4/cfg/config.yml +++ b/services/ir4/cfg/config.yml @@ -73,11 +73,6 @@ emit: storage: amount: 1000000000 # Fixed8 value of sidechain GAS emitted to all storage nodes once per GAS emission cycle; disabled by default -# Storage node removal settings -netmap_cleaner: - enabled: true # Enable voting for removing stale storage nodes from network map - threshold: 3 # Number of NeoFS epoch without bootstrap request from storage node before it considered stale - # Audit settings audit: pdp: @@ -87,3 +82,6 @@ audit: settlement: basic_income_rate: 100000000 # Optional: override basic income rate value from network config; applied only in debug mode audit_fee: 100000 # Optional: override audit fee value from network config; applied only in debug mode + +experimental: + chain_meta_data: true # Optional: allows creating containers with metadata handled via FS chain diff --git a/services/ir7/cfg/config.yml b/services/ir7/cfg/config.yml index fe246d5..b2f88a6 100644 --- a/services/ir7/cfg/config.yml +++ b/services/ir7/cfg/config.yml @@ -79,11 +79,6 @@ emit: storage: amount: 1000000000 # Fixed8 value of sidechain GAS emitted to all storage nodes once per GAS emission cycle; disabled by default -# Storage node removal settings -netmap_cleaner: - enabled: true # Enable voting for removing stale storage nodes from network map - threshold: 3 # Number of NeoFS epoch without bootstrap request from storage node before it considered stale - # Audit settings audit: pdp: @@ -93,3 +88,6 @@ audit: settlement: basic_income_rate: 100000000 # Optional: override basic income rate value from network config; applied only in debug mode audit_fee: 100000 # Optional: override audit fee value from network config; applied only in debug mode + +experimental: + chain_meta_data: true # Optional: allows creating containers with metadata handled via FS chain diff --git a/services/storage/cfg/config.yml b/services/storage/cfg/config.yml index eef6433..fcc0951 100644 --- a/services/storage/cfg/config.yml +++ b/services/storage/cfg/config.yml @@ -20,15 +20,10 @@ fschain: endpoints: # Side chain NEO RPC endpoints - ws://ir01.neofs.devenv:30333/ws -# Tree section -tree: - enabled: true - # Storage engine configuration storage: - shard: - 0: - writecache: + shards: + - writecache: enabled: false path: /storage/wc0 # Write-cache root directory @@ -36,17 +31,11 @@ storage: path: /storage/meta0 # Path to the metabase blobstor: - - type: peapod - path: /storage/peapod0.db - - type: fstree - path: /storage/fstree0 # FSTree root directory - depth: 2 + type: fstree + path: /storage/fstree0 # FSTree root directory + depth: 2 - pilorama: - path: /storage/pilorama0 # Path to the pilorama database - - 1: - writecache: + - writecache: enabled: false path: /storage/wc1 # Write-cache root directory @@ -54,11 +43,6 @@ storage: path: /storage/meta1 # Path to the metabase blobstor: - - type: peapod - path: /storage/peapod1.db - - type: fstree - path: /storage/fstree1 # FSTree root directory - depth: 2 - - pilorama: - path: /storage/pilorama1 # Path to the pilorama database + type: fstree + path: /storage/fstree1 # FSTree root directory + depth: 2 diff --git a/services/storage/docker-compose.yml b/services/storage/docker-compose.yml index 427879f..d845099 100644 --- a/services/storage/docker-compose.yml +++ b/services/storage/docker-compose.yml @@ -28,8 +28,8 @@ services: - NEOFS_NODE_ADDRESSES=s01.${LOCAL_DOMAIN}:8080 - NEOFS_GRPC_0_ENDPOINT=s01.${LOCAL_DOMAIN}:8080 - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1} - - NEOFS_NODE_ATTRIBUTE_0=UN-LOCODE:RU MOW - - NEOFS_NODE_ATTRIBUTE_1=Price:22 + - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:RU MOW + - NEOFS_NODE_ATTRIBUTES_1=Price:22 healthcheck: test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1}"] interval: 5s @@ -64,8 +64,8 @@ services: - NEOFS_NODE_ADDRESSES=s02.${LOCAL_DOMAIN}:8080 - NEOFS_GRPC_0_ENDPOINT=s02.${LOCAL_DOMAIN}:8080 - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2} - - NEOFS_NODE_ATTRIBUTE_0=UN-LOCODE:RU LED - - NEOFS_NODE_ATTRIBUTE_1=Price:33 + - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:RU LED + - NEOFS_NODE_ATTRIBUTES_1=Price:33 healthcheck: test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2}"] interval: 5s @@ -100,8 +100,8 @@ services: - NEOFS_NODE_ADDRESSES=s03.${LOCAL_DOMAIN}:8080 - NEOFS_GRPC_0_ENDPOINT=s03.${LOCAL_DOMAIN}:8080 - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3} - - NEOFS_NODE_ATTRIBUTE_0=UN-LOCODE:SE STO - - NEOFS_NODE_ATTRIBUTE_1=Price:11 + - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:SE STO + - NEOFS_NODE_ATTRIBUTES_1=Price:11 healthcheck: test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3}"] interval: 5s @@ -142,8 +142,8 @@ services: - NEOFS_GRPC_1_TLS_ENABLED=true - NEOFS_GRPC_1_TLS_CERTIFICATE=/tls.crt - NEOFS_GRPC_1_TLS_KEY=/tls.key - - NEOFS_NODE_ATTRIBUTE_0=UN-LOCODE:FI HEL - - NEOFS_NODE_ATTRIBUTE_1=Price:44 + - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:FI HEL + - NEOFS_NODE_ATTRIBUTES_1=Price:44 healthcheck: test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_4}"] interval: 5s