-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAB-5509 create bootstrap-1.0.1.sh script
bootstrap script to download docker images and fabric binaries from dockerhub and nexus repositories. Change-Id: Ibcdf2bcd305ec0c136f3d952008779096786d376 Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
- Loading branch information
1 parent
cc21f7d
commit 5aa0f3d
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright IBM Corp. All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
export VERSION=1.0.1 | ||
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 | ||
echo "==> FABRIC IMAGE: $IMAGES" | ||
echo | ||
docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG | ||
docker tag hyperledger/fabric-$IMAGES:$FABRIC_TAG hyperledger/fabric-$IMAGES | ||
done | ||
} | ||
|
||
dockerCaPull() { | ||
local CA_TAG=$1 | ||
echo "==> FABRIC CA IMAGE" | ||
echo | ||
docker pull hyperledger/fabric-ca:$CA_TAG | ||
docker tag hyperledger/fabric-ca:$CA_TAG hyperledger/fabric-ca | ||
} | ||
|
||
: ${CA_TAG:="$MARCH-$VERSION"} | ||
: ${FABRIC_TAG:="$MARCH-$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 | ||
|
||
echo "===> Pulling fabric Images" | ||
dockerFabricPull ${FABRIC_TAG} | ||
|
||
echo "===> Pulling fabric ca Image" | ||
dockerCaPull ${CA_TAG} | ||
echo | ||
echo "===> List out hyperledger docker images" | ||
docker images | grep hyperledger* |