Rename orderer genesis block
parent
2a2e4b13bc
commit
e24e6dc54b
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
command: peer node start --peer-defaultchain=false
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -41,4 +41,4 @@ services:
|
|||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
#volumes:
|
||||
# - /var/run/:/host/var/run/
|
||||
command: peer node start
|
||||
command: peer node start
|
||||
|
|
|
@ -41,4 +41,4 @@ services:
|
|||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
#volumes:
|
||||
# - /var/run/:/host/var/run/
|
||||
command: peer node start
|
||||
command: peer node start
|
||||
|
|
Loading…
Reference in New Issue