You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Follow the [Building Your First Network tutorial](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html), ensuring that you use the GitHub repository cloned in the previous step. You must not clone and use the Hyperledger Fabric version of the GitHub repository as it is currently missing changes that are required for this tutorial.**IMPORTANT** Make sure you are using the `latest` in the url to ensure you are using the preview of {{site.data.conrefs.hlf_full}} 1.1
46
+
Follow the [Building Your First Network tutorial](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html), ensuring that you use the GitHub repository cloned in the previous step. You must not clone and use the Hyperledger Fabric version of the GitHub repository as it is currently missing changes that are required for this tutorial.
47
47
48
48
<h2class='everybody'>Step One: Starting a {{site.data.conrefs.hlf_full}} network</h2>
49
49
@@ -156,7 +156,7 @@ A channel named `mychannel` has been created. All four peer nodes - `peer0.org1.
156
156
We need a base connection profile that describes this fabric network which can then be given to `alice` and `bob` to customize for their organization.
157
157
158
158
{
159
-
"name": "hlfv1",
159
+
"name": "byfn-network",
160
160
"x-type": "hlfv1",
161
161
"version": "1.0.0",
162
162
"channels": {
@@ -180,7 +180,7 @@ We need a base connection profile that describes this fabric network which can t
180
180
"chaincodeQuery": true,
181
181
"eventSource": true
182
182
},
183
-
"peer0.org2.example.com": {
183
+
"peer1.org2.example.com": {
184
184
"endorsingPeer": true,
185
185
"chaincodeQuery": true,
186
186
"eventSource": true
@@ -252,7 +252,7 @@ We need a base connection profile that describes this fabric network which can t
252
252
"pem": "INSERT_ORG2_CA_CERT"
253
253
}
254
254
},
255
-
"peer0.org1.example.com": {
255
+
"peer1.org2.example.com": {
256
256
"url": "grpcs://localhost:10051",
257
257
"eventUrl": "grpcs://localhost:10053",
258
258
"grpcOptions": {
@@ -266,11 +266,17 @@ We need a base connection profile that describes this fabric network which can t
266
266
"certificateAuthorities": {
267
267
"ca.org1.example.com": {
268
268
"url": "https://localhost:7054",
269
-
"caName": "ca-org1"
269
+
"caName": "ca-org1",
270
+
"httpOptions": {
271
+
"verify": false
272
+
}
270
273
},
271
274
"ca.org2.example.com": {
272
275
"url": "https://localhost:8054",
273
-
"caName": "ca-org2"
276
+
"caName": "ca-org2",
277
+
"httpOptions": {
278
+
"verify": false
279
+
}
274
280
}
275
281
}
276
282
}
@@ -285,7 +291,7 @@ Use the following command to convert the pem file to something that can be embed
copy the contents of the file `/tmp/ca-org1.txt` and replace the text `INSERT_ORG1_CA_CERT`. It should now look something like this
294
+
copy the contents of the file `/tmp/composer/org1/ca-org1.txt` and replace the text `INSERT_ORG1_CA_CERT`. It should now look something like this (but be a single line in the profile file)
Once done, save this file as `/tmp/composer/byfn-network.json`.
315
315
316
316
This connection profile now describes the fabric network setup, all the peers, orderers and certificate authorities that are part of the network, it defines all the organizations that are participating in the network and also defines the channel's on this network. {{site.data.conrefs.composer_full}} can only interact with a single channel so only one channel should be defined.
317
317
318
318
<h2class='alice'>Step Three: Customizing the connection profile for Org1</h2>
319
319
320
-
This is just a case of now specifying the organization that `alice` belongs to in a client section with optional timeouts, so add the following block into the above connection profile `connection-network.json` after the `version` property and before the `channel` property and save it as `connection-org1.json`.
320
+
This is just a case of now specifying the organization that `alice` belongs to in a client section with optional timeouts, so add the following block into the above connection profile `/tmp/composer/byfn-network.json` after the `version` property and before the `channel` property and save it as `/tmp/composer/org1/byfn-network-org1.json`.
321
321
322
322
"client": {
323
323
"organization": "Org1",
@@ -355,7 +355,7 @@ So the section of the profile should look like
355
355
356
356
<h2class='bob'>Step Four: Building a connection profile for Org2</h2>
357
357
358
-
Repeat the same process for `bob` but this time specify the organization as `Org2` and save the file as `connection-org2.json`, it should have a section similar to
358
+
Repeat the same process for `bob` but this time specify the organization as `Org2` and save the file as `/tmp/composer/byfn-network-org2.json`, it should have a section similar to
359
359
360
360
...
361
361
"version": "1.0.0",
@@ -385,7 +385,7 @@ You must first locate the certificate file for this user. The certificate is the
385
385
386
386
Next, you must locate the private key file for this user. The private key is used to sign transactions as this identity. The private key file can be found in the `keystore` subdirectory. The name of the private key file is a long hexadecimal string, with a suffix of `_sk`, for example `78f2139bfcfc0edc7ada0801650ed785a11cfcdef3f9c36f3c8ca2ebfa00a59c_sk`. The name will change every time the configuration is generated.
387
387
388
-
Remember the path to both of these files, or copy them into the same directory as the connection profile file `connection-org1.json` that you created in step three. You will need these files in the next steps.
388
+
Remember the path to both of these files, or copy them into the same directory as the connection profile file `/tmp/composer/org1/byfn-network-org1.json` that you created in step three. You will need these files in the next steps.
389
389
390
390
<h2class='bob'>Step Six: Locating the certificate and private key for the {{site.data.conrefs.hlf_full}} administrator for Org2</h2>
391
391
@@ -397,15 +397,15 @@ You must first locate the certificate file for this user. The certificate is the
397
397
398
398
Next, you must locate the private key file for this user. The private key is used to sign transactions as this identity. The private key file can be found in the `keystore` subdirectory. The name of the private key file is a long hexadecimal string, with a suffix of `_sk`, for example `d4889cb2a32e167bf7aeced872a214673ee5976b63a94a6a4e61c135ca2f2dbb_sk`. The name will change every time the configuration is generated.
399
399
400
-
Remember the path to both of these files, or copy them into the same directory as the connection profile file `connection-org2.json` that you created in step four. You will need these files in the next steps.
400
+
Remember the path to both of these files, or copy them into the same directory as the connection profile file `/tmp/composer/byfn-network-org2.json` that you created in step four. You will need these files in the next steps.
401
401
402
402
<h2class='alice'>Step Seven: Creating business network cards for the {{site.data.conrefs.hlf_full}} administrator for Org1</h2>
403
403
404
404
In this step you will create business network cards for the administrator to use to deploy the blockchain business network to the {{site.data.conrefs.hlf_full}} network.
405
405
406
406
Run the `composer card create` command to create a business network card using the connection profile for `Org1`. You must specify the path to all three files that you either created or located in the previous steps: (note: the _sk_ file will differ.)
If the command works successfully, a business network card file called `[email protected]` will have been written to the current directory.
411
411
@@ -415,7 +415,7 @@ In this step you will create business network cards for the administrator to use
415
415
416
416
Run the `composer card create` command to create a business network card using the connection profile for `Org2`. You must specify the path to all three files that you either created or located in the previous steps:
If the command works successfully, a business network card file called `[email protected]` will have been written to the current directory.
421
421
@@ -457,7 +457,7 @@ You can find more information on endorsement policies in the {{site.data.conrefs
457
457
458
458
> Please note that the endorsement policies used for a business network must be in the JSON format used by the {{site.data.conrefs.hlf_full}} Node.js SDK. This is a different format to the simple endorsement policy format used by the {{site.data.conrefs.hlf_full}} CLI, which you will see in the {{site.data.conrefs.hlf_full}} documentation.
459
459
460
-
Create an endorsement policy file called `endorsement-policy.json` with the following contents and save it to disk. You will use this file in later steps, so remember where you place it!
460
+
Create an endorsement policy file called `/tmp/composer/endorsement-policy.json` with the following contents and save it to disk. You will use this file in later steps, so remember where you place it!
461
461
462
462
{
463
463
"identities": [
@@ -520,17 +520,17 @@ The certficates will be placed into a directory called `bob` in the current work
520
520
521
521
<h2class='alice'>Step Seventeen: Starting the business network</h2>
522
522
523
-
Run the `composer network start` command to start the business network. Only `Org1` needs to perform this operation. This command uses the `endorsement-policy.json` file created in step thirteen, and the `admin-pub.pem` files created by both Alice and Bob in step fifteen and step sixteen, so you must ensure that all of these files are accessible to this command:
523
+
Run the `composer network start` command to start the business network. Only `Org1` needs to perform this operation. This command uses the `/tmp/composer/endorsement-policy.json` file created in step thirteen, and the `admin-pub.pem` files created by both Alice and Bob in step fifteen and step sixteen, so you must ensure that all of these files are accessible to this command:
524
524
525
-
composer network start -c PeerAdmin@byfn-network-org1 -a [email protected] -o endorsementPolicyFile=endorsement-policy.json -A alice -C alice/admin-pub.pem -A bob -C bob/admin-pub.pem
525
+
composer network start -c PeerAdmin@byfn-network-org1 -a [email protected] -o endorsementPolicyFile=/tmp/composer/endorsement-policy.json -A alice -C alice/admin-pub.pem -A bob -C bob/admin-pub.pem
526
526
527
527
Once this command completes, the business network will have been started. Both Alice and Bob will be able to access the business network, start to set up the business network, and onboard other participants from their respective organizations. However, both Alice and Bob must create new business network cards with the certificates that they created in the previous steps so that they can access the business network.
528
528
529
529
<h2class='alice'>Step Eighteen: Creating a business network card to access the business network as Org1</h2>
530
530
531
531
Run the `composer card create` command to create a business network card that Alice, the business network administrator for `Org1`, can use to access the business network:
Run the `composer card import` command to import the business network card that you just created:
536
536
@@ -546,7 +546,7 @@ If the command completes successfully, then you should see the fully qualified p
546
546
547
547
Run the `composer card create` command to create a business network card that Bob, the business network administrator for `Org2`, can use to access the business network:
0 commit comments