参考了官方文档,直接就可以了https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html 很好用

  1. ~ cd $GOPATH/src/github.com/hyperledger/fabric/master/scripts/
  2. cd: no such file or directory: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/master/scripts/
  3. ~ cd $GOPATH/src/github.com/hyperledger/fabric/scripts
  4. scripts git:(be235fd3a) ls
  5. bootstrap.sh check_go_version.sh check_trailingspaces.sh goListFiles.sh multiarch.sh run-unit-tests.sh
  6. changelog.sh check_license.sh compile_protos.sh golinter.sh pull_build_artifacts.sh
  7. check_deps.sh check_spelling.sh generateHelpDocs.sh metrics_doc.sh run-integration-tests.sh
  8. scripts git:(be235fd3a) ./bootstrap.sh
  9.  
  10. Installing hyperledger/fabric-samples repo
  11.  
  12. ===> Cloning hyperledger/fabric-samples repo and checkout v1.4.0
  13. Cloning into 'fabric-samples'...
  14. remote: Enumerating objects: , done.
  15. remote: Counting objects: % (/), done.
  16. remote: Compressing objects: % (/), done.
  17. remote: Total (delta ), reused (delta ), pack-reused
  18. Receiving objects: % (/), 1.04 MiB | 25.00 KiB/s, done.
  19. Resolving deltas: % (/), done.
  20. Note: checking out 'v1.4.0'.
  21.  
  22. You are in 'detached HEAD' state. You can look around, make experimental
  23. changes and commit them, and you can discard any commits you make in this
  24. state without impacting any branches by performing another checkout.
  25.  
  26. If you want to create a new branch to retain commits you create, you may
  27. do so (now or later) by using -b with the checkout command again. Example:
  28.  
  29. git checkout -b <new-branch-name>
  30.  
  31. HEAD is now at bb39b6e [FAB-] Align fabric-samples with 1.4. release
  32.  
  33. Installing Hyperledger Fabric binaries
  34.  
  35. ===> Downloading version 1.4. platform specific fabric binaries
  36. ===> Downloading: https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/darwin-amd64-1.4.0/hyperledger-fabric-darwin-amd64-1.4.0.tar.gz
  37. % Total % Received % Xferd Average Speed Time Time Time Current
  38. Dload Upload Total Spent Left Speed
  39. 39.8M 39.8M 190k :: :: --:--:-- 254k
  40. ==> Done.
  41. ===> Downloading version 1.4. platform specific fabric-ca-client binary
  42. ===> Downloading: https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/darwin-amd64-1.4.0/hyperledger-fabric-ca-darwin-amd64-1.4.0.tar.gz
  43. % Total % Received % Xferd Average Speed Time Time Time Current
  44. Dload Upload Total Spent Left Speed
  45. 4806k 4806k 161k :: :: --:--:-- 160k
  46. ==> Done.
  47.  
  48. Installing Hyperledger Fabric docker images
  49.  
  50. ===> Pulling fabric Images
  51. ==> FABRIC IMAGE: peer
  52.  
  53. 1.4.: Pulling from hyperledger/fabric-peer
  54. 3b37166ec614: Pull complete
  55. 504facff238f: Pull complete
  56. ebbcacd28e10: Pull complete
  57. c7fb3351ecad: Pull complete
  58. 2e3debadcbf7: Pull complete
  59. fc435e46e32e: Pull complete
  60. a4922bafdce8: Pull complete
  61. 7d9964965066: Pull complete
  62. 625153a09c48: Pull complete
  63. 291344806a10: Pull complete
  64. Digest: sha256:9707c97f787de1d4d6dd60994d6b8ea2e5cc28b0f42e6849df3fb41c64b41372
  65. Status: Downloaded newer image for hyperledger/fabric-peer:1.4.
  66. ==> FABRIC IMAGE: orderer
  67.  
  68. 1.4.: Pulling from hyperledger/fabric-orderer
  69. 3b37166ec614: Already exists
  70. 504facff238f: Already exists
  71. ebbcacd28e10: Already exists
  72. c7fb3351ecad: Already exists
  73. 2e3debadcbf7: Already exists
  74. fc435e46e32e: Already exists
  75. a4922bafdce8: Already exists
  76. 7d9964965066: Already exists
  77. 1aa1f5822ea4: Pull complete
  78. f3adcb95411e: Pull complete
  79. Digest: sha256:644265186b4887c7d9dcb91895124ccead3c0125c2c4f9eadc421dc9555d7495
  80. Status: Downloaded newer image for hyperledger/fabric-orderer:1.4.
  81. ==> FABRIC IMAGE: ccenv
  82.  
  83. 1.4.: Pulling from hyperledger/fabric-ccenv
  84. 3b37166ec614: Already exists
  85. 504facff238f: Already exists
  86. ebbcacd28e10: Already exists
  87. c7fb3351ecad: Already exists
  88. 2e3debadcbf7: Already exists
  89. fc435e46e32e: Already exists
  90. a4922bafdce8: Already exists
  91. 14675a1189ca: Pull complete
  92. 33f930d7053e: Pull complete
  93. 7aa21e006739: Pull complete
  94. 806ba27e29bb: Pull complete
  95. 0292b0ff822a: Pull complete
  96. 5d4ce0f5fd82: Pull complete
  97. 3bde20c14104: Pull complete
  98. Digest: sha256:6d797cac9fd39d4c9964fbcf02e47137ce8ae321af60832c41d511f0c7ed4d3e
  99. Status: Downloaded newer image for hyperledger/fabric-ccenv:1.4.
  100. ==> FABRIC IMAGE: tools
  101.  
  102. 1.4.: Pulling from hyperledger/fabric-tools
  103. 3b37166ec614: Already exists
  104. 504facff238f: Already exists
  105. ebbcacd28e10: Already exists
  106. c7fb3351ecad: Already exists
  107. 2e3debadcbf7: Already exists
  108. fc435e46e32e: Already exists
  109. a4922bafdce8: Already exists
  110. 14675a1189ca: Already exists
  111. 33f930d7053e: Already exists
  112. 7aa21e006739: Already exists
  113. 806ba27e29bb: Already exists
  114. 72b2b3c78600: Pull complete
  115. f36a6f470154: Pull complete
  116. 19fc6d1044df: Pull complete
  117. Digest: sha256:aee256916d0cb938d8023fa32ed2745991d32cfe79018e360f1720707ebfbdb5
  118. Status: Downloaded newer image for hyperledger/fabric-tools:1.4.
  119. ==> FABRIC IMAGE: baseos
  120.  
  121. Error response from daemon: manifest for hyperledger/fabric-baseos:1.4. not found
  122. Error response from daemon: No such image: hyperledger/fabric-baseos:1.4.
  123. ==> FABRIC IMAGE: nodeenv
  124.  
  125. Error response from daemon: manifest for hyperledger/fabric-nodeenv:1.4. not found
  126. Error response from daemon: No such image: hyperledger/fabric-nodeenv:1.4.
  127. ==> FABRIC IMAGE: javaenv
  128.  
  129. 1.4.: Pulling from hyperledger/fabric-javaenv
  130. 3b37166ec614: Already exists
  131. 504facff238f: Already exists
  132. ebbcacd28e10: Already exists
  133. c7fb3351ecad: Already exists
  134. 2e3debadcbf7: Already exists
  135. fc435e46e32e: Already exists
  136. a4922bafdce8: Already exists
  137. 14675a1189ca: Already exists
  138. 33f930d7053e: Already exists
  139. 7aa21e006739: Already exists
  140. 806ba27e29bb: Already exists
  141. af7eebe5d909: Pulling fs layer
  142. c0ad74369a8f: Pulling fs layer
  143. e36a0232c697: Pulling fs layer
  144. c44da90e9317: Pull complete
  145. 91686ed50f7f: Pull complete
  146. 1bc0e6d0fb0f: Pull complete
  147. db373eca3e52: Pull complete
  148. 942e34fe9650: Pull complete
  149. e49b8e9d853d: Pull complete
  150. 094ba7d3af94: Pull complete
  151. 4bf56bdf76e0: Pull complete
  152. 138eeaa643a0: Pull complete
  153. 2b405cbef2dc: Pull complete
  154. 386086ff2840: Pull complete
  155. 32bb4435cb82: Pull complete
  156. 3280cfa711dc: Pull complete
  157. 6b14cff5081c: Pull complete
  158. 04743de5a814: Pull complete
  159. 5360864ccda4: Pull complete
  160. 2fd4fc8d8137: Pull complete
  161. bd0e3b20a1bb: Pull complete
  162. a298ecbfeab2: Pull complete
  163. c7b9277c5a65: Pull complete
  164. 201919c3a1fe: Pull complete
  165. 539bfc561087: Pull complete
  166. 4e779849c7ea: Pull complete
  167. 3a7304a5b624: Pull complete
  168. Digest: sha256:f392f0c568e515b3e14c9afce14340ba18bc456cfd831ffcb4f72db58dbbcc34
  169. Status: Downloaded newer image for hyperledger/fabric-javaenv:1.4.
  170. ===> Pulling fabric ca Image
  171. ==> FABRIC CA IMAGE
  172.  
  173. 1.4.: Pulling from hyperledger/fabric-ca
  174. 3b37166ec614: Already exists
  175. 504facff238f: Already exists
  176. ebbcacd28e10: Already exists
  177. c7fb3351ecad: Already exists
  178. 2e3debadcbf7: Already exists
  179. fc435e46e32e: Already exists
  180. a4922bafdce8: Already exists
  181. c8ec0cae397c: Pull complete
  182. 3153e2e7116e: Pull complete
  183. d84abf263d15: Pull complete
  184. 45ff112943d3: Pull complete
  185. c4678d50bc7a: Pull complete
  186. Digest: sha256:c1dce534d9e9202697e0aaad7c5521d958700fda0b05127dafb9333c22e15f74
  187. Status: Downloaded newer image for hyperledger/fabric-ca:1.4.
  188. ===> Pulling thirdparty docker images
  189. ==> THIRDPARTY DOCKER IMAGE: couchdb
  190.  
  191. 0.4.: Pulling from hyperledger/fabric-couchdb
  192. Digest: sha256:f6c724592abf9c2b35d2f4cd6a7afcde9c1052cfed61560b20ef9e2e927d1790
  193. Status: Downloaded newer image for hyperledger/fabric-couchdb:0.4.
  194. ==> THIRDPARTY DOCKER IMAGE: kafka
  195.  
  196. 0.4.: Pulling from hyperledger/fabric-kafka
  197. 34667c7e4631: Already exists
  198. d18d76a881a4: Already exists
  199. 119c7358fbfc: Already exists
  200. 2aaf13f3eff0: Already exists
  201. 3f89de4cf84b: Already exists
  202. 24194f819972: Already exists
  203. 78e4eabd31a5: Already exists
  204. c7652b6bde40: Already exists
  205. b4646dd65c45: Already exists
  206. 5e6defad8a30: Already exists
  207. d0459116a54a: Pull complete
  208. 1bbcec7bfdef: Pull complete
  209. 5911218c5933: Pull complete
  210. Digest: sha256:62418a885c291830510379d9eb09fbdd3d397052d916ed877a468b0e2026b9e3
  211. Status: Downloaded newer image for hyperledger/fabric-kafka:0.4.
  212. ==> THIRDPARTY DOCKER IMAGE: zookeeper
  213.  
  214. 0.4.: Pulling from hyperledger/fabric-zookeeper
  215. 34667c7e4631: Already exists
  216. d18d76a881a4: Already exists
  217. 119c7358fbfc: Already exists
  218. 2aaf13f3eff0: Already exists
  219. 3f89de4cf84b: Already exists
  220. 24194f819972: Already exists
  221. 78e4eabd31a5: Already exists
  222. c7652b6bde40: Already exists
  223. b4646dd65c45: Already exists
  224. 5e6defad8a30: Already exists
  225. 0e045d9c2cdc: Pull complete
  226. 7ef4d8920518: Pull complete
  227. dbeed81d9a45: Pull complete
  228. aeea025ecc4e: Pull complete
  229. Digest: sha256:180553e88d09167370aa62a41587a9a95b819b981ad74cad218689412b85f130
  230. Status: Downloaded newer image for hyperledger/fabric-zookeeper:0.4.
  231.  
  232. ===> List out hyperledger docker images
  233. hyperledger/fabric-ca <none> 3a1799cda5d7 weeks ago 252MB
  234. hyperledger/fabric-tools <none> 432c24764fbb weeks ago .55GB
  235. hyperledger/fabric-ccenv <none> d7433c4b2a1c weeks ago .43GB
  236. hyperledger/fabric-orderer <none> ec4ca236d3d4 weeks ago 173MB
  237. hyperledger/fabric-peer <none> a1e3874f338b weeks ago 178MB
  238. hyperledger/fabric-zookeeper 0.4. 20c6045930c8 weeks ago .43GB
  239. hyperledger/fabric-zookeeper latest 20c6045930c8 weeks ago .43GB
  240. hyperledger/fabric-kafka 0.4. b4ab82bbaf2f weeks ago .44GB
  241. hyperledger/fabric-kafka latest b4ab82bbaf2f weeks ago .44GB
  242. hyperledger/fabric-couchdb 0.4. 8de128a55539 weeks ago .5GB
  243. hyperledger/fabric-couchdb latest 8de128a55539 weeks ago .5GB
  244. hyperledger/fabric-baseos amd64-0.4. 9d6ec11c60ff weeks ago 145MB
  245. hyperledger/fabric-baseos latest 9d6ec11c60ff weeks ago 145MB
  246. hyperledger/fabric-javaenv 1.4. 3d91b3bf7118 months ago .75GB
  247. hyperledger/fabric-javaenv latest 3d91b3bf7118 months ago .75GB
  248. hyperledger/fabric-tools 1.4. 0a44f4261a55 months ago .56GB
  249. hyperledger/fabric-tools latest 0a44f4261a55 months ago .56GB
  250. hyperledger/fabric-ccenv 1.4. 5b31d55f5f3a months ago .43GB
  251. hyperledger/fabric-ccenv latest 5b31d55f5f3a months ago .43GB
  252. hyperledger/fabric-orderer 1.4. 54f372205580 months ago 150MB
  253. hyperledger/fabric-orderer latest 54f372205580 months ago 150MB
  254. hyperledger/fabric-peer 1.4. 304fac59b501 months ago 157MB
  255. hyperledger/fabric-peer latest 304fac59b501 months ago 157MB
  256. hyperledger/fabric-ca 1.4. 1a804ab74f58 months ago 244MB
  257. hyperledger/fabric-ca latest 1a804ab74f58 months ago 244MB
  258. scripts git:(be235fd3a) ls
  259. bootstrap.sh check_go_version.sh check_trailingspaces.sh generateHelpDocs.sh metrics_doc.sh run-integration-tests.sh
  260. changelog.sh check_license.sh compile_protos.sh goListFiles.sh multiarch.sh run-unit-tests.sh
  261. check_deps.sh check_spelling.sh fabric-samples golinter.sh pull_build_artifacts.sh
  262. scripts git:(be235fd3a) cd fabric-samples
  263. fabric-samples git:(bb39b6e) ls
  264. CODE_OF_CONDUCT.md LICENSE balance-transfer chaincode config high-throughput
  265. CONTRIBUTING.md MAINTAINERS.md basic-network chaincode-docker-devmode fabcar interest_rate_swaps
  266. Jenkinsfile README.md bin commercial-paper first-network scripts
  267. fabric-samples git:(bb39b6e)
  268. fabric-samples git:(bb39b6e)
  269. fabric-samples git:(bb39b6e) ls
  270. CODE_OF_CONDUCT.md LICENSE balance-transfer chaincode config high-throughput
  271. CONTRIBUTING.md MAINTAINERS.md basic-network chaincode-docker-devmode fabcar interest_rate_swaps
  272. Jenkinsfile README.md bin commercial-paper first-network scripts
  273. fabric-samples git:(bb39b6e) cd first-network
  274. first-network git:(bb39b6e) ls
  275. README.md channel-artifacts docker-compose-cli.yaml docker-compose-e2e-template.yaml eyfn.sh
  276. base configtx.yaml docker-compose-couch-org3.yaml docker-compose-kafka.yaml org3-artifacts
  277. byfn.sh crypto-config.yaml docker-compose-couch.yaml docker-compose-org3.yaml scripts
  278. first-network git:(bb39b6e) ./byfn.sh
  279. Usage:
  280. byfn.sh <mode> [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>] [-s <dbtype>] [-l <language>] [-o <consensus-type>] [-i <imagetag>] [-v]
  281. <mode> - one of 'up', 'down', 'restart', 'generate' or 'upgrade'
  282. - 'up' - bring up the network with docker-compose up
  283. - 'down' - clear the network with docker-compose down
  284. - 'restart' - restart the network
  285. - 'generate' - generate required certificates and genesis block
  286. - 'upgrade' - upgrade the network from version 1.3.x to 1.4.
  287. -c <channel name> - channel name to use (defaults to "mychannel")
  288. -t <timeout> - CLI timeout duration in seconds (defaults to )
  289. -d <delay> - delay duration in seconds (defaults to )
  290. -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)
  291. -s <dbtype> - the database backend to use: goleveldb (default) or couchdb
  292. -l <language> - the chaincode language: golang (default) or node
  293. -o <consensus-type> - the consensus-type of the ordering service: solo (default) or kafka
  294. -i <imagetag> - the tag to be used to launch the network (defaults to "latest")
  295. -v - verbose mode
  296. byfn.sh -h (print this message)
  297.  
  298. Typically, one would first generate the required certificates and
  299. genesis block, then bring up the network. e.g.:
  300.  
  301. byfn.sh generate -c mychannel
  302. byfn.sh up -c mychannel -s couchdb
  303. byfn.sh up -c mychannel -s couchdb -i 1.4.
  304. byfn.sh up -l node
  305. byfn.sh down -c mychannel
  306. byfn.sh upgrade -c mychannel
  307.  
  308. Taking all defaults:
  309. byfn.sh generate
  310. byfn.sh up
  311. byfn.sh down
  312. first-network git:(bb39b6e) ./byfn.sh generate
  313. Generating certs and genesis block for channel 'mychannel' with CLI timeout of '' seconds and CLI delay of '' seconds
  314. Continue? [Y/n] y
  315. proceeding ...
  316. /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/../bin/cryptogen
  317.  
  318. ##########################################################
  319. ##### Generate certificates using cryptogen tool #########
  320. ##########################################################
  321. + cryptogen generate --config=./crypto-config.yaml
  322. org1.example.com
  323. org2.example.com
  324. + res=
  325. + set +x
  326.  
  327. /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/../bin/configtxgen
  328. ##########################################################
  329. ######### Generating Orderer Genesis block ##############
  330. ##########################################################
  331. CONSENSUS_TYPE=solo
  332. + '[' solo == solo ']'
  333. + configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
  334. -- ::24.844 CST [common.tools.configtxgen] main -> INFO Loading configuration
  335. -- ::24.885 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
  336. -- ::24.885 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  337. -- ::24.929 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
  338. -- ::24.929 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  339. -- ::24.932 CST [common.tools.configtxgen] doOutputBlock -> INFO Generating genesis block
  340. -- ::24.933 CST [common.tools.configtxgen] doOutputBlock -> INFO Writing genesis block
  341. + res=
  342. + set +x
  343.  
  344. #################################################################
  345. ### Generating channel configuration transaction 'channel.tx' ###
  346. #################################################################
  347. + configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
  348. -- ::24.986 CST [common.tools.configtxgen] main -> INFO Loading configuration
  349. -- ::25.027 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  350. -- ::25.061 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
  351. -- ::25.061 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  352. -- ::25.061 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO Generating new channel configtx
  353. -- ::25.064 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO Writing new channel tx
  354. + res=
  355. + set +x
  356.  
  357. #################################################################
  358. ####### Generating anchor peer update for Org1MSP ##########
  359. #################################################################
  360. + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
  361. -- ::25.132 CST [common.tools.configtxgen] main -> INFO Loading configuration
  362. -- ::25.174 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  363. -- ::25.212 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
  364. -- ::25.212 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  365. -- ::25.212 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Generating anchor peer update
  366. -- ::25.214 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Writing anchor peer update
  367. + res=
  368. + set +x
  369.  
  370. #################################################################
  371. ####### Generating anchor peer update for Org2MSP ##########
  372. #################################################################
  373. + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
  374. -- ::25.267 CST [common.tools.configtxgen] main -> INFO Loading configuration
  375. -- ::25.304 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  376. -- ::25.341 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
  377. -- ::25.342 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
  378. -- ::25.342 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Generating anchor peer update
  379. -- ::25.342 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Writing anchor peer update
  380. + res=
  381. + set +x
  382.  
  383. first-network git:(bb39b6e) ./byfn.sh up
  384. Starting for channel 'mychannel' with CLI timeout of '' seconds and CLI delay of '' seconds
  385. Continue? [Y/n] y
  386. proceeding ...
  387. LOCAL_VERSION=1.4.
  388. DOCKER_IMAGE_VERSION=1.4.
  389. Creating volume "net_orderer.example.com" with default driver
  390. Creating volume "net_peer0.org1.example.com" with default driver
  391. Creating volume "net_peer1.org1.example.com" with default driver
  392. Creating volume "net_peer0.org2.example.com" with default driver
  393. Creating volume "net_peer1.org2.example.com" with default driver
  394. Creating peer1.org1.example.com ... done
  395. Creating peer1.org2.example.com ... done
  396. Creating orderer.example.com ... done
  397. Creating peer0.org2.example.com ... done
  398. Creating peer0.org1.example.com ... done
  399. Creating cli ... done
  400.  
  401. ____ _____ _ ____ _____
  402. / ___| |_ _| / \ | _ \ |_ _|
  403. \___ \ | | / _ \ | |_) | | |
  404. ___) | | | / ___ \ | _ < | |
  405. |____/ |_| /_/ \_\ |_| \_\ |_|
  406.  
  407. Build your first network (BYFN) end-to-end test
  408.  
  409. Channel name : mychannel
  410. Creating channel...
  411. + peer channel create -o orderer.example.com: -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  412. + res=
  413. + set +x
  414. -- ::58.550 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  415. -- ::58.646 UTC [cli.common] readBlock -> INFO Received block:
  416. ===================== Channel 'mychannel' created =====================
  417.  
  418. Having all peers join the channel...
  419. + peer channel join -b mychannel.block
  420. + res=
  421. + set +x
  422. -- ::58.821 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  423. -- ::58.905 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
  424. ===================== peer0.org1 joined channel 'mychannel' =====================
  425.  
  426. + peer channel join -b mychannel.block
  427. + res=
  428. + set +x
  429. -- ::02.111 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  430. -- ::02.197 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
  431. ===================== peer1.org1 joined channel 'mychannel' =====================
  432.  
  433. + peer channel join -b mychannel.block
  434. + res=
  435. + set +x
  436. -- ::05.360 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  437. -- ::05.437 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
  438. ===================== peer0.org2 joined channel 'mychannel' =====================
  439.  
  440. + peer channel join -b mychannel.block
  441. + res=
  442. + set +x
  443. -- ::08.580 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  444. -- ::08.656 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
  445. ===================== peer1.org2 joined channel 'mychannel' =====================
  446.  
  447. Updating anchor peers for org1...
  448. + peer channel update -o orderer.example.com: -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  449. + res=
  450. + set +x
  451. -- ::11.815 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  452. -- ::11.849 UTC [channelCmd] update -> INFO Successfully submitted channel update
  453. ===================== Anchor peers updated for org 'Org1MSP' on channel 'mychannel' =====================
  454.  
  455. Updating anchor peers for org2...
  456. + peer channel update -o orderer.example.com: -c mychannel -f ./channel-artifacts/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  457. + res=
  458. + set +x
  459. -- ::15.029 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
  460. -- ::15.065 UTC [channelCmd] update -> INFO Successfully submitted channel update
  461. ===================== Anchor peers updated for org 'Org2MSP' on channel 'mychannel' =====================
  462.  
  463. Installing chaincode on peer0.org1...
  464. + peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
  465. + res=
  466. + set +x
  467. -- ::18.265 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
  468. -- ::18.265 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
  469. -- ::19.176 UTC [chaincodeCmd] install -> INFO Installed remotely response:<status: payload:"OK" >
  470. ===================== Chaincode is installed on peer0.org1 =====================
  471.  
  472. Install chaincode on peer0.org2...
  473. + peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
  474. + res=
  475. + set +x
  476. -- ::19.414 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
  477. -- ::19.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
  478. -- ::19.697 UTC [chaincodeCmd] install -> INFO Installed remotely response:<status: payload:"OK" >
  479. ===================== Chaincode is installed on peer0.org2 =====================
  480.  
  481. Instantiating chaincode on peer0.org2...
  482. + peer chaincode instantiate -o orderer.example.com: --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
  483. + res=
  484. + set +x
  485. -- ::19.900 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
  486. -- ::19.901 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
  487. ===================== Chaincode is instantiated on peer0.org2 on channel 'mychannel' =====================
  488.  
  489. Querying chaincode on peer0.org1...
  490. ===================== Querying on peer0.org1 on channel 'mychannel'... =====================
  491. + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
  492. Attempting to Query peer0.org1 ... secs
  493. + res=
  494. + set +x
  495.  
  496. ===================== Query successful on peer0.org1 on channel 'mychannel' =====================
  497. Sending invoke transaction on peer0.org1 peer0.org2...
  498. + peer chaincode invoke -o orderer.example.com: --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc --peerAddresses peer0.org1.example.com: --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com: --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'
  499. + res=
  500. + set +x
  501. -- ::25.793 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO Chaincode invoke successful. result: status:
  502. ===================== Invoke transaction successful on peer0.org1 peer0.org2 on channel 'mychannel' =====================
  503.  
  504. Installing chaincode on peer1.org2...
  505. + peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
  506. + res=
  507. + set +x
  508. -- ::25.945 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
  509. -- ::25.945 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
  510. -- ::26.280 UTC [chaincodeCmd] install -> INFO Installed remotely response:<status: payload:"OK" >
  511. ===================== Chaincode is installed on peer1.org2 =====================
  512.  
  513. Querying chaincode on peer1.org2...
  514. ===================== Querying on peer1.org2 on channel 'mychannel'... =====================
  515. + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
  516. Attempting to Query peer1.org2 ... secs
  517. + res=
  518. + set +x
  519.  
  520. ===================== Query successful on peer1.org2 on channel 'mychannel' =====================
  521.  
  522. ========= All GOOD, BYFN execution completed ===========
  523.  
  524. _____ _ _ ____
  525. | ____| | \ | | | _ \
  526. | _| | \| | | | | |
  527. | |___ | |\ | | |_| |
  528. |_____| |_| \_| |____/

在本地搭建hyperledger fabric 网络的更多相关文章

  1. Ubuntu下搭建Hyperledger Fabric v1.0环境

      多次尝试才正常启动了Fabric,如遇到各种莫名错误,请参考如下一步步严格安装,特别用户权限需要注意. 一.安装Ubuntu16 虚拟机或双系统,虚拟机有VirtualBox或者VMware,Ub ...

  2. 基于ubuntu16.04快速构建Hyperledger Fabric网络

    前言 最近在参加一个比赛,使用到了区块链的开源软件hyperledger,由于之前从未接触过区块链,以及和区块链开发相关的内容,所有在网上查阅了大量的资料,并且通过学习yeasy(杨宝华)开源的入门书 ...

  3. 7.搭建hyperledger fabric环境及启动——2019年12月12日

    2019年12月12日13:05:16 声明:从网络中学习整理实践而来. 1.介绍fabric Fabric 是一个面向企业应用的区块链框架,基于 Fabric 的开发可以粗略分为几个层面: 1. 参 ...

  4. 基于Debian搭建Hyperledger Fabric 2.4开发环境及运行简单案例

    相关实验源码已上传:https://github.com/wefantasy/FabricLearn 前言 在基于truffle框架实现以太坊公开拍卖智能合约中我们已经实现了以太坊智能合约的编写及部署 ...

  5. 阿里云ECS 自己搭建 hyperledger fabric的错误

    常常有在本地搭建没问题,到阿里云上跑的时候 fabric启动不成功的问题. 引用: https://yq.aliyun.com/articles/238940 解决方案 1.在e2e_cli 下有个d ...

  6. Hyperledger Fabric网络节点架构

    Fabric区块链网络的组成  区块链网络结构图 区块链网络组成 组成区块链网络相关的节点 节点是区块链的通信主体,和区块链网络相关的节点有多种类型:客户端(应用).Peer节点.排序服务(Orde ...

  7. Hyperledger Fabric定制联盟链网络工程实践

    总体来看,网络上成体系的可用的 Fabric 教程极少--不是直接在 Fabric 官网复制内容大谈基础理论就是在描述一个几乎无法复现的项目实践,以至于学习 Fabric 的效率极低,印象最深刻的就是 ...

  8. Hyperledger Fabric 环境搭建(1)

    1,Fabric的程序模块组成 Fabric不是一个单独的程序而是由一组模块组成,这些模块中的每一个都是一个可独立运行的可执行文件. (1)peer 主节点模块,负责存储区块链数据,运行维护链码: ( ...

  9. hyperledger中文文档学习-4-构建第一个fabric网络

    接下来的操作都将在hyperledge环境安装构建的虚拟机的环境下进行 参考https://hyperledgercn.github.io/hyperledgerDocs/build_network_ ...

随机推荐

  1. 安装nginx + nginx-gridfs + mongodb

    1.安装依赖包 yum -y install pcre-devel openssl-devel zlib-devel git gcc gcc-c++ git clone https://github. ...

  2. Centos7安装DockerCE

    1. 说明 以下使用的系统为centos7,64位,镜像为CentOS-7-x86_64-Minimal-1804,所有操作以root用户操作 2. 安装Docker官方源 2.1 安装yum工具集 ...

  3. go调度: 第一部分-OS调度(操作系统调度)

    开场白 这个是三篇博客中的第一篇, 用来提供go调度背后的机制和语法. 这篇博客主要关注操作系统调度. 三篇博客的顺序是: 1) go调度: 第一部分 - 操作系统调度 2) go调度: 第二部分 - ...

  4. Flask入门到放弃(五)—— 蓝图

    转载请在文章开头附上原文链接地址:https://www.cnblogs.com/Sunzz/p/10980094.html 蓝图 Blueprint 模块化 随着flask程序越来越复杂,我们需要对 ...

  5. Windows10家庭版安装docker攻略

    在公司,一直使用mac系统,在mac上安装使用docker还是比较方便的,可本人心血来朝,家里是win10 home版,就想在windows上刷一刷. 好了,废话不多说,直接上干货. 为了不误导广大爱 ...

  6. div折角~~~

    代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title ...

  7. ansible中的常用循环模块with_items

    ansible中的循环模块有很多,不过with_items最为常用,且较为简单,循环模块最多的功能就是将重复性的任务简单化,如下例子所示: - hosts: all remote_user: root ...

  8. mysql where 1

    where后跟各种查询条件,当条件为真时即可查询出记录.在这里where 1,1为真,也就是where后的条件为真,查询表中所有内容. SELECT * FROM `sdb_pam_members` ...

  9. Windows安装Redis(转!)

    转自https://www.cnblogs.com/wxjnew/p/9160855.html “现在我已经走到了人生的十字路口边了,我相信,在已走过的人生道路中,我一直知道其中哪一条是正确的,是的, ...

  10. CentOS7下的AIDE入侵检测配置

    一.AIDE的概念 AIDE:Advanced Intrusion Detection Environment,是一款入侵检测工具,主要用途是检查文档的完整性.AIDE在本地构造了一个基准的数据库,一 ...