โœˆ๏ธLaunch Network

We will try to understand the Test Network in-depth.

Test Network will be having below steps to be performed in sequence.

  1. Certificate Generation - CryptoGen Tool/Fabric CA

  2. Start the docker network - HLF Test Network

  3. Create a channel - Orderer will create it. (My channel)

  4. Peers will join the channel.

  5. Anchor peer update

  6. Chaincode Deployment: It has a lifecycle (Chaincode Lifecycle)

    1. Packaging

    2. Install

    3. Approve

    4. Commit

  7. Init the ledger

  8. Invoke or Query Transactions

Note: Please Run these before step 1

cd Desktop/hyperledger/fabric-samples/test-network/
./network.sh down

docker ps -aq 
docker volume ls

If there are containers then run :

docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker volume prune

Test Network Execution:

Certificate Generation Using CryptoGen Tool:

In the test network folder do the following:

  1. Set the Config Path

export PATH=${PWD}/../bin:${PWD}:$PATH
  1. Create the Certificates for Org1

cryptogen generate --config=./organizations/cryptogen/crypto-config-org1.yaml --output="organizations"
  1. Create the certificates for Org2

cryptogen generate --config=./organizations/cryptogen/crypto-config-org2.yaml --output="organizations"
  1. Create Certificates for OrdererOrg

cryptogen generate --config=./organizations/cryptogen/crypto-config-orderer.yaml --output="organizations"

Start Docker Network

  1. Start the docker containers

export COMPOSE_PROJECT_NAME=net
IMAGE_TAG=latest docker-compose -f docker/docker-compose-test-net.yaml up
  1. Open a new Terminal

  2. Check the docker containers running status

Last updated