Generate Crypto Materials for org4 in server1

In another terminal, change into the org4-artifacts subdirectory from first-network.

cd org4-artifacts 

The directory should be like so:

fabric-samples/<network directory>/org4-artifacts/

Generate the crypto material for Org4:

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

Now use the configtxgen utility to print out the Org4-specific configuration material in JSON. We will preface the command by telling the tool to look in the current directory for the configtx.yaml file that it needs to ingest.

export FABRIC_CFG_PATH=$PWD && ../../bin/configtxgen -printOrg Org4MSP > ../channel-artifacts/org4.json

Now to port the Orderer Org’s MSP material into the Org4 crypto-config directory:

cd ../ && cp -r crypto-config/ordererOrganizations org4-artifacts/crypto-config/