diff --git a/hyperledger_fabric/latest/scripts/download_images.sh b/hyperledger_fabric/latest/scripts/download_images.sh index f48066a3..27c6e8e8 100644 --- a/hyperledger_fabric/latest/scripts/download_images.sh +++ b/hyperledger_fabric/latest/scripts/download_images.sh @@ -1,16 +1,13 @@ #!/usr/bin/env bash # peer/orderer/ca/ccenv/tools/javaenv/baseos: 1.4, 1.4.0, 1.4.1, 2.0.0, latest -# baseimage (runtime for golang chaincode) and couchdb: 0.4.16, latest -# Noted: -# * the fabric-baseos 1.4/2.0 tags are not available at dockerhub yet, only latest/0.4.15 now -# * the fabric-nodeenv is not available at dockerhub yet +# baseimage (runtime for golang chaincode) and couchdb: 0.4.18, latest # In core.yaml, it requires: -# * fabric-ccenv:$(PROJECT_VERSION) -# * fabric-baseos:$(PROJECT_VERSION) -# * fabric-javaenv:latest -# * fabric-nodeenv:latest +# * fabric-ccenv:$(TWO_DIGIT_VERSION) +# * fabric-baseos:$(TWO_DIGIT_VERSION) +# * fabric-javaenv:$(TWO_DIGIT_VERSION) +# * fabric-nodeenv:$(TWO_DIGIT_VERSION) # Define those global variables if [ -f ./variables.sh ]; then @@ -48,26 +45,23 @@ pull_image yeasy/hyperledger-fabric:$FABRIC_IMG_TAG "true" # pull_image yeasy/blockchain-explorer:0.1.0-preview # TODO: wait for official images echo "=== Pulling fabric core images ${FABRIC_IMG_TAG} from fabric repo... ===" -for IMG in peer orderer ca ccenv tools baseos javaenv nodeenv; do +for IMG in peer orderer ca tools; do pull_image hyperledger/fabric-${IMG}:$FABRIC_IMG_TAG & # e.g., v2.0.0 done +echo "=== Pulling fabric chaincode images ${TWO_DIGIT_VERSION} from fabric repo... ===" +for IMG in ccenv baseos javaenv nodeenv; do + pull_image hyperledger/fabric-${IMG}:${TWO_DIGIT_VERSION} & # e.g., v2.0 +done + echo "=== Pulling base/3rd-party images with tag ${BASE_IMG_TAG} from fabric repo... ===" for IMG in baseimage couchdb kafka zookeeper; do pull_image hyperledger/fabric-${IMG}:$BASE_IMG_TAG & done -# core.yaml requires a PROJECT_VERSION tag, only need when testing latest code -# TODO: dockerhub does not have a fabric-ccenv:2.0.0 image yet, but the chaincode installation will use it. +# TODO: dockerhub fabric-ccenv:2.0 image is too old # Hence we need to build the image locally and tag it manually -docker tag yeasy/hyperledger-fabric-base hyperledger/fabric-ccenv:2.0.0 - -echo "Sometimes if there's no available hyperledger/fabric-ccenv, then just retag the yeasy/hyperledger-fabric-base image to it" - -pull_image hyperledger/fabric-javaenv:latest # core.yaml requires a latest tag - -# fabric-baseos does not have 1.4 tag yet, but core.yaml requires a PROJECT_VERSION tag for golang run time -docker tag hyperledger/fabric-baseos:$FABRIC_IMG_TAG hyperledger/fabric-baseos:${PROJECT_VERSION} +docker tag yeasy/hyperledger-fabric-base hyperledger/fabric-ccenv:${TWO_DIGIT_VERSION} echo "Image pulling done, now can startup the network using make start..." exit 0 diff --git a/hyperledger_fabric/latest/scripts/variables.sh b/hyperledger_fabric/latest/scripts/variables.sh index 08b21f36..50e068fc 100644 --- a/hyperledger_fabric/latest/scripts/variables.sh +++ b/hyperledger_fabric/latest/scripts/variables.sh @@ -13,6 +13,9 @@ FABRIC_IMG_TAG=latest # Keep the same as in core.yaml, will tag ccenv with this value PROJECT_VERSION=2.0.0 +# for ccenv, baseos, javaenv, nodeenv +TWO_DIGIT_VERSION=2.0 + # Name of app channel, need to align with the gen_artifacts.sh SYS_CHANNEL="testchainid" APP_CHANNEL="businesschannel"