From a3d1cd01c7f1dbed8040551acad2fc86749b20ff Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Thu, 21 Oct 2021 16:50:15 +0100 Subject: [PATCH] Possible update to nano-bash network for external builders Signed-off-by: Matthew B White --- test-network-nano-bash/peer1.sh | 7 +++++++ test-network-nano-bash/peer2.sh | 7 ++++++- test-network-nano-bash/peer3.sh | 9 +++++++++ test-network-nano-bash/peer4.sh | 9 +++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/test-network-nano-bash/peer1.sh b/test-network-nano-bash/peer1.sh index 89d5d8da..9a76537c 100755 --- a/test-network-nano-bash/peer1.sh +++ b/test-network-nano-bash/peer1.sh @@ -11,6 +11,13 @@ fi export PATH="${PWD}"/../../fabric/build/bin:"${PWD}"/../bin:"$PATH" export FABRIC_CFG_PATH="${PWD}"/../config +# if the fabric build directory exists with external builders in it.. use that +if [ -d ${PWD}/../../fabric/build/bin/ext_ccs_builder/ ]; then + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../../fabric/build/bin/ext_ccs_builder/}]" +else + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../bin/ext_ccs_builder/}]" +fi + export FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info export CORE_PEER_TLS_ENABLED=true export CORE_PEER_TLS_CERT_FILE="${PWD}"/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt diff --git a/test-network-nano-bash/peer2.sh b/test-network-nano-bash/peer2.sh index 163df06e..6f110719 100755 --- a/test-network-nano-bash/peer2.sh +++ b/test-network-nano-bash/peer2.sh @@ -10,7 +10,12 @@ fi # look for binaries in local dev environment /build/bin directory and then in local samples /bin directory export PATH="${PWD}"/../../fabric/build/bin:"${PWD}"/../bin:"$PATH" export FABRIC_CFG_PATH="${PWD}"/../config - +# if the fabric build directory exists with external builders in it.. use that +if [ -d ${PWD}/../../fabric/build/bin/ext_ccs_builder/ ]; then + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../../fabric/build/bin/ext_ccs_builder/}]" +else + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../bin/ext_ccs_builder/}]" +fi export FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info export CORE_PEER_TLS_ENABLED=true export CORE_PEER_TLS_CERT_FILE="${PWD}"/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt diff --git a/test-network-nano-bash/peer3.sh b/test-network-nano-bash/peer3.sh index 1054118f..abb33714 100755 --- a/test-network-nano-bash/peer3.sh +++ b/test-network-nano-bash/peer3.sh @@ -11,6 +11,15 @@ fi export PATH="${PWD}"/../../fabric/build/bin:"${PWD}"/../bin:"$PATH" export FABRIC_CFG_PATH="${PWD}"/../config + +# if the fabric build directory exists with external builders in it.. use that +if [ -d ${PWD}/../../fabric/build/bin/ext_ccs_builder/ ]; then + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../../fabric/build/bin/ext_ccs_builder/}]" +else + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../bin/ext_ccs_builder/}]" +fi + + export FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info export CORE_PEER_TLS_ENABLED=true export CORE_PEER_TLS_CERT_FILE="${PWD}"/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt diff --git a/test-network-nano-bash/peer4.sh b/test-network-nano-bash/peer4.sh index a62afe58..6bec80a9 100755 --- a/test-network-nano-bash/peer4.sh +++ b/test-network-nano-bash/peer4.sh @@ -11,6 +11,15 @@ fi export PATH="${PWD}"/../../fabric/build/bin:"${PWD}"/../bin:"$PATH" export FABRIC_CFG_PATH="${PWD}"/../config + +# if the fabric build directory exists with external builders in it.. use that +if [ -d ${PWD}/../../fabric/build/bin/ext_ccs_builder/ ]; then + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../../fabric/build/bin/ext_ccs_builder/}]" +else + export CORE_CHAINCODE_EXTERNALBUILDERS: "[{name: ext_ccs_builder, path: ${PWD}/../bin/ext_ccs_builder/}]" +fi + + export FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info export CORE_PEER_TLS_ENABLED=true export CORE_PEER_TLS_CERT_FILE="${PWD}"/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.crt