Skip to content

Commit

Permalink
[FAB-7283] Update docs with new download link
Browse files Browse the repository at this point in the history
- Add new bootstrap script with version
parameters for fabric and fabric-ca with
v1.0.5 as the default.  This script is
similar to the one in master but decided
to have one in the release branch so
that we can make sure that we can
leverage the tagged release content in
the docs

- Update the link to download the v1.0.5
binaries and images.

Change-Id: I84049bcdbcf4a790cfd1ea522d9a8f014452870e
Signed-off-by: Gari Singh <[email protected]>
  • Loading branch information
mastersingh24 committed Dec 5, 2017
1 parent 140c45f commit 2459adb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/samples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ you will extract the platform-specific binaries:

.. code:: bash
curl -sSL https://goo.gl/5ftp2f | bash
curl -sSL https://goo.gl/u5oW4c | bash -s 1.0.5
.. note:: If you get an error running the above curl command, you may
have too old a version of curl. Please visit the
Expand Down
47 changes: 47 additions & 0 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

# current version of fabric released
export VERSION=${1:-1.0.5}
# current version of fabric-ca released
export CA_VERSION=${2:-$VERSION}
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-$CA_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*

0 comments on commit 2459adb

Please sign in to comment.