From 529b83bc95edc3a35c5aa45219361a8800aa82a8 Mon Sep 17 00:00:00 2001 From: Simon Stone Date: Mon, 25 Feb 2019 11:34:58 +0000 Subject: [PATCH] [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 --- first-network/connection-org1.json | 43 ++++++++++++++++++++++++++++++ first-network/connection-org1.yaml | 28 +++++++++++++++++++ first-network/connection-org2.json | 43 ++++++++++++++++++++++++++++++ first-network/connection-org2.yaml | 28 +++++++++++++++++++ first-network/connection-org3.json | 43 ++++++++++++++++++++++++++++++ first-network/connection-org3.yaml | 28 +++++++++++++++++++ 6 files changed, 213 insertions(+) create mode 100644 first-network/connection-org1.json create mode 100644 first-network/connection-org1.yaml create mode 100644 first-network/connection-org2.json create mode 100644 first-network/connection-org2.yaml create mode 100644 first-network/connection-org3.json create mode 100644 first-network/connection-org3.yaml diff --git a/first-network/connection-org1.json b/first-network/connection-org1.json new file mode 100644 index 0000000000..68190f94ac --- /dev/null +++ b/first-network/connection-org1.json @@ -0,0 +1,43 @@ +{ + "name": "first-network-org1", + "version": "1.0.0", + "client": { + "organization": "Org1", + "connection": { + "timeout": { + "peer": { + "endorser": "300" + } + } + } + }, + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com" + ] + } + }, + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7051", + "tlsCACerts": { + "path": "crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem" + }, + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" + } + }, + "peer1.org1.example.com": { + "url": "grpcs://localhost:8051", + "tlsCACerts": { + "path": "crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem" + }, + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" + } + } + } +} diff --git a/first-network/connection-org1.yaml b/first-network/connection-org1.yaml new file mode 100644 index 0000000000..c58f9d8333 --- /dev/null +++ b/first-network/connection-org1.yaml @@ -0,0 +1,28 @@ +--- +name: first-network-org1 +version: 1.0.0 +client: + organization: Org1 + connection: + timeout: + peer: + endorser: '300' +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com +peers: + peer0.org1.example.com: + url: grpcs://localhost:7051 + tlsCACerts: + path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + peer1.org1.example.com: + url: grpcs://localhost:8051 + tlsCACerts: + path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem + grpcOptions: + ssl-target-name-override: peer1.org1.example.com diff --git a/first-network/connection-org2.json b/first-network/connection-org2.json new file mode 100644 index 0000000000..35def918a4 --- /dev/null +++ b/first-network/connection-org2.json @@ -0,0 +1,43 @@ +{ + "name": "first-network-org2", + "version": "1.0.0", + "client": { + "organization": "Org2", + "connection": { + "timeout": { + "peer": { + "endorser": "300" + } + } + } + }, + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org2.example.com", + "peer1.org2.example.com" + ] + } + }, + "peers": { + "peer0.org2.example.com": { + "url": "grpcs://localhost:9051", + "tlsCACerts": { + "path": "crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem" + }, + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" + } + }, + "peer1.org2.example.com": { + "url": "grpcs://localhost:10051", + "tlsCACerts": { + "path": "crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem" + }, + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" + } + } + } +} diff --git a/first-network/connection-org2.yaml b/first-network/connection-org2.yaml new file mode 100644 index 0000000000..076f37dfb1 --- /dev/null +++ b/first-network/connection-org2.yaml @@ -0,0 +1,28 @@ +--- +name: first-network-org2 +version: 1.0.0 +client: + organization: Org2 + connection: + timeout: + peer: + endorser: '300' +organizations: + Org2: + mspid: Org2MSP + peers: + - peer0.org2.example.com + - peer1.org2.example.com +peers: + peer0.org2.example.com: + url: grpcs://localhost:9051 + tlsCACerts: + path: crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem + grpcOptions: + ssl-target-name-override: peer0.org2.example.com + peer1.org2.example.com: + url: grpcs://localhost:10051 + tlsCACerts: + path: crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem + grpcOptions: + ssl-target-name-override: peer1.org2.example.com diff --git a/first-network/connection-org3.json b/first-network/connection-org3.json new file mode 100644 index 0000000000..0fac14f1ad --- /dev/null +++ b/first-network/connection-org3.json @@ -0,0 +1,43 @@ +{ + "name": "first-network-org3", + "version": "1.0.0", + "client": { + "organization": "Org3", + "connection": { + "timeout": { + "peer": { + "endorser": "300" + } + } + } + }, + "organizations": { + "Org3": { + "mspid": "Org3MSP", + "peers": [ + "peer0.org3.example.com", + "peer1.org3.example.com" + ] + } + }, + "peers": { + "peer0.org3.example.com": { + "url": "grpcs://localhost:11051", + "tlsCACerts": { + "path": "org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem" + }, + "grpcOptions": { + "ssl-target-name-override": "peer0.org3.example.com" + } + }, + "peer1.org3.example.com": { + "url": "grpcs://localhost:12051", + "tlsCACerts": { + "path": "org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem" + }, + "grpcOptions": { + "ssl-target-name-override": "peer1.org3.example.com" + } + } + } +} diff --git a/first-network/connection-org3.yaml b/first-network/connection-org3.yaml new file mode 100644 index 0000000000..ebdc983d31 --- /dev/null +++ b/first-network/connection-org3.yaml @@ -0,0 +1,28 @@ +--- +name: first-network-org3 +version: 1.0.0 +client: + organization: Org3 + connection: + timeout: + peer: + endorser: '300' +organizations: + Org3: + mspid: Org3MSP + peers: + - peer0.org3.example.com + - peer1.org3.example.com +peers: + peer0.org3.example.com: + url: grpcs://localhost:11051 + tlsCACerts: + path: org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem + grpcOptions: + ssl-target-name-override: peer0.org3.example.com + peer1.org3.example.com: + url: grpcs://localhost:12051 + tlsCACerts: + path: org3-artifacts/crypto-config/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem + grpcOptions: + ssl-target-name-override: peer1.org3.example.com