From 3907507981ea50ae849ee6cc5d8557f461140042 Mon Sep 17 00:00:00 2001 From: Simon Stone Date: Mon, 12 Aug 2019 16:05:58 +0100 Subject: [PATCH] [FAB-16277] Update BYFN w/ Raft ports in Docker network Update the Raft ordering nodes to use the same ports inside the Docker network as they are mapped to outside of the Docker network (7050, 8050, 9050, 10050, 11050). This enables applications to work using service discovery, whether those applications are running inside or outside the Docker network. Signed-off-by: Simon Stone Change-Id: I40b24653d76b6e60c73b754cd7e1544c333e0021 --- first-network/configtx.yaml | 16 +++--- first-network/docker-compose-etcdraft2.yaml | 56 ++++++++++++--------- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/first-network/configtx.yaml b/first-network/configtx.yaml index 0363a661..5956612b 100644 --- a/first-network/configtx.yaml +++ b/first-network/configtx.yaml @@ -347,27 +347,27 @@ Profiles: ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt - Host: orderer2.example.com - Port: 7050 + Port: 8050 ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt - Host: orderer3.example.com - Port: 7050 + Port: 9050 ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt - Host: orderer4.example.com - Port: 7050 + Port: 10050 ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt - Host: orderer5.example.com - Port: 7050 + Port: 11050 ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/server.crt ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/server.crt Addresses: - orderer.example.com:7050 - - orderer2.example.com:7050 - - orderer3.example.com:7050 - - orderer4.example.com:7050 - - orderer5.example.com:7050 + - orderer2.example.com:8050 + - orderer3.example.com:9050 + - orderer4.example.com:10050 + - orderer5.example.com:11050 Organizations: - *OrdererOrg diff --git a/first-network/docker-compose-etcdraft2.yaml b/first-network/docker-compose-etcdraft2.yaml index 1e525ee2..042d884a 100644 --- a/first-network/docker-compose-etcdraft2.yaml +++ b/first-network/docker-compose-etcdraft2.yaml @@ -20,58 +20,66 @@ services: extends: file: base/peer-base.yaml service: orderer-base + environment: + - ORDERER_GENERAL_LISTENPORT=8050 container_name: orderer2.example.com networks: - - byfn + - byfn volumes: - - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/msp:/var/hyperledger/orderer/msp - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/:/var/hyperledger/orderer/tls - - orderer2.example.com:/var/hyperledger/production/orderer + - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/msp:/var/hyperledger/orderer/msp + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/:/var/hyperledger/orderer/tls + - orderer2.example.com:/var/hyperledger/production/orderer ports: - - 8050:7050 + - 8050:8050 orderer3.example.com: extends: file: base/peer-base.yaml service: orderer-base + environment: + - ORDERER_GENERAL_LISTENPORT=9050 container_name: orderer3.example.com networks: - - byfn + - byfn volumes: - - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/msp:/var/hyperledger/orderer/msp - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/:/var/hyperledger/orderer/tls - - orderer3.example.com:/var/hyperledger/production/orderer + - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/msp:/var/hyperledger/orderer/msp + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/:/var/hyperledger/orderer/tls + - orderer3.example.com:/var/hyperledger/production/orderer ports: - - 9050:7050 + - 9050:9050 orderer4.example.com: extends: file: base/peer-base.yaml service: orderer-base + environment: + - ORDERER_GENERAL_LISTENPORT=10050 container_name: orderer4.example.com networks: - - byfn + - byfn volumes: - - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/msp:/var/hyperledger/orderer/msp - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/:/var/hyperledger/orderer/tls - - orderer4.example.com:/var/hyperledger/production/orderer + - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/msp:/var/hyperledger/orderer/msp + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/:/var/hyperledger/orderer/tls + - orderer4.example.com:/var/hyperledger/production/orderer ports: - - 10050:7050 + - 10050:10050 orderer5.example.com: extends: file: base/peer-base.yaml service: orderer-base + environment: + - ORDERER_GENERAL_LISTENPORT=11050 container_name: orderer5.example.com networks: - - byfn + - byfn volumes: - - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/msp:/var/hyperledger/orderer/msp - - ./crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/:/var/hyperledger/orderer/tls - - orderer5.example.com:/var/hyperledger/production/orderer + - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/msp:/var/hyperledger/orderer/msp + - ./crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/:/var/hyperledger/orderer/tls + - orderer5.example.com:/var/hyperledger/production/orderer ports: - - 11050:7050 + - 11050:11050