From c07f3ca1c4303319c892930dce892e132759c241 Mon Sep 17 00:00:00 2001 From: Alexander Chuprov Date: Sat, 17 Aug 2024 08:08:24 +0300 Subject: [PATCH 1/2] [#70] Makefile: Make bootstrap idempotent Signed-off-by: Alexander Chuprov --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9483dc7..2f505a9 100644 --- a/Makefile +++ b/Makefile @@ -85,11 +85,15 @@ up/bootstrap: get vendor/hosts && ./vendor/frostfs-adm -c frostfs-adm.yml morph refill-gas --storage-wallet $${f} --gas 10.0 \ || die "Failed to transfer GAS to alphabet wallets"; \ done - @echo "Create frostfsid subject for ./wallets/wallet.json" \ - && subj_key=`docker container exec -it morph_chain neo-go wallet dump-keys -w /wallets/wallet.json | tail -1 | tr -d ' \r\n'` \ + @echo "Create frostfsid subject for ./wallets/wallet.json"; \ + if [ -n "$$(./vendor/frostfs-adm -c frostfs-adm.yml morph frostfsid list-subjects --namespace '')" ]; then \ + echo "Subject already exists"; \ + else \ + subj_key=`docker container exec -it morph_chain neo-go wallet dump-keys -w /wallets/wallet.json | tail -1 | tr -d ' \r\n'` \ && echo "Subject key: $${subj_key}" \ && ./vendor/frostfs-adm -c frostfs-adm.yml morph frostfsid create-subject --namespace "" --subject-key $${subj_key} --subject-name walletsubject \ || die "Failed to create subject for the wallet"; \ + fi echo "FrostFS sidechain environment is deployed" # Build up certain service -- 2.45.2 From c6c5346870281b3c012fca1208e82d35ed499507 Mon Sep 17 00:00:00 2001 From: Alexander Chuprov Date: Sat, 17 Aug 2024 08:08:55 +0300 Subject: [PATCH 2/2] [#68] service/morph: Add volume for morph_chain Signed-off-by: Alexander Chuprov --- services/morph_chain/docker-compose.yml | 4 ++++ services/morph_chain/protocol.privnet.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/services/morph_chain/docker-compose.yml b/services/morph_chain/docker-compose.yml index dd44b2c..68535ea 100644 --- a/services/morph_chain/docker-compose.yml +++ b/services/morph_chain/docker-compose.yml @@ -19,9 +19,13 @@ services: - ./config.yml:/wallets/config.yml - ./../../vendor/hosts:/etc/hosts - ./../../wallets/wallet.json:/wallets/wallet.json + - chains:/chains networks: chain_int: internet: external: true name: basenet_internet + +volumes: + chains: diff --git a/services/morph_chain/protocol.privnet.yml b/services/morph_chain/protocol.privnet.yml index 560730a..2066029 100644 --- a/services/morph_chain/protocol.privnet.yml +++ b/services/morph_chain/protocol.privnet.yml @@ -17,7 +17,7 @@ ApplicationConfiguration: DBConfiguration: Type: "boltdb" BoltDBOptions: - FilePath: "./db/morph.bolt" + FilePath: "/chains/morph.bolt" P2P: Addresses: - ":20333" -- 2.45.2