Update scripts
parent
d18171625a
commit
6197d981d8
|
@ -64,7 +64,7 @@ services:
|
||||||
- CORE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
|
- CORE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
|
||||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=latest_default # uncomment this to use specific network
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=latest_default # uncomment this to use specific network
|
||||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||||
- CORE_PEER_GOSSIP_ORGLEADER=false # this node is the group leader, default to false
|
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
||||||
- CORE_PEER_PROFILE_ENABLED=false
|
- CORE_PEER_PROFILE_ENABLED=false
|
||||||
- CORE_PEER_TLS_ENABLED=true
|
- CORE_PEER_TLS_ENABLED=true
|
||||||
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
||||||
|
|
|
@ -23,7 +23,7 @@ pull_image() {
|
||||||
echo "Downloading images from DockerHub... need a while"
|
echo "Downloading images from DockerHub... need a while"
|
||||||
|
|
||||||
# TODO: we may need some checking on pulling result?
|
# TODO: we may need some checking on pulling result?
|
||||||
echo "===Pulling fabric images from yeasy repo... with tag = ${FABRIC_IMG_TAG}" # 1.1.0
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from yeasy repo... ==="
|
||||||
for IMG in base peer orderer ca; do
|
for IMG in base peer orderer ca; do
|
||||||
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -33,7 +33,7 @@ pull_image yeasy/hyperledger-fabric:$FABRIC_IMG_TAG
|
||||||
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
||||||
|
|
||||||
|
|
||||||
echo "===Pulling base images from fabric repo... with tag = ${BASE_IMG_TAG}" # 0.4.6
|
echo "=== Pulling base images ${BASE_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -42,8 +42,8 @@ done
|
||||||
# Only useful for debugging
|
# Only useful for debugging
|
||||||
# docker pull yeasy/hyperledger-fabric
|
# docker pull yeasy/hyperledger-fabric
|
||||||
|
|
||||||
echo "===Pulling fabric images from fabric repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in peer tools orderer ca ccenv; do
|
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
|
|
|
@ -8,8 +8,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Install chaincode on all peers
|
## Install chaincode on all peers
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
|
|
||||||
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
||||||
|
|
||||||
for org in "${ORGS[@]}"
|
for org in "${ORGS[@]}"
|
||||||
|
|
|
@ -7,6 +7,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
|
||||||
|
|
||||||
# Instantiate chaincode in the channel, executed once on any node is enough
|
# Instantiate chaincode in the channel, executed once on any node is enough
|
||||||
# (once for each channel is enough, we make it concurrent here)
|
# (once for each channel is enough, we make it concurrent here)
|
||||||
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
||||||
|
|
|
@ -7,9 +7,10 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_INVOKE_ARGS=${CC_02_INVOKE_ARGS}
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
CC_QUERY_ARGS=${CC_02_QUERY_ARGS}
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Query on chaincode on Peer0/Org1
|
#Query on chaincode on Peer0/Org1
|
||||||
echo_g "=== Testing Chaincode invoke/query ==="
|
echo_g "=== Testing Chaincode invoke/query ==="
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,24 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
echo_b "Channel name: "${APP_CHANNEL}
|
echo_b "Channel name: "${APP_CHANNEL}
|
||||||
|
|
||||||
echo_b "Query the existing value of a"
|
echo_b "Query the existing value of a"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 100
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Invoke a transaction to transfer 10 from a to b"
|
echo_b "Invoke a transaction to transfer 10 from a to b"
|
||||||
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_INVOKE_ARGS}
|
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Check if the result of a is 90"
|
echo_b "Check if the result of a is 90"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 90
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo_g "All GOOD, MVE Test completed"
|
echo_g "All GOOD, MVE Test completed"
|
||||||
|
|
|
@ -7,9 +7,11 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
CC_UPGRADE_ARGS=${CC_02_UPGRADE_ARGS}
|
CC_UPGRADE_ARGS=${CC_UPGRADE_ARGS:-$CC_02_UPGRADE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Upgrade to new version
|
#Upgrade to new version
|
||||||
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ services:
|
||||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v102_default # uncomment this to use specific network
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v102_default # uncomment this to use specific network
|
||||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||||
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
||||||
#- CORE_PEER_PROFILE_ENABLED=true
|
- CORE_PEER_PROFILE_ENABLED=false
|
||||||
- CORE_PEER_TLS_ENABLED=true
|
- CORE_PEER_TLS_ENABLED=true
|
||||||
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
- 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_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
|
||||||
|
@ -86,7 +86,7 @@ services:
|
||||||
command: peer node start
|
command: peer node start
|
||||||
|
|
||||||
cli-base:
|
cli-base:
|
||||||
image: hyperledger/fabric-tools:x86_64-1.0.5
|
image: hyperledger/fabric-tools:x86_64-1.0.2
|
||||||
restart: always
|
restart: always
|
||||||
tty: true
|
tty: true
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -12,26 +12,23 @@ fi
|
||||||
|
|
||||||
pull_image() {
|
pull_image() {
|
||||||
IMG=$1
|
IMG=$1
|
||||||
if [ -z "$(docker images -q ${IMG} 2> /dev/null)" ]; then # not exist
|
#if [ -z "$(docker images -q ${IMG} 2> /dev/null)" ]; then # not exist
|
||||||
docker pull ${IMG}
|
docker pull ${IMG}
|
||||||
else
|
|
||||||
echo "${IMG} already exist locally"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Downloading images from DockerHub... need a while"
|
echo "Downloading images from DockerHub... need a while"
|
||||||
|
|
||||||
# TODO: we may need some checking on pulling result?
|
# TODO: we may need some checking on pulling result?
|
||||||
echo "===Pulling fabric images from yeasy repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from yeasy repo... ==="
|
||||||
for IMG in base peer orderer ca; do
|
for IMG in base peer orderer ca; do
|
||||||
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
docker pull yeasy/hyperledger-fabric:$FABRIC_IMG_TAG \
|
pull_image yeasy/hyperledger-fabric:$FABRIC_IMG_TAG
|
||||||
&& docker pull docker pull yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
||||||
|
|
||||||
|
|
||||||
echo "===Pulling base images from fabric repo... with tag = ${BASE_IMG_TAG}"
|
echo "=== Pulling base images ${BASE_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -40,9 +37,9 @@ done
|
||||||
# Only useful for debugging
|
# Only useful for debugging
|
||||||
# docker pull yeasy/hyperledger-fabric
|
# docker pull yeasy/hyperledger-fabric
|
||||||
|
|
||||||
echo "===Pulling fabric images from official repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in peer tools orderer ca ccenv; do
|
for IMG in peer tools orderer ca ccenv; do
|
||||||
HLF_IMG=hyperledger/fabric-zookeeper:$ARCH-$BASE_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -65,7 +65,7 @@ services:
|
||||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v105_default # uncomment this to use specific network
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v105_default # uncomment this to use specific network
|
||||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||||
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
||||||
#- CORE_PEER_PROFILE_ENABLED=true
|
- CORE_PEER_PROFILE_ENABLED=false
|
||||||
- CORE_PEER_TLS_ENABLED=true
|
- CORE_PEER_TLS_ENABLED=true
|
||||||
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
- 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_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
|
||||||
|
|
|
@ -12,17 +12,14 @@ fi
|
||||||
|
|
||||||
pull_image() {
|
pull_image() {
|
||||||
IMG=$1
|
IMG=$1
|
||||||
if [ -z "$(docker images -q ${IMG} 2> /dev/null)" ]; then # not exist
|
#if [ -z "$(docker images -q ${IMG} 2> /dev/null)" ]; then # not exist
|
||||||
docker pull ${IMG}
|
docker pull ${IMG}
|
||||||
else
|
|
||||||
echo "${IMG} already exist locally"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Downloading images from DockerHub... need a while"
|
echo "Downloading images from DockerHub... need a while"
|
||||||
|
|
||||||
# TODO: we may need some checking on pulling result?
|
# TODO: we may need some checking on pulling result?
|
||||||
echo "===Pulling fabric images from yeasy repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from yeasy repo... ==="
|
||||||
for IMG in base peer orderer ca; do
|
for IMG in base peer orderer ca; do
|
||||||
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -31,8 +28,8 @@ pull_image yeasy/hyperledger-fabric:$FABRIC_IMG_TAG
|
||||||
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
||||||
|
|
||||||
|
|
||||||
echo "===Pulling base images from official repo... with tag = ${BASE_IMG_TAG}"
|
echo "=== Pulling base images ${BASE_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in baseimage baseos; do
|
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
|
@ -40,7 +37,7 @@ done
|
||||||
# Only useful for debugging
|
# Only useful for debugging
|
||||||
# docker pull yeasy/hyperledger-fabric
|
# docker pull yeasy/hyperledger-fabric
|
||||||
|
|
||||||
echo "===Pulling fabric images from official repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
|
|
@ -8,8 +8,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Install chaincode on all peers
|
## Install chaincode on all peers
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
|
|
||||||
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
||||||
|
|
||||||
for org in "${ORGS[@]}"
|
for org in "${ORGS[@]}"
|
||||||
|
|
|
@ -7,6 +7,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
|
||||||
|
|
||||||
# Instantiate chaincode in the channel, executed once on any node is enough
|
# Instantiate chaincode in the channel, executed once on any node is enough
|
||||||
# (once for each channel is enough, we make it concurrent here)
|
# (once for each channel is enough, we make it concurrent here)
|
||||||
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
||||||
|
|
|
@ -7,9 +7,10 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_INVOKE_ARGS=${CC_02_INVOKE_ARGS}
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
CC_QUERY_ARGS=${CC_02_QUERY_ARGS}
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Query on chaincode on Peer0/Org1
|
#Query on chaincode on Peer0/Org1
|
||||||
echo_g "=== Testing Chaincode invoke/query ==="
|
echo_g "=== Testing Chaincode invoke/query ==="
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,24 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
echo_b "Channel name: "${APP_CHANNEL}
|
echo_b "Channel name: "${APP_CHANNEL}
|
||||||
|
|
||||||
echo_b "Query the existing value of a"
|
echo_b "Query the existing value of a"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 100
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Invoke a transaction to transfer 10 from a to b"
|
echo_b "Invoke a transaction to transfer 10 from a to b"
|
||||||
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_INVOKE_ARGS}
|
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Check if the result of a is 90"
|
echo_b "Check if the result of a is 90"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 90
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo_g "All GOOD, MVE Test completed"
|
echo_g "All GOOD, MVE Test completed"
|
||||||
|
|
|
@ -7,9 +7,11 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
CC_UPGRADE_ARGS=${CC_02_UPGRADE_ARGS}
|
CC_UPGRADE_ARGS=${CC_UPGRADE_ARGS:-$CC_02_UPGRADE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Upgrade to new version
|
#Upgrade to new version
|
||||||
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ services:
|
||||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v106_default # uncomment this to use specific network
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v106_default # uncomment this to use specific network
|
||||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||||
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
||||||
#- CORE_PEER_PROFILE_ENABLED=true
|
- CORE_PEER_PROFILE_ENABLED=false
|
||||||
- CORE_PEER_TLS_ENABLED=true
|
- CORE_PEER_TLS_ENABLED=true
|
||||||
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
- 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_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
|
||||||
|
|
|
@ -12,17 +12,14 @@ fi
|
||||||
|
|
||||||
pull_image() {
|
pull_image() {
|
||||||
IMG=$1
|
IMG=$1
|
||||||
if [ -z "$(docker images -q ${IMG} 2> /dev/null)" ]; then # not exist
|
#if [ -z "$(docker images -q ${IMG} 2> /dev/null)" ]; then # not exist
|
||||||
docker pull ${IMG}
|
docker pull ${IMG}
|
||||||
else
|
|
||||||
echo "${IMG} already exist locally"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Downloading images from DockerHub... need a while"
|
echo "Downloading images from DockerHub... need a while"
|
||||||
|
|
||||||
# TODO: we may need some checking on pulling result?
|
# TODO: we may need some checking on pulling result?
|
||||||
echo "===Pulling fabric images from yeasy repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from yeasy repo... ==="
|
||||||
for IMG in base peer orderer ca; do
|
for IMG in base peer orderer ca; do
|
||||||
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -31,7 +28,7 @@ pull_image yeasy/hyperledger-fabric:$FABRIC_IMG_TAG
|
||||||
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
||||||
|
|
||||||
|
|
||||||
echo "===Pulling base images from official repo... with tag = ${BASE_IMG_TAG}"
|
echo "=== Pulling base images ${BASE_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in baseimage baseos; do
|
for IMG in baseimage baseos; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -40,7 +37,7 @@ done
|
||||||
# Only useful for debugging
|
# Only useful for debugging
|
||||||
# docker pull yeasy/hyperledger-fabric
|
# docker pull yeasy/hyperledger-fabric
|
||||||
|
|
||||||
echo "===Pulling fabric images from official repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
|
|
@ -8,8 +8,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Install chaincode on all peers
|
## Install chaincode on all peers
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
|
|
||||||
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
||||||
|
|
||||||
for org in "${ORGS[@]}"
|
for org in "${ORGS[@]}"
|
||||||
|
|
|
@ -7,6 +7,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
|
||||||
|
|
||||||
# Instantiate chaincode in the channel, executed once on any node is enough
|
# Instantiate chaincode in the channel, executed once on any node is enough
|
||||||
# (once for each channel is enough, we make it concurrent here)
|
# (once for each channel is enough, we make it concurrent here)
|
||||||
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
||||||
|
|
|
@ -7,9 +7,10 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_INVOKE_ARGS=${CC_02_INVOKE_ARGS}
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
CC_QUERY_ARGS=${CC_02_QUERY_ARGS}
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Query on chaincode on Peer0/Org1
|
#Query on chaincode on Peer0/Org1
|
||||||
echo_g "=== Testing Chaincode invoke/query ==="
|
echo_g "=== Testing Chaincode invoke/query ==="
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,24 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
echo_b "Channel name: "${APP_CHANNEL}
|
echo_b "Channel name: "${APP_CHANNEL}
|
||||||
|
|
||||||
echo_b "Query the existing value of a"
|
echo_b "Query the existing value of a"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 100
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Invoke a transaction to transfer 10 from a to b"
|
echo_b "Invoke a transaction to transfer 10 from a to b"
|
||||||
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_INVOKE_ARGS}
|
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Check if the result of a is 90"
|
echo_b "Check if the result of a is 90"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 90
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo_g "All GOOD, MVE Test completed"
|
echo_g "All GOOD, MVE Test completed"
|
||||||
|
|
|
@ -7,9 +7,11 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
CC_UPGRADE_ARGS=${CC_02_UPGRADE_ARGS}
|
CC_UPGRADE_ARGS=${CC_UPGRADE_ARGS:-$CC_02_UPGRADE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Upgrade to new version
|
#Upgrade to new version
|
||||||
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -65,7 +65,7 @@ services:
|
||||||
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v110alpha_default # uncomment this to use specific network
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v110alpha_default # uncomment this to use specific network
|
||||||
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||||||
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
- CORE_PEER_GOSSIP_ORGLEADER=false # whether this node is the group leader, default to false
|
||||||
#- CORE_PEER_PROFILE_ENABLED=true
|
- CORE_PEER_PROFILE_ENABLED=false
|
||||||
- CORE_PEER_TLS_ENABLED=true
|
- CORE_PEER_TLS_ENABLED=true
|
||||||
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
|
- 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_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
|
||||||
|
|
|
@ -19,16 +19,16 @@ pull_image() {
|
||||||
echo "Downloading images from DockerHub... need a while"
|
echo "Downloading images from DockerHub... need a while"
|
||||||
|
|
||||||
# TODO: we may need some checking on pulling result?
|
# TODO: we may need some checking on pulling result?
|
||||||
echo "===Pulling fabric images from yeasy repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from yeasy repo... ==="
|
||||||
for IMG in base peer orderer ca; do
|
for IMG in base peer orderer ca; do
|
||||||
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
HLF_IMG=yeasy/hyperledger-fabric-${IMG}:$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
docker pull yeasy/hyperledger-fabric:$FABRIC_IMG_TAG \
|
pull_image yeasy/hyperledger-fabric:$FABRIC_IMG_TAG
|
||||||
&& docker pull docker pull yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images
|
||||||
|
|
||||||
|
|
||||||
echo "===Pulling base images from fabric repo... with tag = ${BASE_IMG_TAG}"
|
echo "=== Pulling base images ${BASE_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
for IMG in baseimage baseos couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$BASE_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
|
@ -37,8 +37,8 @@ done
|
||||||
# Only useful for debugging
|
# Only useful for debugging
|
||||||
# docker pull yeasy/hyperledger-fabric
|
# docker pull yeasy/hyperledger-fabric
|
||||||
|
|
||||||
echo "===Pulling fabric images from fabric repo... with tag = ${FABRIC_IMG_TAG}"
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in peer tools orderer ca ccenv; do
|
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
|
|
|
@ -8,8 +8,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Install chaincode on all peers
|
## Install chaincode on all peers
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
|
|
||||||
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
||||||
|
|
||||||
for org in "${ORGS[@]}"
|
for org in "${ORGS[@]}"
|
||||||
|
|
|
@ -7,6 +7,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
|
||||||
|
|
||||||
# Instantiate chaincode in the channel, executed once on any node is enough
|
# Instantiate chaincode in the channel, executed once on any node is enough
|
||||||
# (once for each channel is enough, we make it concurrent here)
|
# (once for each channel is enough, we make it concurrent here)
|
||||||
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
||||||
|
|
|
@ -7,9 +7,10 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_INVOKE_ARGS=${CC_02_INVOKE_ARGS}
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
CC_QUERY_ARGS=${CC_02_QUERY_ARGS}
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Query on chaincode on Peer0/Org1
|
#Query on chaincode on Peer0/Org1
|
||||||
echo_g "=== Testing Chaincode invoke/query ==="
|
echo_g "=== Testing Chaincode invoke/query ==="
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,24 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
echo_b "Channel name: "${APP_CHANNEL}
|
echo_b "Channel name: "${APP_CHANNEL}
|
||||||
|
|
||||||
echo_b "Query the existing value of a"
|
echo_b "Query the existing value of a"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 100
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Invoke a transaction to transfer 10 from a to b"
|
echo_b "Invoke a transaction to transfer 10 from a to b"
|
||||||
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_INVOKE_ARGS}
|
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Check if the result of a is 90"
|
echo_b "Check if the result of a is 90"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 90
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo_g "All GOOD, MVE Test completed"
|
echo_g "All GOOD, MVE Test completed"
|
||||||
|
|
|
@ -7,9 +7,11 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
CC_UPGRADE_ARGS=${CC_02_UPGRADE_ARGS}
|
CC_UPGRADE_ARGS=${CC_UPGRADE_ARGS:-$CC_02_UPGRADE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Upgrade to new version
|
#Upgrade to new version
|
||||||
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ done
|
||||||
# docker pull yeasy/hyperledger-fabric
|
# docker pull yeasy/hyperledger-fabric
|
||||||
|
|
||||||
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
echo "=== Pulling fabric images ${FABRIC_IMG_TAG} from fabric repo... ==="
|
||||||
for IMG in peer tools orderer ca ccenv; do
|
for IMG in peer tools orderer ca ccenv couchdb kafka zookeeper; do
|
||||||
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
HLF_IMG=hyperledger/fabric-${IMG}:$ARCH-$FABRIC_IMG_TAG
|
||||||
pull_image $HLF_IMG
|
pull_image $HLF_IMG
|
||||||
done
|
done
|
||||||
|
|
|
@ -8,8 +8,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Install chaincode on all peers
|
## Install chaincode on all peers
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
|
|
||||||
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
|
||||||
|
|
||||||
for org in "${ORGS[@]}"
|
for org in "${ORGS[@]}"
|
||||||
|
|
|
@ -7,6 +7,9 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
|
||||||
|
|
||||||
# Instantiate chaincode in the channel, executed once on any node is enough
|
# Instantiate chaincode in the channel, executed once on any node is enough
|
||||||
# (once for each channel is enough, we make it concurrent here)
|
# (once for each channel is enough, we make it concurrent here)
|
||||||
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
||||||
|
|
|
@ -7,9 +7,10 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_INVOKE_ARGS=${CC_02_INVOKE_ARGS}
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
CC_QUERY_ARGS=${CC_02_QUERY_ARGS}
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Query on chaincode on Peer0/Org1
|
#Query on chaincode on Peer0/Org1
|
||||||
echo_g "=== Testing Chaincode invoke/query ==="
|
echo_g "=== Testing Chaincode invoke/query ==="
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,24 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
echo_b "Channel name: "${APP_CHANNEL}
|
echo_b "Channel name: "${APP_CHANNEL}
|
||||||
|
|
||||||
echo_b "Query the existing value of a"
|
echo_b "Query the existing value of a"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 100
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Invoke a transaction to transfer 10 from a to b"
|
echo_b "Invoke a transaction to transfer 10 from a to b"
|
||||||
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_INVOKE_ARGS}
|
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo_b "Check if the result of a is 90"
|
echo_b "Check if the result of a is 90"
|
||||||
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 90
|
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo_g "All GOOD, MVE Test completed"
|
echo_g "All GOOD, MVE Test completed"
|
||||||
|
|
|
@ -7,9 +7,11 @@ elif [ -f scripts/func.sh ]; then
|
||||||
source scripts/func.sh
|
source scripts/func.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC_NAME=${CC_02_NAME}
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||||
CC_PATH=${CC_02_PATH}
|
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||||
CC_UPGRADE_ARGS=${CC_02_UPGRADE_ARGS}
|
CC_UPGRADE_ARGS=${CC_UPGRADE_ARGS:-$CC_02_UPGRADE_ARGS}
|
||||||
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
||||||
|
|
||||||
#Upgrade to new version
|
#Upgrade to new version
|
||||||
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue