-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User initialization #432
Comments
What do you mean by schema document? Currently when you create a snapshot of the network in Fablo, it also keeps all CA user accounts. You just need to create them upfront. |
Ah okay that is helpful. The schema i was refering to is the json schema for the config file (https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json) My main thought was to extend the config file to include declartive user creation. The values bellow i used the hlf bevel operator cmd as a refrence (https://github.com/hyperledger/bevel-operator-fabric?tab=readme-ov-file#register-and-enrolling-org1msp-identity) kubectl hlf ca register --name=org1-ca --namespace=default --user=admin --secret=adminpw \
--type=admin --enroll-id enroll --enroll-secret=enrollpw --mspid=Org1MSP {
"organization": {
"name": "Org1",
"domain": "org1.example.com"
},
"peer": {
"instances": 2,
"db": "LevelDb"
},
"ca":{
"enrollId": "enroll",
"enrollSecret": "enrollpw",
"users": [
{
"name": "admin",
"type": "admin",
"secret": "adminpw"
}
]
}
}
|
I see. That would be useful. I suppose it involves two things:
|
Awesome, when I get a chance this week/next I will take a look and put together a pull request |
Do you mind if I include the code needed to also generate a network configuration file for hyperledger caliper as with the users generated it should be simple to populate the needed paths in the config file for all the given users. That would also partially address issue #298 298 Or would it be better to do that in another pull request if there is interest in it? |
Please do it in a way that is more convenient for you. We'll be more than happy to have Caliper onboard. Thanks! |
It looks like the cli (fabric-tools) container doesn't have the fabric-ca-client exe. Should I download it dynamically, based on the fabric version, and then put it in the /workspaces/fablo/fablo-target/fabric-docker/scripts/cli folder that is mounted by the fabric-ci-box? Or is there a better place i should put it? |
Yeah, I think this is a good approach, since we want to deprecate fabric-tools anyway (#245). It's also deprecated in Hyperledger Fabric. Have a look at this PR: #316. It seems there was an effort towards downloading binaries, but I'm not sure why it's not merged. I guess it was just not required at that time. (@gzhk do you remember?). Anyway, I think you can reuse some code from #316 if you find it useful. And yes, |
Hi @Nova38 how is it going? Do you need some help with this issue? |
Would it be possible to support creating users via the schema document. This would allow for streamlined setup of multi user environments, in addition to potentially useful for the snapshot feature in testing.
The text was updated successfully, but these errors were encountered: