-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelloAll
414 lines (301 loc) · 17 KB
/
helloAll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
ssh -i "March New Pair.pem" [email protected]
ssh -i "BhanusKey.pem" [email protected]
--Start Connection From Here.
cd pemkeys && sudo ssh -i "ShubhamsInstance.pem" [email protected]
Prem Instance:- cd pemkeys && sudo ssh -i "ShubhamsInstance.pem" [email protected]
http://ec2-52-90-144-179.compute-1.amazonaws.com:8080
Prem:- http://ec2-52-91-179-226.compute-1.amazonaws.com:8080
http://ec2-52-90-144-179.compute-1.amazonaws.com:3000/explorer
http://ec2-52-90-144-179.compute-1.amazonaws.com:8059/
sudo -s
./stopFabric.sh
./teardownFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=sampleUser&orgName=farmer'
curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Vijay&orgName=gok'
curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=chandrakala&orgName=farmer'
curl -s -X POST \
http://localhost:4000/channels \
-H "authorization: Bearer <put JSON Web Token here>" \
-H "content-type: application/json" \
-d '{
"channelName":"mychannel",
"channelConfigPath":"../artifacts/channel/mychannel.tx"
}'
curl -s -X POST \
http://localhost:4000/chaincodes \
-H "authorization: Bearer <put JSON Web Token here>" \
-H "content-type: application/json" \
-d '{
"peers": ["peer0.farmer.kapy.com","peer1.farmer.kapy.com"],
"chaincodeName":"mycc",
"chaincodePath":"github.com/kapy_cc/go",
"chaincodeType": "golang",
"chaincodeVersion":"v0"
}'
curl -s -X POST \
http://localhost:4000/channels/mychannel/chaincodes \
-H "authorization: Bearer <put JSON Web Token here>" \
-H "content-type: application/json" \
-d '{
"peers": ["peer0.farmer.kapy.com","peer1.farmer.kapy.com"],
"chaincodeName":"mycc",
"chaincodeVersion":"v0",
"chaincodeType": "golang",
"args":["a","100","b","200"]
}'
curl -s -X POST \
http://localhost:4000/channels/mychannel/chaincodes/mycc \
-H "authorization: Bearer <put JSON Web Token here>" \
-H "content-type: application/json" \
-d '{
"peers": ["peer0.farmer.kapy.com","peer1.farmer.kapy.com"],
"fcn":"move",
"args":["a","b","10"]
}'
docker network prune
docker rm -f $(docker ps -aq)
docker rm -f $(docker ps -aq)
docker rmi -f $(docker images -q)
curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0
curl -sSL https://goo.gl/6wtTN5 | bash -s 1.2.0
https://github.com/grpc/grpc.git
from grpc root:-
npm install --build-from-source
docker-compose up -d
docker-compose -f docker-compose.yaml up -d
docker-compose -f docker-compose.yml down --remove-orphans
docker-compose -f docker-compose.yaml up | tee output2.txt
docker-compose -f docker-compose.yaml up
docker-compose -f docker-compose.yaml down --volumes
docker ps
docker start cli
docker exec -it cli bash
export CHANNEL_NAME=mychannel
peer channel create -o orderer.kapy.com:7050 -c $CHANNEL_NAME -f ./channel/mychannel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/kapy.com/orderers/orderer.kapy.com/msp/tlscacerts/tlsca.kapy.com-cert.pem
peer channel join -b mychannel.block
sudo find / -composer-cli -type d
find ~/ -type f -name "/composer-cli/cli.js"
export PATH=/home/ubuntu/chandrakala/Payment-System/bin:$PATH
git config --global user.email "[email protected]"
git config --global user.name "sachdevlaksh"
sudo find / -name composer-cli -type d
sudo find ~/ -name cryptogen -type d
sudo find / -name orderer.iscr.com -type d
sudo find ~/ -name orderer.iscr.com -type d
sudo find ~/ -name orderer.iscr.com -type d
orderer.iscr.com
Updated Docker-Compose.yaml
find . -name "cli.js"
find . -name "server.key"
docker pull hyperledger/fabric-ca:x86_64-1.1.0-preview
docker tag hyperledger/fabric-ca:x86_64-1.1.0-preview hyperledger/fabric-ca:latest
docker images
cp -a /home/ubuntu/Payment-System/artifacts/channel/channel/. /home/ubuntu/Payment-System/artifacts/channel/
cp -a /home/ubuntu/chandrakala/Payment-System/node_modules /home/ubuntu/hyperledger-student/
cp -a /home/ubuntu/IBPS/. /home/ubuntu/IBPS2
cp -a /home/ubuntu/IBPS2/crypto-config /home/ubuntu/IBPS2/artifacts/channel/
cp -a /home/ubuntu/Payment-System/node_modules /home/ubuntu/.nvm/versions/node/v8.11.1/lib/node_modules/generator-hyperledger-composer/
cp -a /home/ubuntu/IBPS2/. /home/ubuntu/IBPS/
cp -a /home/ubuntu/IBPS/node_modules /home/ubuntu/chandrakala/Payment-System
cp -a /home/ubuntu/Payment-System/artifacts/network-config.json /home/ubuntu/IBPS2/artifacts
cp -a /home/ubuntu/hyperledger-student/node_modules /home/ubuntu/chandrakala/Payment-System/
cp -a /home/ubuntu/hyperledger-student/node_modules /home/ubuntu/chandrakala/Payment-System/
cp -a /home/ubuntu/newEx/node_modules /home/ubuntu/newStudent/hyperledger-student/
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0-rc1 1.2.0-rc1 0.4.8
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.1.0-rc1 1.1.0-rc1 0.4.8
************************************IBPS Commands**************************************
../bin/cryptogen generate --config=./artifacts/channel/cryptogen.yaml
../../bin/cryptogen generate --config= ./channel/cryptogen.yaml
../../bin/cryptogen generate --config= ./cryptogen.yaml
../../bin/cryptogen generate --config=cryptogen.yaml
export FABRIC_CFG_PATH=$PWD
directory(Artifcats)//
../../bin/configtxgen -profile ThreeOrgsOrdererGenesis -outputBlock ./channel/genesis.block
../../bin/configtxgen -profile ThreeOrgsOrdererGenesis -outputBlock genesis.block
../../bin/configtxgen -profile ThreeOrgsChannel -outputCreateChannelTx mychannel.tx -channelID $CHANNEL_NAME
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate FarmerMSPanchors.tx -channelID $CHANNEL_NAME -asOrg FarmerMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate GOKMSPanchors.tx -channelID $CHANNEL_NAME -asOrg GOKMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate TrsryMSPanchors.tx -channelID $CHANNEL_NAME -asOrg TrsryMSP
Creating Chanel
export CHANNEL_NAME=mychannel
../../bin/configtxgen -profile ThreeOrgsChannel -outputCreateChannelTx ./channel/mychannel.tx -channelID $CHANNEL_NAME
../../bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel/AgentMSPanchors.tx -channelID $CHANNEL_NAME -asOrg AgentMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate ./channel/FarmerMSPanchors.tx -channelID $CHANNEL_NAME -asOrg FarmerMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate FarmerMSPanchors.tx -channelID $CHANNEL_NAME -asOrg FarmerMSP
../../bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel/IllinoisMSPanchors.tx -channelID $CHANNEL_NAME -asOrg IllinoisMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate ./channel/GOKMSPanchors.tx -channelID $CHANNEL_NAME -asOrg GOKMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate GOKMSPanchors.tx -channelID $CHANNEL_NAME -asOrg GOKMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate ./channel/TrsryMSPanchors.tx -channelID $CHANNEL_NAME -asOrg TrsryMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate TrsryMSPanchors.tx -channelID $CHANNEL_NAME -asOrg TrsryMSP
-***********************************************END **********************************************************
************************************Student Reference**************************************
export PATH=$PATH:/home/ubuntu/hyperledger-student/bin
./bin/cryptogen generate --config=./artifacts/channel/cryptogen.yaml
cryptogen generate --config=./crypto-config.yaml
export FABRIC_CFG_PATH=$PWD ./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel/genesis.block
configtxgen -profile ComposerOrdererGenesis -outputBlock ./composer-genesis.block
configtxgen -profile ComposerChannel -outputCreateChannelTx ./composer-channel.tx -channelID composerchannel
Creating Chanel export CHANNEL_NAME=mychannel
../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel/mychannel.tx -channelID $CHANNEL_NAME
../bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel/AgentMSPanchors.tx -channelID $CHANNEL_NAME -asOrg AgentMSP
../bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel/IllinoisMSPanchors.tx -channelID $CHANNEL_NAME -asOrg IllinoisMSP
-***********************************************END **********************************************************
export FABRIC_CFG_PATH=$PWD
../../bin/configtxgen -profile ThreeOrgsOrdererGenesis -outputBlock genesis.block
export CHANNEL_NAME=InterCom && ../../bin/configtxgen -profile ThreeOrgsChannel -outputCreateChannelTx InterCom.tx -channelID $CHANNEL_NAME
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate Org1MSPFarmer.tx -channelID $CHANNEL_NAME -asOrg FarmerMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate Org2MSPGOK.tx -channelID $CHANNEL_NAME -asOrg GOKMSP
../../bin/configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate Org3MSPTrsry.tx -channelID $CHANNEL_NAME -asOrg TrsryMSP
CHANNEL_NAME=InterCom TIMEOUT=500 docker-compose -f artifacts/docker-compose.yaml up
x86_64-1.1.0
mkdir /home/ubuntu/Payment-System/node_modules/pkcs11js/build
npm install log4js --save
npm install cookie-parser --save
npm install body-parser --save
npm install cors --save
npm install express --save
npm install express-bearer-token --save
npm install express-jwt --save
npm install express-session --save
npm install fabric-ca-client --save
sudo npm install -g fabric-client --unsafe-perm=true --allow-root
npm install fs-extra --save
npm install jsonwebtoken --save
docker pull hyperledger/fabric-orderer:x86_64-1.1.0-preview
docker tag hyperledger/fabric-orderer:x86_64-1.1.0-preview hyperledger/fabric-orderer:latest
docker images
docker pull hyperledger/fabric-peer:x86_64-1.1.0-preview
docker tag hyperledger/fabric-peer:x86_64-1.1.0-preview hyperledger/fabric-peer:latest
curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=farmer'
npm config set proxy http://559488:[email protected]:6050
npm config set https-proxy http://559488:[email protected]:6050
npm set strict-ssl false
npm config set proxy http://559488:March%[email protected]:6050
npm config set https-proxy http://559488:March#[email protected]:6050
http://559488:[email protected]:6050
C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Borland\StarTeam SDK 9.3\Lib;C:\Program Files\Borland\StarTeam SDK 9.3\Bin;C:\Go\bin;C:\Program Files\nodejs\;C:\Users\559488\AppData\Roaming\npm\node_modules\@angular\cli\bin
Paths
GIT LFS
sudo apt-get install software-properties-common
sudo curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
Select the file types you'd like Git LFS to manage (or directly edit your .gitattributes). You can configure additional file extensions at anytime.
git lfs track "*.zip"
Make sure .gitattributes is tracked
git add .gitattributes
There is no step three. Just commit and push to GitHub as you normally would.
git add file.psd
git commit -m "Add design file"
git push origin master
echo "# HyperLedger-Composer" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/sachdevlaksh/HyperLedger-Composer.git
git push -u origin master
sudo chown -R $USER /home/ubuntu/.nvm/versions/node/v8.11.1/lib/node_modules
sudo chown -R $USER ../lib/node_modules/composer-cli/cli.js
sudo chown -R $USER /home/ubuntu/.nvm/versions/node/v8.11.1/bin/composer
sudo chown -R $USER /home/ubuntu/.nvm/versions/node/v8.11.1/bin
sudo chown -R $USER /usr/local/sbin
sudo chown -R $USER /usr/local/bin
sudo chown -R $USER /usr/sbin
sudo chown -R $USER /usr/bin:/sbin
sudo chown -R $USER /bin:/usr/games
sudo chown -R $USER /usr/local/games
sudo chown -R $USER admin@digipay-system
sudo chown -R $USER PeerAdmin@hlfv1
sudo chown -R $USER /snap/bin
sudo chown -R $USER /home/ubuntu/npm/bin
sudo chown -R $USER /usr/local/bin
sudo chown -R $USER /home/ubuntu/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-server/node_modules/grpc/
sudo chown -R $USER /home/ubuntu/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js
sudo chown -R $USER metadata.json
sudo -s
:1,$d
npm install -g [email protected]
------------------Composer-----
npm install -g composer-cli
npm install -g composer-rest-server
npm install -g generator-hyperledger-composer
npm install -g yo
npm install -g composer-playground@latest
mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
tar -xvf fabric-dev-servers.tar.gz
cd ~/fabric-dev-servers
./downloadFabric.sh
cd ~/fabric-dev-servers
./startFabric.sh
./createPeerAdminCard.sh
composer-playground
:1,$d
~/fabric-dev-servers/stopFabric.sh
~/fabric-dev-servers/startFabric.sh
~/fabric-dev-servers/stopFabric.sh
~/fabric-dev-servers/teardownFabric.sh
~/fabric-dev-servers/startFabric.sh
./createPeerAdminCard.sh
/stopFabric.sh
./startFabric.sh
./stopFabric.sh
./teardownFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
export PATH=$PATH:/home/ubuntu/hyperledger-student/bin
yo hyperledger-composer:businessnetwork
composer archive create -t dir -n .
composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]
composer network start --networkName digipay-system --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
composer card import --file networkadmin.card
composer network ping --card admin@digipay-system
yo hyperledger-composer:angular
ng serve --proxy-config proxy.conf.js --host ec2-52-90-144-179.compute-1.amazonaws.com
ng serve --proxy-config proxy.conf.js --host localhost
/home/ubuntu/Payment-System/node_modules/grpc
/home/ubuntu/GitComposer/node_modules/
cp -a /home/ubuntu/Payment-System/node_modules/grpc /home/ubuntu/GitComposer/node_modules/
cp -a /home/ubuntu/Payment-System/node_modules/grpc /home/ubuntu/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-server/node_modules/
cp -a /home/ubuntu/Payment-System/node_modules /home/ubuntu/HyperledgerFabric/
sudo chown -R $USER /home/ubuntu/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-server/node_modules/
sudo chown -R $USER /home/ubuntu/.nvm/alias/default
cd /home/ubuntu/GitComposer/tutorial-network
To ReRun The rest Server
nohup composer-rest-server -c admin@digital-network -n never -w true -p 3001
nohup composer-rest-server -c admin@digital-network -p 8080
composer-rest-server -c admin@ddigital-network -p 3001
http://ec2-52-90-144-179.compute-1.amazonaws.com:3001/api/LandRecord?filter[where][eid]=12345
Database:-
Upgrade BNA:-
composer archive create -t dir -n .
composer network install -a [email protected] -c PeerAdmin@hlfv1
composer network upgrade -c PeerAdmin@hlfv1 -n digital-network -V 0.0.1
composer network install -a [email protected] -c PeerAdmin@hlfv1
composer network start --networkName digital-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
composer card import --file networkadmin.card
composer network ping --card admin@digital-network
composer-rest-server -c admin@digital-network -p 3001
composer archive create -t dir -n .
composer network install -a [email protected] -c PeerAdmin@hlfv1
composer network upgrade -c PeerAdmin@hlfv1 -n digital-network -V 0.0.1
G2,Sight No 3, Sri Rama Nilaya Building, Ayee Mata Temple road,Roopena agrahara -68
composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]
composer network start --networkName digipay-system --networkVersion 0.0.3 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
initdb -D C:\Users\559488\pgdata -U postgres -W -E UTF8 -A md5
pg_ctl -D C:\Users\559488\pgdata start
pg_ctl -D C:\Users\559488\pgdata stop
https://github.com/prem09jun
chandu2416 -- username
*Nani24 -- pwd
sudo netstat -lpn |grep :3001
sudo kill -9 23134
git remote set-url origin [email protected]:USERNAME/REPOSITORY.git
export CLOUDANT_DB_URL=https://adfc60ec-fa4a-46a9-bcf9-e554de84b30b-bluemix:0f130af356c2fcfc117f121fa37673bf41c604165888b98399dfd6bcf62dacaa@adfc60ec-fa4a-46a9-bcf9-e554de84b30b-bluemix.cloudant.com
export KAPY_DB=farmerrecords
export VERIFYRECORD_DB=registeredfarmerrecords
export LOGIN_DB=logindb