Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.83 KB | None | 0 0
  1. #
  2. # Copyright IBM Corp. All Rights Reserved.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0
  5. # error issues : if peer dont go up, it problem with dns and host "reinstall docker"
  6. # NOTE FOR PRIVATE DATA : each peer must have own defined couch that depend on him
  7. # NOTE FOR PRIVATE DATA : define env. var CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=nameofcouch and CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  8. # if you don't have upside setup, all peers have the same ledger state
  9. version: '2'
  10.  
  11. services:
  12.  
  13. ca.org1.example.com:
  14. image: hyperledger/fabric-ca
  15. environment:
  16. - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  17. - FABRIC_CA_SERVER_CA_NAME=ca-buyer
  18. - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.buyer.iot-logistic.com-cert.pem
  19. - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/c47807218859eb00c124639276fca6ef194fd98bb29a38c8cc0b1cf008cdb22a_sk
  20. - FABRIC_CA_SERVER_TLS_ENABLED=true
  21. - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.buyer.iot-logistic.com-cert.pem
  22. - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/c47807218859eb00c124639276fca6ef194fd98bb29a38c8cc0b1cf008cdb22a_sk
  23. ports:
  24. - "7054:7054"
  25. command: sh -c "fabric-ca-server start -b buyer_admin:buyer2019 --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.buyer.iot-logistic.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/c47807218859eb00c124639276fca6ef194fd98bb29a38c8cc0b1cf008cdb22a_sk"
  26. volumes:
  27. - ./crypto-config/peerOrganizations/buyer.iot-logistic.com/ca/:/etc/hyperledger/fabric-ca-server-config
  28. container_name: ca_buyer
  29.  
  30. ca.org2.example.com:
  31. image: hyperledger/fabric-ca
  32. environment:
  33. - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  34. - FABRIC_CA_SERVER_CA_NAME=ca-seller
  35. - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.seller.iot-logistic.com-cert.pem
  36. - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/2e253c9d64cbd6006a4b2aa25a2ad76bbd117c301b46995604ef48323522ae52_sk
  37. - FABRIC_CA_SERVER_TLS_ENABLED=true
  38. - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.seller.iot-logistic.com-cert.pem
  39. - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/2e253c9d64cbd6006a4b2aa25a2ad76bbd117c301b46995604ef48323522ae52_sk
  40. ports:
  41. - "8054:7054"
  42. command: sh -c "fabric-ca-server start -b seller_admin:seller2019 --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.seller.iot-logistic.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/2e253c9d64cbd6006a4b2aa25a2ad76bbd117c301b46995604ef48323522ae52_sk"
  43. volumes:
  44. - ./crypto-config/peerOrganizations/seller.iot-logistic.com/ca/:/etc/hyperledger/fabric-ca-server-config
  45. container_name: ca_seller
  46.  
  47. ca.org3.example.com:
  48. image: hyperledger/fabric-ca
  49. environment:
  50. - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  51. - FABRIC_CA_SERVER_CA_NAME=ca-regulator
  52. - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.regulator.iot-logistic.com-cert.pem
  53. - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/da78b261cd0b6abfc13140adfafcb84cc3c42685878273b0b993d53f63cddf99_sk
  54. - FABRIC_CA_SERVER_TLS_ENABLED=true
  55. - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.regulator.iot-logistic.com-cert.pem
  56. - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/da78b261cd0b6abfc13140adfafcb84cc3c42685878273b0b993d53f63cddf99_sk
  57. ports:
  58. - "9054:7054"
  59. command: sh -c "fabric-ca-server start -b regulator_admin:regulator2019 --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.regulator.iot-logistic.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/da78b261cd0b6abfc13140adfafcb84cc3c42685878273b0b993d53f63cddf99_sk"
  60. volumes:
  61. - ./crypto-config/peerOrganizations/regulator.iot-logistic.com/ca/:/etc/hyperledger/fabric-ca-server-config
  62. container_name: ca_regulator
  63.  
  64. ca.org4.example.com:
  65. image: hyperledger/fabric-ca
  66. environment:
  67. - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  68. - FABRIC_CA_SERVER_CA_NAME=ca-logistic
  69. - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.logistic.iot-logistic.com-cert.pem
  70. - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/e2fe63b2848c628280e1d15b9ca707e24bbfd1967c0a981a6f6744a34e42c22d_sk
  71. - FABRIC_CA_SERVER_TLS_ENABLED=true
  72. - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.logistic.iot-logistic.com-cert.pem
  73. - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/e2fe63b2848c628280e1d15b9ca707e24bbfd1967c0a981a6f6744a34e42c22d_sk
  74. ports:
  75. - "10054:7054"
  76. command: sh -c "fabric-ca-server start -b logistic_admin:logistic2019 --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.logistic.iot-logistic.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/e2fe63b2848c628280e1d15b9ca707e24bbfd1967c0a981a6f6744a34e42c22d_sk"
  77. volumes:
  78. - ./crypto-config/peerOrganizations/logistic.iot-logistic.com/ca/:/etc/hyperledger/fabric-ca-server-config
  79. container_name: ca_logistic
  80.  
  81. orderer.iot-logistic.com:
  82. container_name: orderer.iot-logistic.com
  83. image: hyperledger/fabric-orderer
  84. environment:
  85. - FABRIC_LOGGING_SPEC=DEBUG
  86. - ORDERER_GENERAL_LOGLEVEL=debug
  87. - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
  88. - ORDERER_GENERAL_GENESISMETHOD=file
  89. - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
  90. - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
  91. - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp
  92. - ORDERER_GENERAL_TLS_ENABLED=true
  93. - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key
  94. - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt
  95. - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt,/etc/hyperledger/crypto/peerRegulator/tls/ca.crt,/etc/hyperledger/crypto/peerBuyer/tls/ca.crt,/etc/hyperledger/crypto/peerSeller/tls/ca.crt,/etc/hyperledger/crypto/peerLogistic/tls/ca.crt]
  96. working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers
  97. command: orderer
  98. ports:
  99. - 7050:7050
  100. volumes:
  101. - ./artifacts:/etc/hyperledger/configtx
  102. - ./crypto-config/ordererOrganizations/iot-logistic.com/orderers/orderer.iot-logistic.com/:/etc/hyperledger/crypto/orderer
  103. - ./crypto-config/peerOrganizations/regulator.iot-logistic.com/peers/peer0.regulator.iot-logistic.com/:/etc/hyperledger/crypto/peerRegulator
  104. - ./crypto-config/peerOrganizations/buyer.iot-logistic.com/peers/peer0.buyer.iot-logistic.com/:/etc/hyperledger/crypto/peerBuyer
  105. - ./crypto-config/peerOrganizations/seller.iot-logistic.com/peers/peer0.seller.iot-logistic.com/:/etc/hyperledger/crypto/peerSeller
  106. - ./crypto-config/peerOrganizations/logistic.iot-logistic.com/peers/peer0.logistic.iot-logistic.com/:/etc/hyperledger/crypto/peerLogistic
  107.  
  108. ledger.state.regulator:
  109. container_name: ledger.state.regulator
  110. image: hyperledger/fabric-couchdb
  111. # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
  112. # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
  113. environment:
  114. - COUCHDB_USER=
  115. - COUCHDB_PASSWORD=
  116. ports:
  117. - 5984:5984
  118.  
  119. peer0.regulator.iot-logistic.com:
  120. container_name: peer0.regulator.iot-logistic.com
  121. extends:
  122. file: base.yaml
  123. service: peer-base
  124. environment:
  125. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=ledger.state.regulator:5984
  126. - CORE_PEER_ID=peer0.regulator.iot-logistic.com
  127. - CORE_PEER_LOCALMSPID=RegulatorMSP
  128. - CORE_PEER_ADDRESS=peer0.regulator.iot-logistic.com:7051
  129. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.regulator.iot-logistic.com:7051
  130. - CORE_PEER_CHAINCODELISTENADDRESS=peer0.regulator.iot-logistic.com:7052
  131. ports:
  132. - 7051:7051
  133. - 7052:7052
  134. - 7053:7053
  135. volumes:
  136. - ./crypto-config/peerOrganizations/regulator.iot-logistic.com/peers/peer0.regulator.iot-logistic.com/:/etc/hyperledger/crypto/peer
  137. depends_on:
  138. - orderer.iot-logistic.com
  139. - ledger.state.regulator
  140.  
  141. ledger.state.buyer:
  142. container_name: ledger.state.buyer
  143. image: hyperledger/fabric-couchdb
  144. # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
  145. # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
  146. environment:
  147. - COUCHDB_USER=
  148. - COUCHDB_PASSWORD=
  149. ports:
  150. - 6984:5984
  151.  
  152.  
  153. peer0.buyer.iot-logistic.com:
  154. container_name: peer0.buyer.iot-logistic.com
  155. extends:
  156. file: base.yaml
  157. service: peer-base
  158. environment:
  159. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=ledger.state.buyer:5984
  160. - CORE_PEER_ID=peer0.buyer.iot-logistic.com
  161. - CORE_PEER_LOCALMSPID=BuyerMSP
  162. - CORE_PEER_ADDRESS=peer0.buyer.iot-logistic.com:7051
  163. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.buyer.iot-logistic.com:7051
  164. - CORE_PEER_CHAINCODELISTENADDRESS=peer0.buyer.iot-logistic.com:7052
  165. ports:
  166. - 8051:7051
  167. - 8052:7052
  168. - 8053:7053
  169. volumes:
  170. - ./crypto-config/peerOrganizations/buyer.iot-logistic.com/peers/peer0.buyer.iot-logistic.com/:/etc/hyperledger/crypto/peer
  171. depends_on:
  172. - orderer.iot-logistic.com
  173. - ledger.state.buyer
  174.  
  175. ledger.state.seller:
  176. container_name: ledger.state.seller
  177. image: hyperledger/fabric-couchdb
  178. # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
  179. # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
  180. environment:
  181. - COUCHDB_USER=
  182. - COUCHDB_PASSWORD=
  183. ports:
  184. - 7984:5984
  185.  
  186. peer0.seller.iot-logistic.com:
  187. container_name: peer0.seller.iot-logistic.com
  188. extends:
  189. file: base.yaml
  190. service: peer-base
  191. environment:
  192. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=ledger.state.seller:5984
  193. - CORE_PEER_ID=peer0.seller.iot-logistic.com
  194. - CORE_PEER_LOCALMSPID=SellerMSP
  195. - CORE_PEER_ADDRESS=peer0.seller.iot-logistic.com:7051
  196. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.seller.iot-logistic.com:7051
  197. - CORE_PEER_CHAINCODELISTENADDRESS=peer0.seller.iot-logistic.com:7052
  198. ports:
  199. - 9051:7051
  200. - 9052:7052
  201. - 9053:7053
  202. volumes:
  203. - ./crypto-config/peerOrganizations/seller.iot-logistic.com/peers/peer0.seller.iot-logistic.com/:/etc/hyperledger/crypto/peer
  204. depends_on:
  205. - orderer.iot-logistic.com
  206. - ledger.state.seller
  207.  
  208. ledger.state.logistic:
  209. container_name: ledger.state.logistic
  210. image: hyperledger/fabric-couchdb
  211. # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
  212. # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
  213. environment:
  214. - COUCHDB_USER=
  215. - COUCHDB_PASSWORD=
  216. ports:
  217. - 8984:5984
  218.  
  219. peer0.logistic.iot-logistic.com:
  220. container_name: peer0.logistic.iot-logistic.com
  221. extends:
  222. file: base.yaml
  223. service: peer-base
  224. environment:
  225. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=ledger.state.logistic:5984
  226. - CORE_PEER_ID=peer0.logistic.iot-logistic.com
  227. - CORE_PEER_LOCALMSPID=LogisticMSP
  228. - CORE_PEER_ADDRESS=peer0.logistic.iot-logistic.com:7051
  229. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.logistic.iot-logistic.com:7051
  230. - CORE_PEER_CHAINCODELISTENADDRESS=peer0.logistic.iot-logistic.com:7052
  231. ports:
  232. - 10051:7051
  233. - 10052:7052
  234. - 10053:7053
  235. volumes:
  236. - ./crypto-config/peerOrganizations/logistic.iot-logistic.com/peers/peer0.logistic.iot-logistic.com/:/etc/hyperledger/crypto/peer
  237. depends_on:
  238. - orderer.iot-logistic.com
  239. - ledger.state.logistic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement