hyperledger-labs / orion-sdk-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Admin CLI

tock-ibm opened this issue · comments

The SDK provides a full set of admin tools. We want to create an admin CLI that clients can use to admin the Orion cluster w/o writing in Go.

  • Should compile to an executable called bcdbadmin
  • Get cluster config (to a folder specified by user)
  • Set cluster config (from a folder specified by user)
  • Set cluster config - cluster management tests
  • Should provide help to all commands
  • Load an admin private key it uses to sign the TX
  • Add a cluster node
  • Remove a cluster node
  • Update a cluster node
  • Add an admin
  • Remove an admin (cannot remove itself)
  • Update an admin (change certificate)
  • Update CAs (add/remove)

When getting a cluster config, the raw config object should be parsed and the respective certificates saved in a folder structure. The rest, could be saved in a yaml file, like we have for the initial shared config in the server package. The user can then replace some aspects of the configuration, for example change the Raft config,

You can draw inspiration from how the osnadmin was built in Fabric: https://github.com/hyperledger/fabric/tree/main/cmd/osnadmin

See PRs: #176 #178