From e24e6dc54b8a9c551d94f1c8a24b37aa18c23a80 Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Mon, 5 Jun 2017 16:01:44 +0800 Subject: [PATCH] Rename orderer genesis block --- hyperledger/1.0/GenerateArtifacts.md | 12 ++++++------ hyperledger/1.0/README.md | 4 ++-- hyperledger/1.0/docker-compose-new-channel.yml | 4 ++-- ...{orderer.genesis.block => orderer_genesis.block} | Bin hyperledger/1.0/example2/add-org.sh | 2 +- hyperledger/1.0/example2/peer-base.yml | 6 +++--- hyperledger/1.0/peer-base.yml | 4 ++-- hyperledger/1.0/peer-dev.yml | 2 +- hyperledger/1.0/peer.yml | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) rename hyperledger/1.0/e2e_cli/channel-artifacts/{orderer.genesis.block => orderer_genesis.block} (100%) diff --git a/hyperledger/1.0/GenerateArtifacts.md b/hyperledger/1.0/GenerateArtifacts.md index b8a4ae15..25ecea91 100644 --- a/hyperledger/1.0/GenerateArtifacts.md +++ b/hyperledger/1.0/GenerateArtifacts.md @@ -1,11 +1,11 @@ ## Usage of `cryptogen` and `configtxgen` -As we already put the `orderer.genesis.block`, `channel.tx`, `Org1MSPanchors.tx`, `Org2MSPanchors.tx` under `e2e_cli/channel-artifacts/`. +As we already put the `orderer_genesis.block`, `channel.tx`, `Org1MSPanchors.tx`, `Org2MSPanchors.tx` under `e2e_cli/channel-artifacts/`. and put cryptographic materials to `e2e_cli/crypto_config`. So this doc will explain how we use `cryptogen` and `configtxgen` those two foundamental tools to manually create artifacts and certificates. > Artifacts: -> * `orderer.genesis.block`: Genesis block for the ordering service +> * `orderer_genesis.block`: Genesis block for the ordering service > * `channel.tx`: Channel transaction file for peers broadcast to the orderer at channel creation time. @@ -49,13 +49,13 @@ root@cli: cp ./peer/configtx.yaml /etc/hyperledger/fabric The `configtxgen` tool is in `/go/bin/`, and when it's executed, it will read configuration from `/etc/hyperledger/fabric/configtx.yaml`, -So if we want to regenerate `orderer.genesis.block` and `channel.tx`, we should +So if we want to regenerate `orderer_genesis.block` and `channel.tx`, we should replace `configtx.yaml` using our own configtx.yaml first. #### Create the genesis block ```bash -root@cli: configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./peer/channel-artifacts/orderer.genesis.block +root@cli: configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./peer/channel-artifacts/orderer_genesis.block ``` #### Create the configuration tx @@ -261,7 +261,7 @@ $ cryptogen generate --config=./peer/crypto-config.yaml --output ./peer/crypto * 5 Create the genesis block ```bash -root@cli: configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./peer/channel-artifacts/orderer.genesis.block +root@cli: configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./peer/channel-artifacts/orderer_genesis.block ``` * 6 Create the configuration tx @@ -292,7 +292,7 @@ root@cli: configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./peer/ch * 10 Restart network - As we have changed the configtx.yaml and regenerate `orderer.genesis.block`, + As we have changed the configtx.yaml and regenerate `orderer_genesis.block`, we'd better restart orderering service or all the service. now we clean all the old service and boot a new network. diff --git a/hyperledger/1.0/README.md b/hyperledger/1.0/README.md index ad95db22..56c9e1ef 100644 --- a/hyperledger/1.0/README.md +++ b/hyperledger/1.0/README.md @@ -206,9 +206,9 @@ $ ./peer/scripts/new-channel-auto-test.sh ### Manually create artifacts (optional) -**Skip this step**, as we already put the needed artifacts `orderer.genesis.block` and `channel.tx` under `e2e_cli/channel-artifacts/`. +**Skip this step**, as we already put the needed artifacts `orderer_genesis.block` and `channel.tx` under `e2e_cli/channel-artifacts/`. -Detailed steps in [GenerateArtifacts](./GenerateArtifacts.md) explains the creation of `orderer.genesis.block` (needed by orderer to bootup) and `channel.tx` (needed by cli to create new channel) and crypto related configuration files. +Detailed steps in [GenerateArtifacts](./GenerateArtifacts.md) explains the creation of `orderer_genesis.block` (needed by orderer to bootup) and `channel.tx` (needed by cli to create new channel) and crypto related configuration files. ### Create new channel diff --git a/hyperledger/1.0/docker-compose-new-channel.yml b/hyperledger/1.0/docker-compose-new-channel.yml index 4dcd606b..6f02afaf 100644 --- a/hyperledger/1.0/docker-compose-new-channel.yml +++ b/hyperledger/1.0/docker-compose-new-channel.yml @@ -25,7 +25,7 @@ services: - ORDERER_GENERAL_LOGLEVEL=INFO - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block #Need to be confirm orderer.block + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer_genesis.block #Need to be confirm orderer.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - ORDERER_GENERAL_LEDGERTYPE=ram @@ -41,7 +41,7 @@ services: ports: - "7050:7050" volumes: - - ./e2e_cli/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./e2e_cli/channel-artifacts/orderer_genesis.block:/var/hyperledger/orderer/orderer_genesis.block - ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp - ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls command: orderer diff --git a/hyperledger/1.0/e2e_cli/channel-artifacts/orderer.genesis.block b/hyperledger/1.0/e2e_cli/channel-artifacts/orderer_genesis.block similarity index 100% rename from hyperledger/1.0/e2e_cli/channel-artifacts/orderer.genesis.block rename to hyperledger/1.0/e2e_cli/channel-artifacts/orderer_genesis.block diff --git a/hyperledger/1.0/example2/add-org.sh b/hyperledger/1.0/example2/add-org.sh index f8ab6ecc..960462ca 100755 --- a/hyperledger/1.0/example2/add-org.sh +++ b/hyperledger/1.0/example2/add-org.sh @@ -15,7 +15,7 @@ echo "Generate new certificates" cryptogen generate --config=./peer/crypto-config.yaml --output ./peer/crypto echo "Generate new certificates" -configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./peer/channel-artifacts/orderer.genesis.block +configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./peer/channel-artifacts/orderer_genesis.block echo "Create the configuration tx" CHANNEL_NAME=newchannel diff --git a/hyperledger/1.0/example2/peer-base.yml b/hyperledger/1.0/example2/peer-base.yml index 906b047b..c7566567 100755 --- a/hyperledger/1.0/example2/peer-base.yml +++ b/hyperledger/1.0/example2/peer-base.yml @@ -10,7 +10,7 @@ services: - ORDERER_GENERAL_LOGLEVEL=INFO - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block #Need to be confirm orderer.block + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer_genesis.block #Need to be confirm orderer.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - ORDERER_GENERAL_LEDGERTYPE=ram @@ -26,7 +26,7 @@ services: ports: - "7050:7050" volumes: - - ./e2e_cli/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./e2e_cli/channel-artifacts/orderer_genesis.block:/var/hyperledger/orderer/orderer_genesis.block - ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp - ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls command: orderer @@ -152,4 +152,4 @@ services: volumes: - ./e2e_cli/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/msp:/etc/hyperledger/fabric/msp - ./e2e_cli/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls - command: peer node start --peer-defaultchain=false \ No newline at end of file + command: peer node start --peer-defaultchain=false diff --git a/hyperledger/1.0/peer-base.yml b/hyperledger/1.0/peer-base.yml index 224d45dc..2147aa48 100644 --- a/hyperledger/1.0/peer-base.yml +++ b/hyperledger/1.0/peer-base.yml @@ -10,7 +10,7 @@ services: - ORDERER_GENERAL_LOGLEVEL=INFO - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block #Need to be confirm orderer.block + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer_genesis.block #Need to be confirm orderer.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - ORDERER_GENERAL_LEDGERTYPE=ram @@ -26,7 +26,7 @@ services: ports: - "7050:7050" volumes: - - ./e2e_cli/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./e2e_cli/channel-artifacts/orderer_genesis.block:/var/hyperledger/orderer/orderer_genesis.block - ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp - ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls command: orderer diff --git a/hyperledger/1.0/peer-dev.yml b/hyperledger/1.0/peer-dev.yml index e16b759a..84ae72c8 100644 --- a/hyperledger/1.0/peer-dev.yml +++ b/hyperledger/1.0/peer-dev.yml @@ -41,4 +41,4 @@ services: - /var/run/docker.sock:/var/run/docker.sock #volumes: # - /var/run/:/host/var/run/ - command: peer node start \ No newline at end of file + command: peer node start diff --git a/hyperledger/1.0/peer.yml b/hyperledger/1.0/peer.yml index e5908ba5..b111cff7 100644 --- a/hyperledger/1.0/peer.yml +++ b/hyperledger/1.0/peer.yml @@ -41,4 +41,4 @@ services: - /var/run/docker.sock:/var/run/docker.sock #volumes: # - /var/run/:/host/var/run/ - command: peer node start \ No newline at end of file + command: peer node start