Skip to content

Commit 529b83b

Browse files
author
Simon Stone
committedApr 24, 2019
[FAB-14330] Add connection profiles for BYFN and EYFN
Add connection profiles as part of the BYFN and EYFN samples. The connection profiles can be used by client applications using the Fabric SDKs to connect to those networks. Each organisation needs its own connection profile that contains the set of peers that organisation should use to connect to the network. Orderers and channels are not needed, as they can be determined by using service discovery. Connection profiles can be specified in either JSON or YAML, so provide both. Change-Id: Ie8e3d2aef6475b324e5be8ebdada4c594c2235ae Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
1 parent dd08f70 commit 529b83b

6 files changed

+213
-0
lines changed
 

‎first-network/connection-org1.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "first-network-org1",
3+
"version": "1.0.0",
4+
"client": {
5+
"organization": "Org1",
6+
"connection": {
7+
"timeout": {
8+
"peer": {
9+
"endorser": "300"
10+
}
11+
}
12+
}
13+
},
14+
"organizations": {
15+
"Org1": {
16+
"mspid": "Org1MSP",
17+
"peers": [
18+
"peer0.org1.example.com",
19+
"peer1.org1.example.com"
20+
]
21+
}
22+
},
23+
"peers": {
24+
"peer0.org1.example.com": {
25+
"url": "grpcs://localhost:7051",
26+
"tlsCACerts": {
27+
"path": "crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"
28+
},
29+
"grpcOptions": {
30+
"ssl-target-name-override": "peer0.org1.example.com"
31+
}
32+
},
33+
"peer1.org1.example.com": {
34+
"url": "grpcs://localhost:8051",
35+
"tlsCACerts": {
36+
"path": "crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"
37+
},
38+
"grpcOptions": {
39+
"ssl-target-name-override": "peer1.org1.example.com"
40+
}
41+
}
42+
}
43+
}

‎first-network/connection-org1.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: first-network-org1
3+
version: 1.0.0
4+
client:
5+
organization: Org1
6+
connection:
7+
timeout:
8+
peer:
9+
endorser: '300'
10+
organizations:
11+
Org1:
12+
mspid: Org1MSP
13+
peers:
14+
- peer0.org1.example.com
15+
- peer1.org1.example.com
16+
peers:
17+
peer0.org1.example.com:
18+
url: grpcs://localhost:7051
19+
tlsCACerts:
20+
path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
21+
grpcOptions:
22+
ssl-target-name-override: peer0.org1.example.com
23+
peer1.org1.example.com:
24+
url: grpcs://localhost:8051
25+
tlsCACerts:
26+
path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
27+
grpcOptions:
28+
ssl-target-name-override: peer1.org1.example.com

‎first-network/connection-org2.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "first-network-org2",
3+
"version": "1.0.0",
4+
"client": {
5+
"organization": "Org2",
6+
"connection": {
7+
"timeout": {
8+
"peer": {
9+
"endorser": "300"
10+
}
11+
}
12+
}
13+
},
14+
"organizations": {
15+
"Org2": {
16+
"mspid": "Org2MSP",
17+
"peers": [
18+
"peer0.org2.example.com",
19+
"peer1.org2.example.com"
20+
]
21+
}
22+
},
23+
"peers": {
24+
"peer0.org2.example.com": {
25+
"url": "grpcs://localhost:9051",
26+
"tlsCACerts": {
27+
"path": "crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem"
28+
},
29+
"grpcOptions": {
30+
"ssl-target-name-override": "peer0.org2.example.com"
31+
}
32+
},
33+
"peer1.org2.example.com": {
34+
"url": "grpcs://localhost:10051",
35+
"tlsCACerts": {
36+
"path": "crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem"
37+
},
38+
"grpcOptions": {
39+
"ssl-target-name-override": "peer1.org2.example.com"
40+
}
41+
}
42+
}
43+
}

‎first-network/connection-org2.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: first-network-org2
3+
version: 1.0.0
4+
client:
5+
organization: Org2
6+
connection:
7+
timeout:
8+
peer:
9+
endorser: '300'
10+
organizations:
11+
Org2:
12+
mspid: Org2MSP
13+
peers:
14+
- peer0.org2.example.com
15+
- peer1.org2.example.com
16+
peers:
17+
peer0.org2.example.com:
18+
url: grpcs://localhost:9051
19+
tlsCACerts:
20+
path: crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem
21+
grpcOptions:
22+
ssl-target-name-override: peer0.org2.example.com
23+
peer1.org2.example.com:
24+
url: grpcs://localhost:10051
25+
tlsCACerts:
26+
path: crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem
27+
grpcOptions:
28+
ssl-target-name-override: peer1.org2.example.com

‎first-network/connection-org3.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "first-network-org3",
3+
"version": "1.0.0",
4+
"client": {
5+
"organization": "Org3",
6+
"connection": {
7+
"timeout": {
8+
"peer": {
9+
"endorser": "300"
10+
}
11+
}
12+
}
13+
},
14+
"organizations": {
15+
"Org3": {
16+
"mspid": "Org3MSP",
17+
"peers": [
18+
"peer0.org3.example.com",
19+
"peer1.org3.example.com"
20+
]
21+
}
22+
},
23+
"peers": {
24+
"peer0.org3.example.com": {
25+
"url": "grpcs://localhost:11051",
26+
"tlsCACerts": {
27+
"path": "org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem"
28+
},
29+
"grpcOptions": {
30+
"ssl-target-name-override": "peer0.org3.example.com"
31+
}
32+
},
33+
"peer1.org3.example.com": {
34+
"url": "grpcs://localhost:12051",
35+
"tlsCACerts": {
36+
"path": "org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem"
37+
},
38+
"grpcOptions": {
39+
"ssl-target-name-override": "peer1.org3.example.com"
40+
}
41+
}
42+
}
43+
}

‎first-network/connection-org3.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: first-network-org3
3+
version: 1.0.0
4+
client:
5+
organization: Org3
6+
connection:
7+
timeout:
8+
peer:
9+
endorser: '300'
10+
organizations:
11+
Org3:
12+
mspid: Org3MSP
13+
peers:
14+
- peer0.org3.example.com
15+
- peer1.org3.example.com
16+
peers:
17+
peer0.org3.example.com:
18+
url: grpcs://localhost:11051
19+
tlsCACerts:
20+
path: org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem
21+
grpcOptions:
22+
ssl-target-name-override: peer0.org3.example.com
23+
peer1.org3.example.com:
24+
url: grpcs://localhost:12051
25+
tlsCACerts:
26+
path: org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem
27+
grpcOptions:
28+
ssl-target-name-override: peer1.org3.example.com

0 commit comments

Comments
 (0)
Please sign in to comment.