Skip to content

Commit 5aa0f3d

Browse files
committed
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>
1 parent cc21f7d commit 5aa0f3d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

scripts/bootstrap-1.0.1.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
#
3+
# Copyright IBM Corp. All Rights Reserved.
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
8+
export VERSION=1.0.1
9+
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)}')
10+
#Set MARCH variable i.e ppc64le,s390x,x86_64,i386
11+
MARCH=`uname -m`
12+
13+
dockerFabricPull() {
14+
local FABRIC_TAG=$1
15+
for IMAGES in peer orderer couchdb ccenv javaenv kafka zookeeper tools; do
16+
echo "==> FABRIC IMAGE: $IMAGES"
17+
echo
18+
docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG
19+
docker tag hyperledger/fabric-$IMAGES:$FABRIC_TAG hyperledger/fabric-$IMAGES
20+
done
21+
}
22+
23+
dockerCaPull() {
24+
local CA_TAG=$1
25+
echo "==> FABRIC CA IMAGE"
26+
echo
27+
docker pull hyperledger/fabric-ca:$CA_TAG
28+
docker tag hyperledger/fabric-ca:$CA_TAG hyperledger/fabric-ca
29+
}
30+
31+
: ${CA_TAG:="$MARCH-$VERSION"}
32+
: ${FABRIC_TAG:="$MARCH-$VERSION"}
33+
34+
echo "===> Downloading platform binaries"
35+
curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${VERSION}/hyperledger-fabric-${ARCH}-${VERSION}.tar.gz | tar xz
36+
37+
echo "===> Pulling fabric Images"
38+
dockerFabricPull ${FABRIC_TAG}
39+
40+
echo "===> Pulling fabric ca Image"
41+
dockerCaPull ${CA_TAG}
42+
echo
43+
echo "===> List out hyperledger docker images"
44+
docker images | grep hyperledger*

0 commit comments

Comments
 (0)