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.
* fix all the problems and move to node 8 syntax
Signed-off-by: Dave Kelsey <[email protected]>
* fix code bug and update readme to support 0.17
Signed-off-by: Dave Kelsey <[email protected]>
* updates based on review
Signed-off-by: Dave Kelsey <[email protected]>
**IMPORTANT** if you are running this sample application using Hyperledger composer version 0.17 or higher then you need to be using Hyperledger fabric 1.1. To ensure this you must ensure you set the version to 1.1 as follows
26
+
27
+
```
28
+
$ export FABRIC_VERSION=hlfv11
29
+
```
30
+
If you have been using composer version 0.16 then you will need to clear out your file system card store as cards in there are not compatible with 0.17. The quickest way to do this is
31
+
```
32
+
$ rm -fr $HOME/.composer
23
33
```
24
34
25
-
2. If this is the first time you've run this tutorial, you'll need to download the fabric first. If you have already downloaded a set of Fabric images then first start the fabric (see below), and create a Composer profile. Make sure you don't have a previous network (digitalproperty-network) docker container left running as 'legacy' - remove legacy containers as necessary using `docker rm`). After that, you can then choose to stop the fabric, and start it again later. Alternatively, to completely clean up, you can 'teardown' the Fabric and the Composer profile / sample credentials (see more below).
35
+
2. If this is the first time you've run this tutorial, you'll need to download the fabric first. If you have already downloaded a set of Fabric images then first start the fabric (see below), and create a Composer business network card. Make sure you don't have a previous network (digitalproperty-network) docker container left running as 'legacy' - remove legacy containers as necessary using `docker rm`). After that, you can then choose to stop the fabric, and start it again later. Alternatively, to completely clean up, you can 'teardown' the Fabric (see more below).
26
36
27
37
All the scripts will be in the directory `~/fabric-tools` you created above. A typical sequence for Hyperledger Composer startup would be:
28
38
29
39
```
30
40
$ cd ~/fabric-tools
31
41
$ ./downloadFabric.sh
32
42
$ ./startFabric.sh
33
-
$ ./createComposerProfile.sh
43
+
$ ./createPeerAdminCard.sh
34
44
```
35
45
36
46
Then at the end of your development session
@@ -70,14 +80,15 @@ By default, this 'start' script will pause for 15 seconds to let Fabric start -
70
80
$ export FABRIC_START_TIMEOUT=30
71
81
```
72
82
73
-
### Create Composer Profile
83
+
### Create Composer Business network card
84
+
This will create a business network card and import it into the card store. This card provides the ability to install and start business networks on the hyperledger fabric network.
74
85
75
86
Issue this command from the `fabric-tools` directory
76
87
```
77
-
$ ./createComposerProfile.sh
88
+
$ ./createPeerAdminCard.sh
78
89
```
79
90
80
-
Note: this create a Hyperledger Composer profile specifically to connect to the development fabric you've already started.
91
+
Note: this create a Hyperledger Composer business network card specifically to connect to the development fabric you've already started.
81
92
82
93
### Teardown Fabric (when you want to 'clean' up and start afresh)
83
94
@@ -86,14 +97,6 @@ Issue from the `fabric-tools` directory
86
97
$ ./teardownFabric.sh
87
98
```
88
99
89
-
90
-
### Command Ordering
91
-
92
-
This diagram should to clarify the order in which the scripts can be run.
93
-
94
-
.
95
-
96
-
97
100
# Step 2: Getting the Hyperledger Composer sample application (the Digital Property CLI sample application) up and running
98
101
99
102
1. Make sure you've started Fabric as in Step 1 above. For example, If this is your first time for example
@@ -102,7 +105,7 @@ This diagram should to clarify the order in which the scripts can be run.
102
105
$ cd ~/fabric-tools
103
106
$ ./downloadFabric.sh
104
107
$ ./startFabric.sh
105
-
$ ./createComposerProfile.sh
108
+
$ ./createPeerAdminCard.sh
106
109
```
107
110
108
111
2. Clone the sample application into a directory of your choice - BUT not the same directory as in Step 1. (Assume `~/github')
@@ -113,6 +116,22 @@ $ cd composer-sample-applications
113
116
$
114
117
```
115
118
119
+
**IMPORTANT** if you are using Composer 0.17 or higher and thus Hyperledger Fabric 1.1, then you need to change the application to use the correct version of Composer. To do this open the file `packages/digitalproperty-app/package.json` and change all the references to composer dependencies from `^0.16.3` to `^0.17.2` eg.
120
+
```
121
+
"dependencies": {
122
+
"cli-table": "^0.3.1",
123
+
"composer-cli": "^0.17.2",
124
+
"composer-client": "^0.17.2",
125
+
"digitalproperty-network": "^0.1.2",
126
+
"jsonfile": "^2.4.0",
127
+
"lodash": "^4.17.4",
128
+
"prettyjson": "^1.2.1",
129
+
"sprintf-js": "^1.0.3",
130
+
"winston": "^2.3.0",
131
+
"yargs": "^6.5.0"
132
+
},
133
+
```
134
+
116
135
OPTIONAL: To see a summary of all the sample applications, there's a simple command that will show summary details of the sample applications available in this repository. A useful information node.js script has been created to show the available sample applications - note you will need to run `npm install` from the current directory (takes about 5-10 mins) before running this command.
0 commit comments