From 7aa75a4770febe46e1a8272df432d53a757088c8 Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Thu, 21 Mar 2019 14:59:52 +0800 Subject: [PATCH] Remove unused containers --- .../kafka/channel-artifacts/Org1MSPanchors.tx | Bin 324 -> 314 bytes .../kafka/channel-artifacts/Org2MSPanchors.tx | Bin 324 -> 314 bytes .../kafka/channel-artifacts/Org3MSP.json | 29 ++++++++++++++++++ .../channel-artifacts/orderer.genesis.block | Bin 13066 -> 13066 bytes .../latest/scripts/gen_channelArtifacts.sh | 7 ++++- .../latest/scripts/gen_config_channel.sh | 8 ++--- .../latest/scripts/test_channel_create.sh | 5 +++ hyperledger_fabric/v1.4.0/base-solo.yaml | 24 --------------- hyperledger_fabric/v1.4.0/base.yaml | 22 ------------- 9 files changed, 44 insertions(+), 51 deletions(-) diff --git a/hyperledger_fabric/latest/kafka/channel-artifacts/Org1MSPanchors.tx b/hyperledger_fabric/latest/kafka/channel-artifacts/Org1MSPanchors.tx index 17daf94f2544224cc0a6e2b2aa7ee11e2ae3f901..95c22b4b0f29013aee0c07f5082ad307c9b1d258 100644 GIT binary patch delta 121 zcmX@Yw2MifYdaH{1eX{GlN1}rmU=CESEF~lN1}ru_bpOvnuf?l@@2_r4|<_XC&t3rRE6DXX2W}#Dy+A nQD29TpNrcyFD1XII5jsluVi9`#>9!)n1UQyY>p|pnR&$k1!yGz diff --git a/hyperledger_fabric/latest/kafka/channel-artifacts/Org2MSPanchors.tx b/hyperledger_fabric/latest/kafka/channel-artifacts/Org2MSPanchors.tx index c7e53d3f7cd12005d9c9f5053f413709059aaa3d..330110a5f3425b2bc75df0f09db819aadbace2e9 100644 GIT binary patch delta 67 zcmX@Yw2MifYdaH{1eX{GlN1}rle5R3uqtsSXC&t3rREr#SPIQz;+oFHg(Nc3^6bP^ OGY%~_$CTX6ykY=}mU=CESEF~lN1}r@g;X3vnuf?l@@2_r4|<_XC&t3rRE6DXX2W}#Dy+A eQU5F#Hy3+&QD#YMQSro|IviSTjw!jBdBp(RD;-k+ diff --git a/hyperledger_fabric/latest/kafka/channel-artifacts/Org3MSP.json b/hyperledger_fabric/latest/kafka/channel-artifacts/Org3MSP.json index cacd40fb..17a053bb 100644 --- a/hyperledger_fabric/latest/kafka/channel-artifacts/Org3MSP.json +++ b/hyperledger_fabric/latest/kafka/channel-artifacts/Org3MSP.json @@ -31,6 +31,35 @@ }, "version": "0" }, + "Endorsement": { + "mod_policy": "Admins", + "policy": { + "type": 1, + "value": { + "identities": [ + { + "principal": { + "msp_identifier": "Org3MSP", + "role": "MEMBER" + }, + "principal_classification": "ROLE" + } + ], + "rule": { + "n_out_of": { + "n": 1, + "rules": [ + { + "signed_by": 0 + } + ] + } + }, + "version": 0 + } + }, + "version": "0" + }, "Readers": { "mod_policy": "Admins", "policy": { diff --git a/hyperledger_fabric/latest/kafka/channel-artifacts/orderer.genesis.block b/hyperledger_fabric/latest/kafka/channel-artifacts/orderer.genesis.block index b36ae41fa3e36c1061375e3af58ed3904e37d6e8..b7cd81fdfa74783eb5cd0f80a43b7f1cd5c75513 100644 GIT binary patch delta 259 zcmeB5>q@KVQj$`rb!|Jvo?!4@f~UxGuPggM*OHzwVk~0!B^D zQ%x+)6OB_+5|dI=%}p#4O-v0;5>pKl%?*KW6A(SzhStw=m1tE38$?QT(lOx G2m}B~m{hp{ delta 257 zcmV+c0sj7qW{PHi3L+XHHo`efYJwe?5i-FY#X_$BT}vZWY$X>V*0FJdurnDT64_-6 z)@2IQWeRx;TL=LV0U8Df!=&Bg1tJS{Wpi|6Xklq?X=ExuW@I;GGBIQ_I503_H8W;8 zWo9!rGB-41F)=Y^Ff=k_GBRT^Gd4A4HDoh6H8wIdWHmD~Vq`QoGGZ}hV`4EdF%lXQ z7=@6DulRFXp_XSEg_!5oS@`=h%KMcItrFE_3esc}&t$Xi3{w%4svcvLlrSZeWgbMc z4Id{FlV&iNlc^pilZY@3ll?HOv9X^DlL!n(lTQn{lTHkvlg=@|lc+H!ldv*KlZ-MX HllU?c!IoXH diff --git a/hyperledger_fabric/latest/scripts/gen_channelArtifacts.sh b/hyperledger_fabric/latest/scripts/gen_channelArtifacts.sh index 7109934b..95b67ecd 100644 --- a/hyperledger_fabric/latest/scripts/gen_channelArtifacts.sh +++ b/hyperledger_fabric/latest/scripts/gen_channelArtifacts.sh @@ -27,7 +27,11 @@ configtxgen \ [ ! -f ${ORDERER_GENESIS} ] && echo "Fail to generate genesis block for system channel" && exit -1 -echo "Create the new app channel tx using configtx.yaml" +for (( i=1; i<150; i++ )); +do +APP_CHANNEL="channel"$i +APP_CHANNEL_TX=${APP_CHANNEL}".tx" +echo "Create the new app channel ${APP_CHANNEL} tx using configtx.yaml" configtxgen \ -configPath /tmp \ -profile ${APP_CHANNEL_PROFILE} \ @@ -35,6 +39,7 @@ configtxgen \ -outputCreateChannelTx ${APP_CHANNEL_TX} [ ! -f ${APP_CHANNEL_TX} ] && echo "Fail to generate app channel tx file" && exit -1 +done configtxgen \ -inspectChannelCreateTx ${APP_CHANNEL_TX} > ${APP_CHANNEL_TX}.json diff --git a/hyperledger_fabric/latest/scripts/gen_config_channel.sh b/hyperledger_fabric/latest/scripts/gen_config_channel.sh index 797f6e40..70fc5f38 100644 --- a/hyperledger_fabric/latest/scripts/gen_config_channel.sh +++ b/hyperledger_fabric/latest/scripts/gen_config_channel.sh @@ -22,10 +22,10 @@ echo_b "Generating channel artifacts with ${GEN_IMG} in mode ${MODE}" [ ! -d ${MODE}/${CHANNEL_ARTIFACTS} ] && mkdir -p ${MODE}/${CHANNEL_ARTIFACTS} echo_b "Make sure channel-artifacts dir exists already" -if [ -d ${MODE}/${CHANNEL_ARTIFACTS} -a ! -z "$(ls -A ${MODE}/${CHANNEL_ARTIFACTS})" ]; then - echo_b "${CHANNEL_ARTIFACTS} exists, ignore." - exit 0 -fi +#if [ -d ${MODE}/${CHANNEL_ARTIFACTS} -a ! -z "$(ls -A ${MODE}/${CHANNEL_ARTIFACTS})" ]; then +# echo_b "${CHANNEL_ARTIFACTS} exists, ignore." +# exit 0 +#fi echo_g "Generating ${CHANNEL_ARTIFACTS}..." docker run \ diff --git a/hyperledger_fabric/latest/scripts/test_channel_create.sh b/hyperledger_fabric/latest/scripts/test_channel_create.sh index 4027e979..995b6343 100644 --- a/hyperledger_fabric/latest/scripts/test_channel_create.sh +++ b/hyperledger_fabric/latest/scripts/test_channel_create.sh @@ -10,7 +10,12 @@ fi ## Create channel echo_b "=== Creating channel ${APP_CHANNEL} with ${APP_CHANNEL_TX}... ===" +for (( i=1; i<150; i++ )); +do + APP_CHANNEL="channel"$i + APP_CHANNEL_TX=${APP_CHANNEL}".tx" channelCreate "${APP_CHANNEL}" "${APP_CHANNEL_TX}" 1 0 +done echo_g "=== Created channel ${APP_CHANNEL} with ${APP_CHANNEL_TX} ===" diff --git a/hyperledger_fabric/v1.4.0/base-solo.yaml b/hyperledger_fabric/v1.4.0/base-solo.yaml index e06ec906..6a25f220 100644 --- a/hyperledger_fabric/v1.4.0/base-solo.yaml +++ b/hyperledger_fabric/v1.4.0/base-solo.yaml @@ -189,27 +189,3 @@ services: hostname: prometheus ports: - "9090:9090" - - #deprecated - event-listener: - extends: - file: base.yaml - service: event-listener-base - container_name: fabric-event-listener - hostname: fabric-event-listener - environment: - - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1 - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.Org1.example.com/msp - volumes: - - ./scripts:/tmp/scripts - - ./crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml - - ./crypto-config:/etc/hyperledger/fabric/crypto-config - - ./solo/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml - - ./solo/channel-artifacts:/tmp/channel-artifacts - - ./examples:/opt/gopath/src/examples - command: bash -c 'while true; do sleep 1; block-listener -events-address=peer0.org1.example.com:7053 -events-mspdir=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/ -events-mspid=Org1MSP; done' - #command: bash -c 'while true; do sleep 20170504; done' diff --git a/hyperledger_fabric/v1.4.0/base.yaml b/hyperledger_fabric/v1.4.0/base.yaml index 0599b4f2..73261831 100644 --- a/hyperledger_fabric/v1.4.0/base.yaml +++ b/hyperledger_fabric/v1.4.0/base.yaml @@ -112,28 +112,6 @@ services: volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml - #deprecated - event-listener: - extends: - file: base.yaml - service: event-listener-base - container_name: fabric-event-listener - hostname: fabric-event-listener - environment: - - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1 - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.Org1.example.com/msp - volumes: - - ./scripts:/tmp/scripts - - ./crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml - - ./crypto-config:/etc/hyperledger/fabric/crypto-config - - ./solo/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml - - ./solo/channel-artifacts:/tmp/channel-artifacts - - ./examples:/opt/gopath/src/examples - zookeeper-base: image: hyperledger/fabric-zookeeper:${EXT_IMG_TAG} restart: always