From 45afdbde4556b431af4982b3765a31b37d462768 Mon Sep 17 00:00:00 2001 From: Wenjian Qiao Date: Mon, 9 Nov 2020 14:34:34 -0500 Subject: [PATCH] Update channel_update_tutorial.rst with joinbysnapshot Signed-off-by: Wenjian Qiao --- docs/source/channel_update_tutorial.rst | 14 +++++++++++++- docs/source/peer_ledger_snapshot.md | 6 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/source/channel_update_tutorial.rst b/docs/source/channel_update_tutorial.rst index bb119620427..c03c7c8e0f1 100644 --- a/docs/source/channel_update_tutorial.rst +++ b/docs/source/channel_update_tutorial.rst @@ -459,7 +459,10 @@ as the Org3 Admin: export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp export CORE_PEER_ADDRESS=peer0.org3.example.com:11051 -Now let's send a call to the ordering service asking for the genesis block of +Org3 peers can join ``mychannel`` by either the genesis block or a snapshot that is created +after Org3 has joined the channel. + +To join by the genesis block, send a call to the ordering service asking for the genesis block of ``mychannel``. As a result of the successful channel update, the ordering service will verify that Org3 can pull the genesis block and join the channel. If Org3 had not been successfully appended to the channel config, the ordering service would @@ -489,6 +492,15 @@ peer to the channel: peer channel join -b mychannel.block +To join by a snapshot, follow the instruction in `Taking a snapshot `__ +to take a snapshot on an existing peer. The snapshot should be taken after Org3 has been added to ``mychannel`` +to ensure that the snapshot contains the updated channel configuration including Org3. +Locate the snapshot directory, copy it to the filesystem of the new Org3 peer, and issue the +``peer channel joinbysnapshot`` command using the path to the snapshot on your file system. + +.. code:: bash + + peer channel joinbysnapshot --snapshotpath Configuring Leader Election ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/peer_ledger_snapshot.md b/docs/source/peer_ledger_snapshot.md index ab701f00718..2c3fd2fe3d0 100644 --- a/docs/source/peer_ledger_snapshot.md +++ b/docs/source/peer_ledger_snapshot.md @@ -138,7 +138,7 @@ Note that the file types explained here is a superset of all of the files that m When joining a channel using the genesis block, a command similar to `peer channel join --blockpath mychannel.block` is issued. When joining the peer to the channel using a snapshot, issue a command similar to: ``` -peer channel joinbysnapshot --snapshotPath +peer channel joinbysnapshot --snapshotpath ``` To verify that the peer has joined the channel successfully, issue a command similar to: @@ -153,9 +153,9 @@ Additionally, if the peer has not already installed a chaincode being used on th If you want to try out the ledger snapshotting process, you'll first need a network with a running channel. If you don't have a network, deploy the [test network](./test_network.html). This will create a network with two orgs, which both have a single peer, and an application channel. -Next, follow the [Adding an Org to a Channel](./channel_update_tutorial.html) to add a new org to your network and application channel. When you reach the section where you are asked to [Join Org3 to the Channel](./channel_update_tutorial.html#join-org3-to-the-channel), select the peer you want to use to take the snapshot and follow the instructions above to take the snapshot. Then locate the snapshot on the your peer and copy it somewhere else on your filesystem. Taking the snapshot at this step ensures that the new peer joins the channel using a snapshot taken after a point when its organization has already been joined to the channel. +Next, follow the [Adding an Org to a Channel](./channel_update_tutorial.html) to add a new org to your network and application channel. When you reach the section where you are asked to [Join Org3 to the Channel](./channel_update_tutorial.html#join-org3-to-the-channel), select the peer you want to use to take the snapshot and follow the instructions above to take the snapshot. Then locate the snapshot on the peer and copy it somewhere else on your filesystem. Taking the snapshot at this step ensures that the new peer joins the channel using a snapshot taken after a point when its organization has already been joined to the channel. -After you have taken the snapshot and copied it, instead of issuing the `peer channel join -b mychannel.block` command, substitute `peer channel joinbysnapshot --snapshotPath ` using the path to the snapshot on your filesystem. +After you have taken the snapshot and copied it, instead of issuing the `peer channel join -b mychannel.block` command, substitute `peer channel joinbysnapshot --snapshotpath ` using the path to the snapshot on your filesystem. ## Troubleshooting