-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-org4.yaml
240 lines (233 loc) · 12.6 KB
/
docker-compose-org4.yaml
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
version: '2.0'
services:
# cli4:
# image: hyperledger/fabric-tools:2.4.1
# restart: always
# container_name: fabric-cli4
# hostname: fabric-cli4
# tty: true
# extra_hosts:
# - "orderer0.example.com:192.168.5.128"
# - "orderer1.example.com:192.168.5.128"
# - "orderer2.example.com:192.168.5.128"
# - "peer0.org0.example.com:192.168.5.128"
# - "peer0.org1.example.com:192.168.5.128"
# - "peer0.org2.example.com:192.168.5.128"
# - "peer0.org3.example.com:192.168.5.128"
# - "peer0.org4.example.com:192.168.5.128"
# - "ca.org0.example.com:192.168.5.128"
# - "ca.org1.example.com:192.168.5.128"
# - "ca.org2.example.com:192.168.5.128"
# - "ca.org3.example.com:192.168.5.128"
# - "ca.org4.example.com:192.168.5.128"
# environment:
# - CORE_PEER_ID=fabric-cli4
# - CORE_PEER_ADDRESS=peer0.org4.example.com:11051 # default to operate on peer0.org4
# - CORE_PEER_LOCALMSPID=Org4MSP
# - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls/server.crt
# - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls/server.key
# - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls/ca.crt
# - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org4.example.com/users/Admin@org4.example.com/msp
# - FABRIC_LOGGING_SPEC=DEBUG
# - FABRIC_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{module}] %{shortfunc} -> %{level:.4s}%{color:reset} %{message}
# - CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true
# - ORDERER_CA=/etc/hyperledger/fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
# volumes:
# - ./crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
# - ./configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
# - ./crypto-config:/etc/hyperledger/fabric/crypto-config
# - ./channel-artifacts:/tmp/channel-artifacts
# - ./chaincodes:/etc/hyperledger/fabric/chaincodes
# working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
# command: bash -c 'cd /tmp; source scripts/func.sh; while true; do sleep 20170504; done'
peer0.org4.example.com:
image: hyperledger/fabric-peer:2.4.1
restart: always
container_name: peer0.org4.example.com
hostname: peer0.org4.example.com
ports:
- 15051:7051
- 15052:7052
- 9451:9443
extra_hosts:
- "orderer0.example.com:192.168.5.128"
- "orderer1.example.com:192.168.5.128"
- "orderer2.example.com:192.168.5.128"
- "peer0.org0.example.com:192.168.5.128"
- "peer1.org0.example.com:192.168.5.128"
- "peer0.org1.example.com:192.168.5.128"
- "peer1.org1.example.com:192.168.5.128"
- "peer0.org2.example.com:192.168.5.128"
- "peer1.org2.example.com:192.168.5.128"
- "peer0.org3.example.com:192.168.5.128"
- "peer1.org3.example.com:192.168.5.128"
- "peer0.org4.example.com:192.168.5.128"
- "peer1.org4.example.com:192.168.5.128"
- "ca.org0.example.com:192.168.5.128"
- "ca.org1.example.com:192.168.5.128"
- "ca.org2.example.com:192.168.5.128"
- "ca.org3.example.com:192.168.5.128"
- "ca.org4.example.com:192.168.5.128"
environment:
- FABRIC_LOGGING_SPEC=INFO
- FABRIC_LOGGING_FORMAT="%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}"
- CORE_PEER_ADDRESSAUTODETECT=false
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host # uncomment this to use specific network
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the org leader, default to false
- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443 # operation RESTful API
- CORE_METRICS_PROVIDER=prometheus # prometheus will pull metrics from fabric via /metrics RESTful API
- CORE_PEER_PROFILE_ENABLED=false
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
- CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:2.4.1
- CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:2.4.1
- CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:2.4.1
- CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.4.1
- CORE_PEER_ID=peer0.org4.example.com
- CORE_PEER_ADDRESS=peer0.org4.example.com:15051
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_CHAINCODEADDRESS=peer0.org4.example.com:15052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org4.example.com:15051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org4.example.com:15051
- CORE_PEER_LOCALMSPID=Org4MSP
- FABRIC_LOGGING_SPEC=DEBUG # info:core.chaincode=debug
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=peer0.org4.couchdb:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/msp:/etc/hyperledger/fabric/msp
- ./crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls:/etc/hyperledger/fabric/tls
expose:
- "15051" # gRPC
- "15052" # chaincode
- "9451" # Operation REST
#command: bash -c 'bash /tmp/peer_build.sh; peer node start'
command: peer node start
depends_on:
- peer0.org4.couchdb
peer1.org4.example.com:
image: hyperledger/fabric-peer:2.4.1
restart: always
container_name: peer1.org4.example.com
hostname: peer1.org4.example.com
ports:
- 16051:7051
- 16052:7052
- 9452:9443
extra_hosts:
- "orderer0.example.com:192.168.5.128"
- "orderer1.example.com:192.168.5.128"
- "orderer2.example.com:192.168.5.128"
- "peer0.org0.example.com:192.168.5.128"
- "peer1.org0.example.com:192.168.5.128"
- "peer0.org1.example.com:192.168.5.128"
- "peer1.org1.example.com:192.168.5.128"
- "peer0.org2.example.com:192.168.5.128"
- "peer1.org2.example.com:192.168.5.128"
- "peer0.org3.example.com:192.168.5.128"
- "peer1.org3.example.com:192.168.5.128"
- "peer0.org4.example.com:192.168.5.128"
- "peer1.org4.example.com:192.168.5.128"
- "ca.org0.example.com:192.168.5.128"
- "ca.org1.example.com:192.168.5.128"
- "ca.org2.example.com:192.168.5.128"
- "ca.org3.example.com:192.168.5.128"
- "ca.org4.example.com:192.168.5.128"
environment:
- FABRIC_LOGGING_SPEC=INFO
- FABRIC_LOGGING_FORMAT="%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}"
- CORE_PEER_ADDRESSAUTODETECT=false
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host # uncomment this to use specific network
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the org leader, default to false
- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443 # operation RESTful API
- CORE_METRICS_PROVIDER=prometheus # prometheus will pull metrics from fabric via /metrics RESTful API
- CORE_PEER_PROFILE_ENABLED=false
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
- CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:2.4.1
- CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:2.4.1
- CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:2.4.1
- CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.4.1
- CORE_PEER_ID=peer1.org4.example.com
- CORE_PEER_ADDRESS=peer1.org4.example.com:16051
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_CHAINCODEADDRESS=peer1.org4.example.com:16052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org4.example.com:16051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org4.example.com:16051
- CORE_PEER_LOCALMSPID=Org4MSP
- FABRIC_LOGGING_SPEC=DEBUG # info:core.chaincode=debug
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=peer1.org4.couchdb:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./crypto-config/peerOrganizations/org4.example.com/peers/peer1.org4.example.com/msp:/etc/hyperledger/fabric/msp
- ./crypto-config/peerOrganizations/org4.example.com/peers/peer1.org4.example.com/tls:/etc/hyperledger/fabric/tls
expose:
- "16051" # gRPC
- "16052" # chaincode
- "9452" # Operation REST
#command: bash -c 'bash /tmp/peer_build.sh; peer node start'
command: peer node start
depends_on:
- peer1.org4.couchdb
peer0.org4.couchdb:
image: couchdb:3.1.1
container_name: peer0.org4.couchdb
ports:
- 13984:5984
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=adminpw
peer1.org4.couchdb:
image: couchdb:3.1.1
container_name: peer1.org4.couchdb
ports:
- 14984:5984
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=adminpw
ca.org4.example.com:
image: hyperledger/fabric-ca:1.5.5
restart: always
container_name: ca.org4.example.com
hostname: ca.org4.example.com
ports:
- "11054:7054"
extra_hosts:
- "orderer0.example.com:192.168.5.128"
- "orderer1.example.com:192.168.5.128"
- "orderer2.example.com:192.168.5.128"
- "peer0.org0.example.com:192.168.5.128"
- "peer0.org1.example.com:192.168.5.128"
- "peer0.org2.example.com:192.168.5.128"
- "peer0.org3.example.com:192.168.5.128"
- "peer0.org4.example.com:192.168.5.128"
- "ca.org0.example.com:192.168.5.128"
- "ca.org1.example.com:192.168.5.128"
- "ca.org2.example.com:192.168.5.128"
- "ca.org3.example.com:192.168.5.128"
- "ca.org4.example.com:192.168.5.128"
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org4
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/ca.org4.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/priv_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server/ca.org4.example.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server/priv_sk
#command: fabric-ca-server start --ca.certfile ./crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem --ca.keyfile ./crypto-config/peerOrganizations/org1.example.com/ca/priv_sk -b admin:adminpw -d
command: fabric-ca-server start -b admin:adminpw -d
volumes:
- ./crypto-config/peerOrganizations/org4.example.com/ca/:/etc/hyperledger/fabric-ca-server
expose:
- "11054"