Skip to content

Commit

Permalink
FAB-7090 improve d/l tracking process
Browse files Browse the repository at this point in the history
provide a generic bootstrap.sh script that defaults to the
latest release but can be provided a specific version to
download/install.

update the docs to reflect the modified short URL and
current version.

add more comprehensice handling for older versions of curl.

Change-Id: I79e7326ae42ac25b1aabc754159d0d9aa67b62be
Signed-off-by: Christopher Ferris <[email protected]>
  • Loading branch information
christo4ferris committed Nov 22, 2017
1 parent 792e4fe commit 071f81f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 315 deletions.
16 changes: 11 additions & 5 deletions docs/source/samples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ you will extract the platform-specific binaries:

.. code:: bash
curl -sSL https://goo.gl/fMh2s3 | bash
curl -sSL https://goo.gl/x2LhaE | bash -s 1.1.0-preview
.. note:: If you get an error running the above curl command, you may
have too old a version of curl. Please visit the
:doc:`prereqs` page for additional information on where to
find the latest version.
have too old a version of curl that does not handle redirects.
Please visit the :doc:`prereqs` page for additional information on
where to find the latest version. Alternately, you can substitute the
un-shortened URL:
https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh

.. note:: You can use the command above for any published version of Hyperledger
Fabric. Simply replace '1.1.0-preview' with the version identifier
of the version you wish to install.

The curl command above downloads and executes a bash script
that will download and extract all of the platform-specific binaries you
Expand Down Expand Up @@ -79,7 +85,7 @@ The script lists out the Docker images installed upon conclusion.

Look at the names for each image; these are the components that will ultimately
comprise our Hyperledger Fabric network. You will also notice that you have
two instances of the same image ID - one tagged as "x86_64-1.0.X" and
two instances of the same image ID - one tagged as "x86_64-1.x.x" and
one tagged as "latest".

.. note:: On different architectures, the x86_64 would be replaced
Expand Down
44 changes: 0 additions & 44 deletions scripts/bootstrap-1.0.0-alpha2.sh

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/bootstrap-1.0.0-beta.sh

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/bootstrap-1.0.0-rc1.sh

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/bootstrap-1.0.0.sh

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/bootstrap-1.0.1.sh

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/bootstrap-1.0.3.sh

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/bootstrap-1.1.0-preview.sh

This file was deleted.

7 changes: 5 additions & 2 deletions scripts/bootstrap-1.0.2.sh → scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
# SPDX-License-Identifier: Apache-2.0
#

export VERSION=1.0.2
# current version of fabric released
export VERSION=${1:-1.0.4}
# current version of fabric-ca released
export CA_VERSION=${2:-1.0.4}
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`
Expand All @@ -29,7 +32,7 @@ dockerCaPull() {
}

: ${CA_TAG:="$MARCH-$VERSION"}
: ${FABRIC_TAG:="$MARCH-$VERSION"}
: ${FABRIC_TAG:="$MARCH-$CA_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 Down

1 comment on commit 071f81f

@erpblockchain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Chris, I am getting the below error when executing the bootstrap.sh script.

bash: line 7: syntax error near unexpected token newline' bash: line 7: '
curl: (23) Failed writing body (993 != 1370)

when i removed the gap at line 7 its working fine. can you please check? Thank you.

Please sign in to comment.