Skip to content

Commit af02c34

Browse files
committed
[FAB-9198][FAB-10727] BYFN update
Channel name must be lowercase Added option to set peer env variables to inside the container. Change-Id: I7efe3ee42cb995c0e51ca2e082057b32bff91670 Signed-off-by: pama-ibm <pama@ibm.com>
1 parent 4234843 commit af02c34

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

docs/source/build_network.rst

+23-6
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ completion, it should report the following in your terminal window:
208208
209209
Query Result: 90
210210
2017-05-16 17:08:15.158 UTC [main] main -> INFO 008 Exiting.....
211-
===================== Query successful on peer1.org2 on channel 'mychannel' =====================
211+
===================== Query successful on peer1.org2 on channel 'mychannel' =====================
212212
213213
===================== All GOOD, BYFN execution completed =====================
214214
@@ -516,9 +516,10 @@ For the following CLI commands against ``peer0.org1.example.com`` to work, we ne
516516
to preface our commands with the four environment variables given below. These
517517
variables for ``peer0.org1.example.com`` are baked into the CLI container,
518518
therefore we can operate without passing them. **HOWEVER**, if you want to send
519-
calls to other peers or the orderer, then you will need to provide these
520-
values accordingly. Inspect the ``docker-compose-base.yaml`` for the specific
521-
paths:
519+
calls to other peers or the orderer, then you can provide these
520+
values accordingly by editing the ``docker-compose-base.yaml`` before starting the
521+
container. Modify the following four environment variables to use a different
522+
peer and org.
522523

523524
.. code:: bash
524525
@@ -553,6 +554,19 @@ If successful you should see the following:
553554
554555
root@0d78bb69300d:/opt/gopath/src/github.com/hyperledger/fabric/peer#
555556
557+
If you do not want to run the CLI commands against the default peer
558+
``peer0.org1.example.com``, replace the values of ``peer0`` or ``org1`` in the
559+
four environment variables and run the commands:
560+
561+
.. code:: bash
562+
563+
# Environment variables for PEER0
564+
565+
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
566+
export CORE_PEER_ADDRESS=peer0.org1.example.com:7051
567+
export CORE_PEER_LOCALMSPID="Org1MSP"
568+
export 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
569+
556570
Next, we are going to pass in the generated channel configuration transaction
557571
artifact that we created in the :ref:`createchanneltx` section (we called
558572
it ``channel.tx``) to the orderer as part of the create channel request.
@@ -561,7 +575,10 @@ We specify our channel name with the ``-c`` flag and our channel configuration
561575
transaction with the ``-f`` flag. In this case it is ``channel.tx``, however
562576
you can mount your own configuration transaction with a different name. Once again
563577
we will set the ``CHANNEL_NAME`` environment variable within our CLI container so that
564-
we don't have to explicitly pass this argument:
578+
we don't have to explicitly pass this argument. Channel names must be all lower
579+
case, less than 250 characters long and match the regular expression
580+
``[a-z][a-z0-9.-]*``.
581+
565582

566583
.. code:: bash
567584
@@ -869,7 +886,7 @@ You should see the following output:
869886
2017-05-16 17:08:01.367 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: E61DB37F4E8B0D32C9FE10E3936BA9B8CD278FAA1F3320B08712164248285C54
870887
Query Result: 90
871888
2017-05-16 17:08:15.158 UTC [main] main -> INFO 008 Exiting.....
872-
===================== Query successful on peer1.org2 on channel 'mychannel' =====================
889+
===================== Query successful on peer1.org2 on channel 'mychannel' =====================
873890
874891
===================== All GOOD, BYFN execution completed =====================
875892

0 commit comments

Comments
 (0)