Skip to content

Commit e3e26ce

Browse files
committed
[FAB-4032] Fix Getting Started kit for Windows
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 <[email protected]>
1 parent 2599f1b commit e3e26ce

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

docs/source/getting_started.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ Prerequisites and setup
3232
- `Docker Compose <https://docs.docker.com/compose/overview/>`__ - v1.8 or higher
3333
- `Docker Toolbox <https://docs.docker.com/toolbox/toolbox_install_windows/>`__ - Windows users only
3434
- `Go <https://golang.org/>`__ - 1.7 or higher
35-
- `Git Bash <https://git-scm.com/downloads>`__ - Windows users only; provides a better alternative to the Windows command prompt
35+
36+
On Windows machines you will also need the following which provides a better alternative to the Windows command prompt:
37+
38+
- `Git Bash <https://git-scm.com/downloads>`__
39+
- `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
3640

3741
Curl the artifacts and binaries & pull the docker images
3842
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -206,7 +210,7 @@ Create the orderer genesis block:
206210

207211
.. code:: bash
208212
209-
./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/orderer.genesis.block
213+
./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
210214
211215
You can ignore the logs regarding intermediate certs, we are not using them in
212216
this crypto implementation.

examples/e2e_cli/base/docker-compose-base.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
2121
command: orderer
2222
volumes:
23-
- ../channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
23+
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
2424
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
2525
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
2626
ports:

examples/e2e_cli/bootstrap.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

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

55
curl https://nexus.hyperledger.org/content/repositories/logs/sandbox/fabric-binary/${ARCH}-1.0.0-alpha2.tar.gz | tar xz
66
cd release/${ARCH}

examples/e2e_cli/end-to-end.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ Prerequisites
2727
- `Xcode <https://itunes.apple.com/us/app/xcode/id497799835?mt=12>`__ - OSX only (this can take upwards of an hour)
2828
- `Docker Toolbox <https://docs.docker.com/toolbox/toolbox_install_windows/>`__ - Windows users only
2929
- `Go <https://golang.org/>`__ - 1.7 or higher
30-
- `Git Bash <https://git-scm.com/downloads>`__ - Windows users only; provides a better alternative to the Windows command prompt
30+
31+
On Windows machines you will also need the following which provides a better alternative to the Windows command prompt:
32+
33+
- `Git Bash <https://git-scm.com/downloads>`__
34+
- `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
3135

3236
Setting the $GOPATH
3337
^^^^^^^^^^^^^^^^^^^
@@ -281,7 +285,7 @@ Create the orderer genesis block:
281285

282286
.. code:: bash
283287
284-
./../../release/$os_arch/bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/orderer.genesis.block
288+
./../../release/$os_arch/bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
285289
286290
You can ignore the logs regarding intermediate certs, we are not using them in
287291
this crypto implementation.

examples/e2e_cli/generateArtifacts.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export FABRIC_ROOT=$PWD/../..
1010
export FABRIC_CFG_PATH=$PWD
1111
echo
1212

13-
OS_ARCH=$(echo "$(uname -s)-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')
13+
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)}')
1414

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

7274
echo
7375
echo "#################################################################"

0 commit comments

Comments
 (0)