Generating the certificate

We need to define crypto-config.yaml and use the cryptogen tool to generate the certificates for each peer. Cryptogen is available in the tools image. crypto-config.yaml contains the following information:

  • OrdererOrgs: Definition of organizations managing orderer nodes
  • PeerOrgs: Definition of organizations managing peer nodes

OrdererOrgs contains the following information about the ordered node in the cluster:

  • Name: Name of the orderer
  • Domain: Domain URL for orderer; in our case, it is ic.com
  • Hostname: Hostname for the orderer

Here is an example:

OrdererOrgs:
- Name: Orderer
Domain: ic.com
Specs:
      - Hostname: orderer

 

PeerOrgs contains the following information about the peer node in the cluster:

  • Name: Name of the organization; we have three different orgs : Org1, Org2, and Org3
  • Template count: Number of peer nodes for an organization
  • Users count: Number of users for an organization

Here is an example:

PeerOrgs:
# ---------------------------------------------------------------------------
# Org1
# ---------------------------------------------------------------------------
- Name: Org1
Domain: org1.ic.com
Template:
Count: 2
Users:
Count: 1
# ---------------------------------------------------------------------------
# Org2
# ---------------------------------------------------------------------------
- Name: Org2
Domain: org2.ic.com
Template:
Count: 2
Users:
Count: 1
# ---------------------------------------------------------------------------
# Org3
# ---------------------------------------------------------------------------
- Name: Org3
Domain: org3.ic.com
Template:
Count: 2
Users:
Count: 1

The following is the command thats used to generate the crypto material:

cryptogen generate --config=./crypto-config.yaml

After running the cryptogen tool, you should see the following output in the console:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.46.130