Merge "[FAB-14268] Make BYFN/EYFN ports match external ports" into release-1.4

This commit is contained in:
Gari Singh 2019-02-23 20:52:34 +00:00 committed by Gerrit Code Review
commit 026aa9ec01
6 changed files with 50 additions and 34 deletions

View file

@ -4,3 +4,5 @@
/docker-compose-e2e.yaml /docker-compose-e2e.yaml
/ledgers /ledgers
/ledgers-backup /ledgers-backup
/channel-artifacts/*.json
/org3-artifacts/crypto-config/*

View file

@ -42,7 +42,10 @@ services:
environment: environment:
- CORE_PEER_ID=peer0.org1.example.com - CORE_PEER_ID=peer0.org1.example.com
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 - CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.org1.example.com:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP - CORE_PEER_LOCALMSPID=Org1MSP
volumes: volumes:
@ -52,7 +55,6 @@ services:
- peer0.org1.example.com:/var/hyperledger/production - peer0.org1.example.com:/var/hyperledger/production
ports: ports:
- 7051:7051 - 7051:7051
- 7053:7053
peer1.org1.example.com: peer1.org1.example.com:
container_name: peer1.org1.example.com container_name: peer1.org1.example.com
@ -61,8 +63,11 @@ services:
service: peer-base service: peer-base
environment: environment:
- CORE_PEER_ID=peer1.org1.example.com - CORE_PEER_ID=peer1.org1.example.com
- CORE_PEER_ADDRESS=peer1.org1.example.com:7051 - CORE_PEER_ADDRESS=peer1.org1.example.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051 - CORE_PEER_LISTENADDRESS=0.0.0.0:8051
- CORE_PEER_CHAINCODEADDRESS=peer1.org1.example.com:8052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP - CORE_PEER_LOCALMSPID=Org1MSP
volumes: volumes:
@ -72,8 +77,7 @@ services:
- peer1.org1.example.com:/var/hyperledger/production - peer1.org1.example.com:/var/hyperledger/production
ports: ports:
- 8051:7051 - 8051:8051
- 8053:7053
peer0.org2.example.com: peer0.org2.example.com:
container_name: peer0.org2.example.com container_name: peer0.org2.example.com
@ -82,9 +86,12 @@ services:
service: peer-base service: peer-base
environment: environment:
- CORE_PEER_ID=peer0.org2.example.com - CORE_PEER_ID=peer0.org2.example.com
- CORE_PEER_ADDRESS=peer0.org2.example.com:7051 - CORE_PEER_ADDRESS=peer0.org2.example.com:9051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051 - CORE_PEER_LISTENADDRESS=0.0.0.0:9051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:7051 - CORE_PEER_CHAINCODEADDRESS=peer0.org2.example.com:9052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:9051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:10051
- CORE_PEER_LOCALMSPID=Org2MSP - CORE_PEER_LOCALMSPID=Org2MSP
volumes: volumes:
- /var/run/:/host/var/run/ - /var/run/:/host/var/run/
@ -92,8 +99,7 @@ services:
- ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls
- peer0.org2.example.com:/var/hyperledger/production - peer0.org2.example.com:/var/hyperledger/production
ports: ports:
- 9051:7051 - 9051:9051
- 9053:7053
peer1.org2.example.com: peer1.org2.example.com:
container_name: peer1.org2.example.com container_name: peer1.org2.example.com
@ -102,9 +108,12 @@ services:
service: peer-base service: peer-base
environment: environment:
- CORE_PEER_ID=peer1.org2.example.com - CORE_PEER_ID=peer1.org2.example.com
- CORE_PEER_ADDRESS=peer1.org2.example.com:7051 - CORE_PEER_ADDRESS=peer1.org2.example.com:10051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7051 - CORE_PEER_LISTENADDRESS=0.0.0.0:10051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051 - CORE_PEER_CHAINCODEADDRESS=peer1.org2.example.com:10052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:10051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:9051
- CORE_PEER_LOCALMSPID=Org2MSP - CORE_PEER_LOCALMSPID=Org2MSP
volumes: volumes:
- /var/run/:/host/var/run/ - /var/run/:/host/var/run/
@ -112,5 +121,4 @@ services:
- ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls
- peer1.org2.example.com:/var/hyperledger/production - peer1.org2.example.com:/var/hyperledger/production
ports: ports:
- 10051:7051 - 10051:10051
- 10053:7053

View file

@ -102,7 +102,7 @@ Organizations:
# for cross org gossip communication. Note, this value is only # for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context # encoded in the genesis block in the Application section context
- Host: peer0.org2.example.com - Host: peer0.org2.example.com
Port: 7051 Port: 9051
################################################################################ ################################################################################
# #

View file

@ -21,8 +21,12 @@ services:
service: peer-base service: peer-base
environment: environment:
- CORE_PEER_ID=peer0.org3.example.com - CORE_PEER_ID=peer0.org3.example.com
- CORE_PEER_ADDRESS=peer0.org3.example.com:7051 - CORE_PEER_ADDRESS=peer0.org3.example.com:11051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:7051 - CORE_PEER_LISTENADDRESS=0.0.0.0:11051
- CORE_PEER_CHAINCODEADDRESS=peer0.org3.example.com:11052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org3.example.com:12051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:11051
- CORE_PEER_LOCALMSPID=Org3MSP - CORE_PEER_LOCALMSPID=Org3MSP
volumes: volumes:
- /var/run/:/host/var/run/ - /var/run/:/host/var/run/
@ -30,8 +34,7 @@ services:
- ./org3-artifacts/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls - ./org3-artifacts/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls
- peer0.org3.example.com:/var/hyperledger/production - peer0.org3.example.com:/var/hyperledger/production
ports: ports:
- 11051:7051 - 11051:11051
- 11053:7053
networks: networks:
- byfn - byfn
@ -42,9 +45,12 @@ services:
service: peer-base service: peer-base
environment: environment:
- CORE_PEER_ID=peer1.org3.example.com - CORE_PEER_ID=peer1.org3.example.com
- CORE_PEER_ADDRESS=peer1.org3.example.com:7051 - CORE_PEER_ADDRESS=peer1.org3.example.com:12051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org3.example.com:7051 - CORE_PEER_LISTENADDRESS=0.0.0.0:12051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:7051 - CORE_PEER_CHAINCODEADDRESS=peer1.org3.example.com:12052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:12052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:11051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org3.example.com:12051
- CORE_PEER_LOCALMSPID=Org3MSP - CORE_PEER_LOCALMSPID=Org3MSP
volumes: volumes:
- /var/run/:/host/var/run/ - /var/run/:/host/var/run/
@ -52,8 +58,7 @@ services:
- ./org3-artifacts/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls:/etc/hyperledger/fabric/tls - ./org3-artifacts/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls:/etc/hyperledger/fabric/tls
- peer1.org3.example.com:/var/hyperledger/production - peer1.org3.example.com:/var/hyperledger/production
ports: ports:
- 12051:7051 - 12051:12051
- 12053:7053
networks: networks:
- byfn - byfn
@ -69,7 +74,7 @@ services:
- FABRIC_LOGGING_SPEC=INFO - FABRIC_LOGGING_SPEC=INFO
#- FABRIC_LOGGING_SPEC=DEBUG #- FABRIC_LOGGING_SPEC=DEBUG
- CORE_PEER_ID=Org3cli - CORE_PEER_ID=Org3cli
- CORE_PEER_ADDRESS=peer0.org3.example.com:7051 - CORE_PEER_ADDRESS=peer0.org3.example.com:11051
- CORE_PEER_LOCALMSPID=Org3MSP - CORE_PEER_LOCALMSPID=Org3MSP
- CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/server.crt - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/server.crt

View file

@ -28,4 +28,4 @@ Organizations:
# for cross org gossip communication. Note, this value is only # for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context # encoded in the genesis block in the Application section context
- Host: peer0.org3.example.com - Host: peer0.org3.example.com
Port: 7051 Port: 11051

View file

@ -38,16 +38,16 @@ setGlobals() {
if [ $PEER -eq 0 ]; then if [ $PEER -eq 0 ]; then
CORE_PEER_ADDRESS=peer0.org1.example.com:7051 CORE_PEER_ADDRESS=peer0.org1.example.com:7051
else else
CORE_PEER_ADDRESS=peer1.org1.example.com:7051 CORE_PEER_ADDRESS=peer1.org1.example.com:8051
fi fi
elif [ $ORG -eq 2 ]; then elif [ $ORG -eq 2 ]; then
CORE_PEER_LOCALMSPID="Org2MSP" CORE_PEER_LOCALMSPID="Org2MSP"
CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG2_CA CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG2_CA
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
if [ $PEER -eq 0 ]; then if [ $PEER -eq 0 ]; then
CORE_PEER_ADDRESS=peer0.org2.example.com:7051 CORE_PEER_ADDRESS=peer0.org2.example.com:9051
else else
CORE_PEER_ADDRESS=peer1.org2.example.com:7051 CORE_PEER_ADDRESS=peer1.org2.example.com:10051
fi fi
elif [ $ORG -eq 3 ]; then elif [ $ORG -eq 3 ]; then
@ -55,9 +55,9 @@ setGlobals() {
CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG3_CA CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG3_CA
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp
if [ $PEER -eq 0 ]; then if [ $PEER -eq 0 ]; then
CORE_PEER_ADDRESS=peer0.org3.example.com:7051 CORE_PEER_ADDRESS=peer0.org3.example.com:11051
else else
CORE_PEER_ADDRESS=peer1.org3.example.com:7051 CORE_PEER_ADDRESS=peer1.org3.example.com:12051
fi fi
else else
echo "================== ERROR !!! ORG Unknown ==================" echo "================== ERROR !!! ORG Unknown =================="
@ -277,9 +277,10 @@ parsePeerConnectionParameters() {
PEER_CONN_PARMS="" PEER_CONN_PARMS=""
PEERS="" PEERS=""
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
setGlobals $1 $2
PEER="peer$1.org$2" PEER="peer$1.org$2"
PEERS="$PEERS $PEER" PEERS="$PEERS $PEER"
PEER_CONN_PARMS="$PEER_CONN_PARMS --peerAddresses $PEER.example.com:7051" PEER_CONN_PARMS="$PEER_CONN_PARMS --peerAddresses $CORE_PEER_ADDRESS"
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "true" ]; then if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "true" ]; then
TLSINFO=$(eval echo "--tlsRootCertFiles \$PEER$1_ORG$2_CA") TLSINFO=$(eval echo "--tlsRootCertFiles \$PEER$1_ORG$2_CA")
PEER_CONN_PARMS="$PEER_CONN_PARMS $TLSINFO" PEER_CONN_PARMS="$PEER_CONN_PARMS $TLSINFO"