Generating channel artifacts

Similarly, the configtx.yaml contains only the specification of the exporting entity's organization in the organizations section, as follows:

Organizations: 
  - &ExportingEntityOrg 
    Name: ExportingEntityOrgMSP 
    ID: ExportingEntityOrgMSP 
    MSPDir: ../crypto-config/peerOrganizations/exportingentityorg.trade.com/msp 
    AnchorPeers: 
      - Host: peer0.exportingentityorg.trade.com 
        Port: 7051

This specification essentially replicates that of every other organization and peer; only the names and paths are modified to identify and set up the new organization (that this assumes a crypto-config folder to have already been generated in the current directory). To build the incremental channel configuration, run the following command:

FABRIC_CFG_PATH=$PWD/add_org && configtxgen -printOrg ExportingEntityOrgMSP > ./channel-artifacts/exportingEntityOrg.json 

Here, we encounter our first difference from the procedure followed in Chapter 3Setting the Stage with a Business Scenario; instead of building separate files for configuration blocks, anchor peers, and so on, we just build a JSON spec that contains all the relevant information, including policy specification and certificates for an admin user, the CA root, and the TLS root for the exporting entity's organization, and save it to the channel-artifacts folder. Later in this section, we will use this JSON in our channel configuration update procedure.

To ensure that configtxgen looks for the configtx.yaml in the add_org directory, we must temporarily change the FABRIC_CFG_PATH environment variable.
..................Content has been hidden....................

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