Skip to content

Commit 225fa83

Browse files
FAB-4917 fix docs for FAB-4916
address comments Change-Id: Ia39d98a2b457646b74ea343adc3c73e4486adcb3 Signed-off-by: Christopher Ferris <[email protected]>
1 parent 3a71bff commit 225fa83

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed

docs/source/build_network.rst

+19-19
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ prompt. Respond with a ``y`` to execute the described action.
8585
Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10000'
8686
Continue (y/n)?y
8787
proceeding ...
88-
/Users/xxx/dev/byfn/bin/cryptogen
88+
/Users/xxx/dev/fabric-samples/bin/cryptogen
8989
9090
##########################################################
9191
##### Generate certificates using cryptogen tool #########
@@ -94,7 +94,7 @@ prompt. Respond with a ``y`` to execute the described action.
9494
2017-06-12 21:01:37.334 EDT [bccsp] GetDefault -> WARN 001 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
9595
...
9696
97-
/Users/xxx/dev/byfn/bin/configtxgen
97+
/Users/xxx/dev/fabric-samples/bin/configtxgen
9898
##########################################################
9999
######### Generating Orderer Genesis block ##############
100100
##########################################################
@@ -143,7 +143,7 @@ will be prompted as to whether you wish to continue or abort. Respond with a
143143
Starting with channel 'mychannel' and CLI timeout of '10000'
144144
Continue (y/n)?y
145145
proceeding ...
146-
Creating network "byfntest_default" with the default driver
146+
Creating network "net_byfn" with the default driver
147147
Creating peer0.org1.example.com
148148
Creating peer1.org1.example.com
149149
Creating peer0.org2.example.com
@@ -204,7 +204,7 @@ Once again, you will be prompted to continue, respond with a ``y``:
204204
proceeding ...
205205
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
206206
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
207-
Removing network byfn_default
207+
Removing network net_byfn
208208
468aaa6201ed
209209
...
210210
Untagged: dev-peer1.org2.example.com-mycc-1.0:latest
@@ -344,7 +344,7 @@ directory, so we need to provide the relative path to where the tool resides.
344344

345345
.. code:: bash
346346
347-
./bin/cryptogen generate --config=./crypto-config.yaml
347+
../bin/cryptogen generate --config=./crypto-config.yaml
348348
349349
You will likely see the following warning. It's innocuous, ignore it:
350350

@@ -363,7 +363,7 @@ should look for the configtx.yaml configuration file. Then, we'll invoke the
363363
.. code:: bash
364364
365365
export FABRIC_CFG_PATH=$PWD
366-
./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
366+
../bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
367367
368368
You can ignore the log warnings regarding intermediate certificates, certificate
369369
revocation lists (crls) and MSP configurations. We are not using any of those
@@ -381,21 +381,21 @@ Next, we need to create the channel transaction artifact. Be sure to set the
381381
.. code:: bash
382382
383383
# this file contains the definitions for our sample channel
384-
./bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID <channel-ID>
384+
../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID <channel-ID>
385385
386386
Next, we will define the anchor peer for Org1 on the channel that we are
387387
constructing. Again, be sure to set the <channel-ID> parameter as appropriate
388388
for the following commands:
389389

390390
.. code:: bash
391391
392-
./bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID <channel-ID> -asOrg Org1MSP
392+
../bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID <channel-ID> -asOrg Org1MSP
393393
394394
Now, we will define the anchor peer for Org2 on the same channel:
395395

396396
.. code:: bash
397397
398-
./bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID <channel-ID> -asOrg Org2MSP
398+
../bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID <channel-ID> -asOrg Org2MSP
399399
400400
Start the network
401401
-----------------
@@ -451,8 +451,10 @@ paths:
451451
CORE_PEER_LOCALMSPID="Org1MSP"
452452
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
453453
454+
.. _createandjoin:
455+
454456
Create & Join Channel
455-
^^^^^^^^^^^^^^^^^^^^
457+
^^^^^^^^^^^^^^^^^^^^^
456458

457459
We will enter the CLI container using the ``docker exec`` command:
458460

@@ -539,7 +541,7 @@ If we changed the syntax to ``AND`` then we would need two endorsements.
539541
# be sure to replace the $CHANNEL_NAME environment variable
540542
# if you did not install your chaincode with a name of mycc, then modify that argument as well
541543
542-
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')"
544+
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')"
543545
544546
See the `endorsement
545547
policies <http://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html>`__
@@ -740,9 +742,8 @@ Understanding the docker-compose topology
740742
The BYFN sample offers us two flavors of docker-compose files, both of which
741743
are extended from the ``docker-compose-base.yaml`` (located in the ``base``
742744
folder). Our first flavor, ``docker-compose-cli.yaml``, provides us with a
743-
CLI container, along with an orderer, four peers, and the optional couchDB
744-
containers. We use this docker-compose for the entirety of the instructions
745-
on this page.
745+
CLI container, along with an orderer, four peers. We use this docker-compose
746+
for the entirety of the instructions on this page.
746747

747748
.. note:: the remainder of this section covers a docker-compose file designed for the
748749
SDK. Refer to the `Node.js SDK <https://github.com/hyperledger/fabric-sdk-node>`__
@@ -754,7 +755,7 @@ is that there are containers for the fabric-ca servers. As a result, we are abl
754755
to send REST calls to the organizational CAs for user registration and enrollment.
755756

756757
If you want to use the ``docker-compose-e2e.yaml`` without first running the
757-
**All in one** script, then we will need to make four slight modifications.
758+
byfn.sh script, then we will need to make four slight modifications.
758759
We need to point to the private keys for our Organization's CA's. You can locate
759760
these values in your crypto-config folder. For example, to locate the private
760761
key for Org1 we would follow this path - ``crypto-config/peerOrganizations/org1.example.com/ca/``.
@@ -799,9 +800,8 @@ capabilities you will need to use a chaincode that has data modeled as JSON,
799800
``fabric/examples/chaincode/go`` directory.
800801

801802
We will follow the same process to create and join the channel as outlined in the
802-
**Manually exercise the commands** section above. Once you have joined your
803-
peer(s) to the channel, use the following steps to interact with the **marbles02**
804-
chaincode:
803+
:ref:`createandjoin` section above. Once you have joined your peer(s) to the
804+
channel, use the following steps to interact with the **marbles02** chaincode:
805805

806806
- Install and instantiate the chaincode on ``peer0.org1.example.com``:
807807

@@ -810,7 +810,7 @@ chaincode:
810810
# be sure to modify the $CHANNEL_NAME variable accordingly for the instantiate command
811811
812812
peer chaincode install -o orderer.example.com:7050 -n marbles -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/marbles02
813-
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem -C $CHANNEL_NAME -n marbles -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/marbles02 -c '{"Args":["init"]}' -P "OR ('Org0MSP.member','Org1MSP.member')"
813+
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem -C $CHANNEL_NAME -n marbles -v 1.0 -c '{"Args":["init"]}' -P "OR ('Org0MSP.member','Org1MSP.member')"
814814
815815
- Create some marbles and move them around:
816816

docs/source/samples.rst

+12-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,19 @@ that will download and extract all of the platform-specific binaries you
3030
will need to set up your network and place them into the cloned repo you
3131
created above. It retrieves the three platform-specific binaries:
3232
* ``cryptogen``,
33-
* ``configtxgen`` and,
34-
* ``configtxlator``
33+
* ``configtxgen``,
34+
* ``configtxlator``, and
35+
* ``peer``
3536

3637
and places them in the ``fabric-samples/bin`` directory.
3738

39+
You may want to add that to your PATH environment variable so that these
40+
can be picked up without fully qualifying the path to each binary. e.g.:
41+
42+
.. code:: bash
43+
44+
export PATH=<path to fabric-samples>/bin:$PATH
45+
3846
Finally, the script will download the Hyperledger Fabric docker images from
3947
`DockerHub <https://hub.docker.com/u/hyperledger/>`__ into
4048
your local Docker registry and tag them as 'latest'.
@@ -43,7 +51,8 @@ The script lists out the docker images installed upon conclusion.
4351

4452
Look at the names for each image; these are the components that will ultimately
4553
comprise our Fabric network. You will also notice that you have two instances
46-
of the same image ID - one tagged as "x86_64-1.0.0-rc1" and one tagged as "latest".
54+
of the same image ID - one tagged as "x86_64-1.0.0-rc1" and one tagged as
55+
"latest".
4756

4857
.. note:: Note that on different architectures, the x86_64 would be replaced
4958
with the string identifying your architecture.

0 commit comments

Comments
 (0)