🎨
Learn hyperledger fabric 2 with golang
  • Learn programming smart contracts in Hyperledger Fabric v2
  • Setting up the Fabric Business Network
    • Step 1 - Bring up the Fabric CA
    • Step 2 - Enroll organisations with Fabric CA
    • Step 3 - Bring up peer nodes
    • Step 4 - Configure a channel
    • Step 5 - Execute the script
  • Create a chain code
    • Deploy and invoke the chain code
    • What just happened
  • Create application side code to invoke smartcode
  • Recap
Powered by GitBook
On this page

Was this helpful?

  1. Setting up the Fabric Business Network

Step 1 - Bring up the Fabric CA

PreviousSetting up the Fabric Business NetworkNextStep 2 - Enroll organisations with Fabric CA

Last updated 4 years ago

Was this helpful?

The following excerpt from brings up the docker containers. In short certificate authorities (aka CA) are the software component which verifies the identity of a node or client based on cryptographic certs.Fabric has made it easier to start off with fabric ca docker images however in real life there will mostly a third part CA (like verisign , GoDaddy)

voternet-starter.sh
  docker-compose -f $COMPOSE_FILE_CA up -d 2>&1
  go get github.com/hyperledger/fabric-ca/cmd/...
  . organizations/fabric-ca/registerEnroll.sh
  
  infoln "Creating InvestorOrg Identities"
  createInvestorOrg

  infoln "Creating ManagementOrg Identities"
  createManagementOrg

  infoln "Creating Orderer Org Identities"
  createOrderer
  • take a look at the ca docker compose . It brings up 3 containers based on fabric-ca docker image (first representing CA of investor organisation , second representing CA of corporate/management organisation , third other CA representing organisation)

Make a note of the volumes configured in docker compose file.These folder will contain the initial configuration for starting the fabric-ca server as well as the client configuration for fabric-ca client commands.Also this folder will act as a repository to store a lot of crypto material generated by the ca-server.

  • next we install the fabric-ca-client command which will be used to register the peer nodes of each org with the ca-server.

  • we then invoke functions in registerEnroll.sh to register all the users and peers for each org with respective fabric ca server.

voternet-starter.sh
Fabric CA
file
Ordering Service