Skip to content
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

Add New Org #66

Closed
wants to merge 8 commits into from
Closed

Add New Org #66

wants to merge 8 commits into from

Conversation

sapthasurendran
Copy link
Collaborator

@sapthasurendran sapthasurendran commented Nov 24, 2021

closes #69

client/package.json Outdated Show resolved Hide resolved
@@ -0,0 +1,28 @@
## Adding Org3 to the test network
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readme refers to org3 still

fi

# Create crypto material using Fabric CA
if [ "$CRYPTO" == "Certificate Authorities" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't generate crypto material using the CA so this section could be commented out


fi

infoln "Generating CCP files for Org4"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't generate CCPs so this should be commented out

elif [ "$MODE" == "generate" ]; then
EXPMODE="Generating certs and organization definition for Org4"
elif [ "$MODE" == "deployCC" ]; then
EXPMODE="dePLOYING CC"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the message has swapped caps letters

@@ -0,0 +1,36 @@
#!/bin/bash
Copy link
Owner

@davidkel davidkel Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this file as we don't use CCPs

@@ -0,0 +1,49 @@
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this file

@@ -0,0 +1,34 @@
---
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this file

@@ -0,0 +1,406 @@
#############################################################################
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this file as we don't use CAs

@@ -0,0 +1,87 @@
#!/bin/bash
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this file as we don't use CAs

@@ -432,6 +432,7 @@ services:
- /var/run/:/host/var/run/
- ../organizations:/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations
- ../scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
- ../../../chaincode:/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this line was added, can you give some detail as to why you added it ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting path not found otherwise for chaincode path ../../../chaincode/node

packageChaincode

## Install chaincode on peer0.org1 and peer0.org2
infoln "Installing chaincode on peer0.org1..."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should say org4

signConfigtxAsPeerOrg 2 org4_update_in_envelope.pb


infoln "Submitting transaction from a different peer (peer0.org2) which also signs it"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it's org3, not org2

@@ -0,0 +1,27 @@
# Copyright IBM Corp. All Rights Reserved.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use CAs so shouldn't need this file

@@ -0,0 +1,42 @@
# Copyright IBM Corp. All Rights Reserved.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use couch so this file isn't required

Copy link
Owner

@davidkel davidkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add some doc in the main readme about this as well


echo "Fetching channel config block from orderer..."
set -x
peer channel fetch 0 $BLOCKFILE -o orderer1.example.com:7050 --ordererTLSHostnameOverride orderer1.example.com -c $CHANNEL_NAME --tls --cafile "$ORDERER_CA" >&log.txt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we fetching the genesis block ? I would have thought we would want the latest config block ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right,it should be the latest block, I followed addOrg3 scripts, looks like it need to be fixed in fabric-samples as well.

https://github.com/hyperledger/fabric-samples/blob/a97e8d1267fafb013aadae6850312c1b07a1ecd8/test-network/scripts/org3-scripts/joinChannel.sh#L57


For more information, use `./addOrg4.sh -h` to see the `addOrg4.sh` help text.


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add the deployCC support here as well

}
function deployCC(){
infoln "CC Deploy"
docker exec cli ./scripts/org4-scripts/deployCC.sh $CHANNEL_NAME $CC_NAME $CC_SRC_PATH $CC_SRC_LANGUAGE $CC_VERSION $CC_SEQUENCE $CC_INIT_FCN $CC_END_POLICY $CC_COLL_CONFIG $CLI_DELAY $MAX_RETRY $VERBOSE
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the reason why chaincode needs to be mounted into the cli container, but wondered why deployCC has to be run in the CLI container as we run the main deployCC locally.

@@ -0,0 +1,229 @@
#!/bin/bash
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good if the current deployCC could be enhanced to do it all rather than another script which replicates a lot of the code

CC_SEQUENCE=${6:-"1"}
CC_INIT_FCN=${7:-"NA"}
#CC_END_POLICY=${8:-"NA"}
CC_END_POLICY="OR(AND('Org1MSP.member','Org2MSP.member'),AND('Org1MSP.member','Org3MSP.member'),AND('Org3MSP.member','Org2MSP.member'))"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't want to hardcode the endorsement policy anymore

Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
Signed-off-by: sapthasurendran <[email protected]>
@davidkel
Copy link
Owner

davidkel commented Dec 1, 2021

Closing as I have taken the code here as the basis to create the ability to add org4 thanks @sapthasurendran

@davidkel davidkel closed this Dec 1, 2021
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.

Test adding an organisation
2 participants