Makefile: Add subjects for storage and client wallets to FrostfsID #75

Merged
fyrchik merged 1 commit from aarifullin/frostfs-dev-env:feat/fidsubj_makefile into master 2024-08-16 07:46:12 +00:00

View file

@ -85,7 +85,12 @@ 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 "FrostFS sidechain environment is deployed"
@echo "Create frostfsid subject for ./wallets/wallet.json" \

I think storage nodes are ok not being in the frostfsid, we have user wallet for containers.

I think storage nodes are ok not being in the frostfsid, we have user wallet for containers.

OK.

But still WDYT about neo-go?

OK. But still WDYT about `neo-go`?

using neo-go is more robust than jq + tail c+3

using neo-go is more robust than `jq + tail c+3`

Got neo-go away, please, check

Got `neo-go` away, please, check

Why, though? "robust" is a good thing.

Why, though? "robust" is a good thing.

Then neo-go should be vendored.

Then neo-go should be vendored.
  1. I mistook "robust" for "giant" but you problably meant "sturdy"
  2. @dstepanov-yadro is right. In this case we need to introduce neo-go binary in .env along with
...
# FrostFS ADM tool binary
FROSTFS_ADM_VERSION=498f9955ea
FROSTFS_ADM_URL=https://http.t5.fs.neo.org/7sm9csjtRLpr4c9QD55q9JJM73v79ohuAhTzP4fYRHFz/CjV4S6ENzo2FLK4KxXZHHNW4veR1ATtynGY6Mc1xQ6RB
#FROSTFS_ADM_PATH=/path/to/frostfs-adm-binary
...

to get it vendored

So, we need to upload it to somewhere. Once, we had a discussion and we didn't agree on uploading to http.t5.fs.neo.org (I may mistake)

1. I mistook "robust" for "giant" but you problably meant "sturdy" 2. @dstepanov-yadro is right. In this case we need to introduce `neo-go` binary in `.env` along with ```bash ... # FrostFS ADM tool binary FROSTFS_ADM_VERSION=498f9955ea FROSTFS_ADM_URL=https://http.t5.fs.neo.org/7sm9csjtRLpr4c9QD55q9JJM73v79ohuAhTzP4fYRHFz/CjV4S6ENzo2FLK4KxXZHHNW4veR1ATtynGY6Mc1xQ6RB #FROSTFS_ADM_PATH=/path/to/frostfs-adm-binary ... ``` to get it vendored So, we need to upload it to *somewhere*. Once, we had a discussion and we didn't agree on uploading to `http.t5.fs.neo.org` (I may mistake)

We already have a docker image for neo-go, right?
Can we use it?

We already have a docker image for neo-go, right? Can we use it?

We already have a docker image for neo-go, right?

That's really a brilliant idea. Fixed that

> We already have a docker image for neo-go, right? That's really a brilliant idea. Fixed that
&& 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"; \
echo "FrostFS sidechain environment is deployed"
aarifullin marked this conversation as resolved Outdated

We've got no neo-go in .vendor. So, it assumes that neo-go is installed separately.
Probably, this is not right for frostfs-dev-env bootup

The alternative way to get parsed script is:

cat wallets/wallet.json | jq -r '.accounts[0].contract.script' | base64 -d | tail -c+3 | xxd -p

(returns the same result)

WDYT?

We've got no `neo-go` in `.vendor`. So, it assumes that `neo-go` is installed separately. Probably, this is not right for `frostfs-dev-env` bootup The alternative way to get parsed script is: ``` cat wallets/wallet.json | jq -r '.accounts[0].contract.script' | base64 -d | tail -c+3 | xxd -p ``` (returns the same result) WDYT?

FrostfID subject is required to create containers. Neo-go or Frostfs-storage should not to create containers. So their wallets are not required to be stored in FrostfsID contract.

FrostfID subject is required to create containers. Neo-go or Frostfs-storage should not to create containers. So their wallets are not required to be stored in FrostfsID contract.

Okay, I'll leave it only for client wallet. But the problem is that we need to get a subject key for this wallet

Okay, I'll leave it only for client wallet. But the problem is that we need to get a subject key for this wallet

Fixed

Fixed
# Build up certain service
.PHONY: up/%