@@ -2,7 +2,7 @@ Building Your First Network
2
2
===========================
3
3
4
4
.. note :: These instructions have been verified to work against the
5
- version "1.0.0-rc1 " tagged Docker images and the pre-compiled
5
+ version "1.0.0" tagged Docker images and the pre-compiled
6
6
setup utilities within the supplied tar file. If you run
7
7
these commands with images or tools from the current master
8
8
branch, it is possible that you will see configuration and panic
@@ -31,14 +31,14 @@ sub-directory now.
31
31
32
32
.. note :: The supplied commands in this documentation
33
33
**MUST ** be run from your ``first-network `` sub-directory
34
- of the ``fabric-samples``repository clone. If you elect to run the
34
+ of the ``fabric-samples `` repository clone. If you elect to run the
35
35
commands from a different location, the various provided scripts
36
36
will be unable to find the binaries.
37
37
38
38
Want to run it now?
39
39
-------------------
40
40
41
- We provide a fully annotated script ``byfn.sh `` that leverages these Docker
41
+ We provide a fully annotated script - ``byfn.sh `` - that leverages these Docker
42
42
images to quickly bootstrap a Hyperledger Fabric network comprised of 4 peers
43
43
representing two different organizations, and an orderer node. It will also
44
44
launch a container to run a scripted execution that will join peers to a
@@ -75,13 +75,17 @@ it, then your CLI container will exit upon conclusion of the script.
75
75
Generate Network Artifacts
76
76
^^^^^^^^^^^^^^^^^^^^^^^^^^
77
77
78
- Ready to give it a go? Okay then! Execute the following command. You will see
79
- a brief description as to what will occur, along with a yes/no command line
80
- prompt. Respond with a ``y `` to execute the described action.
78
+ Ready to give it a go? Okay then! Execute the following command:
81
79
82
80
.. code :: bash
83
81
84
82
./byfn.sh -m generate
83
+
84
+ You will see a brief description as to what will occur, along with a yes/no command line
85
+ prompt. Respond with a ``y `` to execute the described action.
86
+
87
+ .. code :: bash
88
+
85
89
Generating certs and genesis block for with channel ' mychannel' and CLI timeout of ' 10000'
86
90
Continue (y/n)? y
87
91
proceeding ...
@@ -133,13 +137,17 @@ and a collection of configuration transactions required to configure a
133
137
Bring Up the Network
134
138
^^^^^^^^^^^^^^^^^^^^
135
139
136
- Next, you can bring the network up with the following command. Once again, you
137
- will be prompted as to whether you wish to continue or abort. Respond with a
138
- ``y ``:
140
+ Next, you can bring the network up with the following command:
139
141
140
142
.. code :: bash
141
143
142
144
./byfn.sh -m up
145
+
146
+ Once again, you will be prompted as to whether you wish to continue or abort.
147
+ Respond with a ``y ``:
148
+
149
+ .. code :: bash
150
+
143
151
Starting with channel ' mychannel' and CLI timeout of ' 10000'
144
152
Continue (y/n)? y
145
153
proceeding ...
@@ -185,20 +193,24 @@ completion, it should report the following in your terminal window:
185
193
| _____| | _| \_ | | ____/
186
194
187
195
You can scroll through these logs to see the various transactions. If you don't
188
- get this result, then jump down to the Troubleshooting section and let's see
196
+ get this result, then jump down to the :ref: ` Troubleshoot ` section and let's see
189
197
whether we can help you discover what went wrong.
190
198
191
199
Bring Down the Network
192
200
^^^^^^^^^^^^^^^^^^^^^^
193
201
194
202
Finally, let's bring it all down so we can explore the network setup one step
195
203
at a time. The following will kill your containers, remove the crypto material
196
- and four artifacts, and delete the chaincode images from your Docker Registry.
197
- Once again, you will be prompted to continue, respond with a ``y ``:
204
+ and four artifacts, and delete the chaincode images from your Docker Registry:
198
205
199
206
.. code :: bash
200
207
201
208
./byfn.sh -m down
209
+
210
+ Once again, you will be prompted to continue, respond with a ``y ``:
211
+
212
+ .. code :: bash
213
+
202
214
Stopping with channel ' mychannel' and CLI timeout of ' 10000'
203
215
Continue (y/n)? y
204
216
proceeding ...
@@ -359,12 +371,16 @@ Next, we need to tell the ``configtxgen`` tool where to look for the
359
371
present working directory:
360
372
361
373
First, we need to set an environment variable to specify where ``configtxgen ``
362
- should look for the configtx.yaml configuration file. Then, we'll invoke the
363
- ``configtxgen `` tool which will create the orderer genesis block:
374
+ should look for the configtx.yaml configuration file:
364
375
365
376
.. code :: bash
366
377
367
378
export FABRIC_CFG_PATH=$PWD
379
+
380
+ Then, we'll invoke the ``configtxgen `` tool which will create the orderer genesis block:
381
+
382
+ .. code :: bash
383
+
368
384
../bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
369
385
370
386
You can ignore the log warnings regarding intermediate certificates, certificate
@@ -508,7 +524,7 @@ Now let's join ``peer0.org1.example.com`` to the channel.
508
524
.. code :: bash
509
525
510
526
# By default, this joins ``peer0.org1.example.com`` only
511
- # the <channel-ID> .block was returned by the previous command
527
+ # the <channel-ID.block> was returned by the previous command
512
528
513
529
peer channel join -b < channel-ID.block>
514
530
@@ -525,7 +541,7 @@ Applications interact with the blockchain ledger through ``chaincode``. As
525
541
such we need to install the chaincode on every peer that will execute and
526
542
endorse our transactions, and then instantiate the chaincode on the channel.
527
543
528
- First, install the sample go code onto one of the four peer nodes. This command
544
+ First, install the sample Go code onto one of the four peer nodes. This command
529
545
places the source code onto our peer's filesystem.
530
546
531
547
.. code :: bash
@@ -900,6 +916,8 @@ container specification:
900
916
volumes:
901
917
- /var/hyperledger/couchdb0:/opt/couchdb/data
902
918
919
+ .. _Troubleshoot :
920
+
903
921
Troubleshooting
904
922
---------------
905
923
@@ -912,7 +930,7 @@ Troubleshooting
912
930
913
931
- **YOU WILL SEE ERRORS IF YOU DO NOT REMOVE CONTAINERS AND IMAGES **
914
932
915
- - If you see Docker errors, first check your version (should be 1.12 or above),
933
+ - If you see Docker errors, first check your version (should be 17.03.1 or above),
916
934
and then try restarting your Docker process. Problems with Docker are
917
935
oftentimes not immediately recognizable. For example, you may see errors
918
936
resulting from an inability to access crypto material mounted within a
@@ -950,7 +968,7 @@ again.
950
968
Error connecting: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure
951
969
Error: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure
952
970
953
- Make sure you are running your network against the "1.0.0-rc1 " images that have
971
+ Make sure you are running your network against the "1.0.0" images that have
954
972
been retagged as "latest".
955
973
956
974
If you see the below error:
0 commit comments