Skip to content

Commit

Permalink
FAB-7909 update bootstrap script
Browse files Browse the repository at this point in the history
fabric and thirdparty image versions are not same hence
bootstrap script has to update to pull both the released
versions.

removed thirdparty image reference names from fabricpull
function and created a new function to pull the latest
version of thirdparty docker images (kafka, couchdb and
zookeeper)

Change-Id: Ib6f16b796c1336a4fefc798f20e19fdfc9136d1a
Signed-off-by: ramesh <rameshbabu.thoomu@gmail.com>
  • Loading branch information
rameshthoomu committed Jan 25, 2018
1 parent 53264cb commit 45b2886
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,32 @@
export VERSION=${1:-1.0.4}
# current version of fabric-ca released
export CA_VERSION=${2:-$VERSION}
# current version of thirdparty images (couchdb, kafka and zookeeper) released
export THIRDPARTY_IMAGE_VERSION=0.4.5
export ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')
#Set MARCH variable i.e ppc64le,s390x,x86_64,i386
MARCH=`uname -m`

dockerFabricPull() {
local FABRIC_TAG=$1
for IMAGES in peer orderer couchdb ccenv javaenv kafka zookeeper tools; do
for IMAGES in peer orderer ccenv javaenv tools; do
echo "==> FABRIC IMAGE: $IMAGES"
echo
docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG
docker tag hyperledger/fabric-$IMAGES:$FABRIC_TAG hyperledger/fabric-$IMAGES
done
}

dockerThirdPartyImagesPull() {
local THIRDPARTY_TAG=$1
for IMAGES in couchdb kafka zookeeper; do
echo "==> THIRDPARTY DOCKER IMAGE: $IMAGES"
echo
docker pull hyperledger/fabric-$IMAGES:$THIRDPARTY_TAG
docker tag hyperledger/fabric-$IMAGES:$THIRDPARTY_TAG hyperledger/fabric-$IMAGES
done
}

dockerCaPull() {
local CA_TAG=$1
echo "==> FABRIC CA IMAGE"
Expand All @@ -33,6 +45,7 @@ dockerCaPull() {

: ${CA_TAG:="$MARCH-$CA_VERSION"}
: ${FABRIC_TAG:="$MARCH-$VERSION"}
: ${THIRDPARTY_TAG:="$MARCH-$THIRDPARTY_IMAGE_VERSION"}

echo "===> Downloading platform binaries"
curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${VERSION}/hyperledger-fabric-${ARCH}-${VERSION}.tar.gz | tar xz
Expand All @@ -42,6 +55,10 @@ dockerFabricPull ${FABRIC_TAG}

echo "===> Pulling fabric ca Image"
dockerCaPull ${CA_TAG}

echo "===> Pulling thirdparty docker images"
dockerThirdPartyImagesPull ${THIRDPARTY_TAG}

echo
echo "===> List out hyperledger docker images"
docker images | grep hyperledger*

0 comments on commit 45b2886

Please sign in to comment.