Skip to content

Commit

Permalink
[FAB-4032] Fix Getting Started kit for Windows
Browse files Browse the repository at this point in the history
Patches bootstrap.sh and generateArtifacts.sh to get the right ARCH
Patches generateArtifacts.sh and docker-compose-base.yaml to use the
filename "genesis.block" instead of "orderer.genesis.block" which for
some unknown reason makes the orderer fail to launch (weird!!)
Patches the doc to refer to the new filename.

See [FAB-4032] for additional info.

Change-Id: Ifde065aba7ddd7c23d20e2ee9e6498c7a3230e4d
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
  • Loading branch information
lehors committed May 19, 2017
1 parent 2599f1b commit e3e26ce
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
8 changes: 6 additions & 2 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ Prerequisites and setup
- `Docker Compose <https://docs.docker.com/compose/overview/>`__ - v1.8 or higher
- `Docker Toolbox <https://docs.docker.com/toolbox/toolbox_install_windows/>`__ - Windows users only
- `Go <https://golang.org/>`__ - 1.7 or higher
- `Git Bash <https://git-scm.com/downloads>`__ - Windows users only; provides a better alternative to the Windows command prompt

On Windows machines you will also need the following which provides a better alternative to the Windows command prompt:

- `Git Bash <https://git-scm.com/downloads>`__
- `make for MinGW <http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82.90-cvs/make-3.82.90-2-mingw32-cvs-20120902-bin.tar.lzma>`__ to be added to Git Bash

Curl the artifacts and binaries & pull the docker images
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -206,7 +210,7 @@ Create the orderer genesis block:

.. code:: bash
./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/orderer.genesis.block
./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
You can ignore the logs regarding intermediate certs, we are not using them in
this crypto implementation.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e_cli/base/docker-compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ../channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
ports:
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e_cli/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export ARCH=$(uname -s | tr '[:upper:]' '[:lower:]')-$(go env GOARCH)
export ARCH=$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(go env GOARCH)

curl https://nexus.hyperledger.org/content/repositories/logs/sandbox/fabric-binary/${ARCH}-1.0.0-alpha2.tar.gz | tar xz
cd release/${ARCH}
Expand Down
8 changes: 6 additions & 2 deletions examples/e2e_cli/end-to-end.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ Prerequisites
- `Xcode <https://itunes.apple.com/us/app/xcode/id497799835?mt=12>`__ - OSX only (this can take upwards of an hour)
- `Docker Toolbox <https://docs.docker.com/toolbox/toolbox_install_windows/>`__ - Windows users only
- `Go <https://golang.org/>`__ - 1.7 or higher
- `Git Bash <https://git-scm.com/downloads>`__ - Windows users only; provides a better alternative to the Windows command prompt

On Windows machines you will also need the following which provides a better alternative to the Windows command prompt:

- `Git Bash <https://git-scm.com/downloads>`__
- `make for MinGW <http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82.90-cvs/make-3.82.90-2-mingw32-cvs-20120902-bin.tar.lzma>`__ to be added to Git Bash

Setting the $GOPATH
^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -281,7 +285,7 @@ Create the orderer genesis block:

.. code:: bash
./../../release/$os_arch/bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/orderer.genesis.block
./../../release/$os_arch/bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
You can ignore the logs regarding intermediate certs, we are not using them in
this crypto implementation.
Expand Down
6 changes: 4 additions & 2 deletions examples/e2e_cli/generateArtifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export FABRIC_ROOT=$PWD/../..
export FABRIC_CFG_PATH=$PWD
echo

OS_ARCH=$(echo "$(uname -s)-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')
OS_ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')

## Using docker-compose template replace private key file names with constants
function replacePrivateKey () {
Expand Down Expand Up @@ -67,7 +67,9 @@ function generateChannelArtifacts() {
echo "##########################################################"
echo "######### Generating Orderer Genesis block ##############"
echo "##########################################################"
$CONFIGTXGEN -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/orderer.genesis.block
# Note: For some unknown reason (at least for now) the block file can't be
# named orderer.genesis.block or the orderer will fail to launch!
$CONFIGTXGEN -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block

echo
echo "#################################################################"
Expand Down

0 comments on commit e3e26ce

Please sign in to comment.