Skip to content

[WIP] 1st attempt for build peer cli#146

Open
SamYuan1990 wants to merge 1 commit intohyperledger:mainfrom
SamYuan1990:1stbinaryAttempt
Open

[WIP] 1st attempt for build peer cli#146
SamYuan1990 wants to merge 1 commit intohyperledger:mainfrom
SamYuan1990:1stbinaryAttempt

Conversation

@SamYuan1990
Copy link
Contributor

@SamYuan1990 SamYuan1990 commented Oct 14, 2023

1st attempt for build peer cli

  • peer and osadmin cli folder structure.
  • some internal package refine.

todo:
if the folder structure looks good, then adding for all peer lifecycle command impl and end to end test case.

Contributes to #202

Signed-off-by: Sam Yuan <yy19902439@126.com>
@SamYuan1990 SamYuan1990 marked this pull request as ready for review October 14, 2023 12:41
@SamYuan1990 SamYuan1990 changed the title 1st attempt for build peer cli [WIP] 1st attempt for build peer cli Oct 14, 2023
@SamYuan1990
Copy link
Contributor Author

Hi @denyeart and @bestbeforetoday

I would like to have you reviewed with current WIP part of code as if I am moving on, this pr will be too large to review.
Hence I make current implementation with lifecycle install as an example for how it's going to be like.

Please let me know for your review comments.

Regards
Sam

@bestbeforetoday
Copy link
Member

I think the approach generally looks good. Some suggestions:

  • Name the commands as make sense in line with the fabric-admin-sdk rather that following the conventions of the existing peer command. I think everything just lived within the peer command because it was all baked into the peer binary. We can be more flexible, perhaps with an admin command a sub-commands like chaincode to align with the admin SDKs chaincode package. We could even have different CLI commands for different tasks, if that makes more sense.
  • Align the command parameters and behaviour with the admin SDK rather than just following what is there in the existing peer CLI. There are cases where we might require less information because we are using the Gateway API internally, which handles aspects of endorsement without specifying a set of endorsing peers. We might also consider parallel operations, such as installing to a list of peers with a single CLI command.
  • Avoid some of the legacy on-disk configuration files. Just take command-line parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants