From fe6b6bedc4ee46b177422879557ce40a9774c707 Mon Sep 17 00:00:00 2001 From: qiang0723 Date: Tue, 13 Jun 2017 17:40:28 +0800 Subject: [PATCH] Enable TLS --- hyperledger/1.0/docker-compose-2orgs-4peers-event.yaml | 4 ++-- hyperledger/1.0/docker-compose-2orgs-4peers.yaml | 2 +- hyperledger/1.0/e2e_cli/base/docker-compose-base.yaml | 2 +- hyperledger/1.0/e2e_cli/docker-compose-cli.yaml | 2 +- hyperledger/1.0/e2e_cli/scripts/script.sh | 2 +- hyperledger/1.0/orderer-base.yaml | 2 +- hyperledger/1.0/peer-base.yaml | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hyperledger/1.0/docker-compose-2orgs-4peers-event.yaml b/hyperledger/1.0/docker-compose-2orgs-4peers-event.yaml index ad2fc516..b2ca4676 100644 --- a/hyperledger/1.0/docker-compose-2orgs-4peers-event.yaml +++ b/hyperledger/1.0/docker-compose-2orgs-4peers-event.yaml @@ -52,7 +52,7 @@ services: - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1 - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_TLS_ENABLED=false # to enable TLS, change to true + - CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt @@ -90,7 +90,7 @@ services: - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1 - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_TLS_ENABLED=false # to enable TLS, change to true + - CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt diff --git a/hyperledger/1.0/docker-compose-2orgs-4peers.yaml b/hyperledger/1.0/docker-compose-2orgs-4peers.yaml index 2c9d417d..142f8312 100644 --- a/hyperledger/1.0/docker-compose-2orgs-4peers.yaml +++ b/hyperledger/1.0/docker-compose-2orgs-4peers.yaml @@ -52,7 +52,7 @@ services: - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1 - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_TLS_ENABLED=false # to enable TLS, change to true + - CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt diff --git a/hyperledger/1.0/e2e_cli/base/docker-compose-base.yaml b/hyperledger/1.0/e2e_cli/base/docker-compose-base.yaml index 9aa918e2..f2957e1f 100644 --- a/hyperledger/1.0/e2e_cli/base/docker-compose-base.yaml +++ b/hyperledger/1.0/e2e_cli/base/docker-compose-base.yaml @@ -25,7 +25,7 @@ services: working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: orderer volumes: - - ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block + - ../channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls ports: diff --git a/hyperledger/1.0/e2e_cli/docker-compose-cli.yaml b/hyperledger/1.0/e2e_cli/docker-compose-cli.yaml index e6290cf1..311ceada 100644 --- a/hyperledger/1.0/e2e_cli/docker-compose-cli.yaml +++ b/hyperledger/1.0/e2e_cli/docker-compose-cli.yaml @@ -57,7 +57,7 @@ services: command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT' volumes: - /var/run/:/host/var/run/ - - ../chaincode/go/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go + #- ../chaincode/go/:/opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/ - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts diff --git a/hyperledger/1.0/e2e_cli/scripts/script.sh b/hyperledger/1.0/e2e_cli/scripts/script.sh index d5d71b47..2a954b95 100644 --- a/hyperledger/1.0/e2e_cli/scripts/script.sh +++ b/hyperledger/1.0/e2e_cli/scripts/script.sh @@ -9,7 +9,7 @@ echo "|____/ |_| /_/ \_\ |_| \_\ |_| |_____| |_____| |_____|" echo CHANNEL_NAME="$1" -: ${CHANNEL_NAME:="mychannel"} +: ${CHANNEL_NAME:="businesschannel"} : ${TIMEOUT:="60"} COUNTER=1 MAX_RETRY=5 diff --git a/hyperledger/1.0/orderer-base.yaml b/hyperledger/1.0/orderer-base.yaml index d1cb138d..74da487c 100644 --- a/hyperledger/1.0/orderer-base.yaml +++ b/hyperledger/1.0/orderer-base.yaml @@ -23,7 +23,7 @@ services: - ORDERER_GENERAL_LISTENPORT=7050 #- ORDERER_RAMLEDGER_HISTORY_SIZE=100 #only useful when use ram ledger # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=false + - ORDERER_GENERAL_TLS_ENABLED=true - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] diff --git a/hyperledger/1.0/peer-base.yaml b/hyperledger/1.0/peer-base.yaml index f42a12c0..bfe50df4 100644 --- a/hyperledger/1.0/peer-base.yaml +++ b/hyperledger/1.0/peer-base.yaml @@ -11,16 +11,16 @@ services: image: hyperledger/fabric-peer environment: #- CORE_PEER_ID=peer0 - - CORE_PEER_ADDRESSAUTODETECT=true + - CORE_PEER_ADDRESSAUTODETECT=false - CORE_LOGGING_LEVEL=DEBUG - #- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=hyperledger_fabric # uncomment this to use specific network + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=10_default # uncomment this to use specific network #- CORE_PEER_NETWORKID=dev - CORE_PEER_ENDORSER_ENABLED=true - CORE_PEER_COMMITTER_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false # this node is the group leader, default to false - CORE_PEER_PROFILE_ENABLED=false - - CORE_PEER_TLS_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