Error following official documentation (install fabric samples binaries and docker images) using the new script


David Faulstich Diniz Reis
 

Hi.

I am following the docs to setup a new environment and I detected a little problem:

vagrant@vagrant:~/go/src/github.com/davidfdr$ ./install-fabric.sh
No options selected: Getting all samples, binaries, and docker images
Abort now if not the intention

Clone hyperledger/fabric-samples repo

===> Cloning hyperledger/fabric-samples repo
Cloning into 'fabric-samples'...
remote: Enumerating objects: 10417, done.
remote: Counting objects: 100% (159/159), done.
remote: Compressing objects: 100% (132/132), done.
remote: Total 10417 (delta 34), reused 116 (delta 19), pack-reused 10258
Receiving objects: 100% (10417/10417), 19.14 MiB | 12.57 MiB/s, done.
Resolving deltas: 100% (5560/5560), done.
fabric-samples v2.4.3 does not exist, defaulting to main. fabric-samples main branch is intended to work with recent versions of fabric.
vagrant@vagrant:~/go/src/github.com/davidfdr$ cd fabric-samples/
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples$ ls
asset-transfer-abac            asset-transfer-secured-agreement  CODE_OF_CONDUCT.md  interest_rate_swaps  SECURITY.md             token-erc-20
asset-transfer-basic           auction-dutch                     CODEOWNERS          LICENSE              test-application        token-erc-721
asset-transfer-events          auction-simple                    commercial-paper    MAINTAINERS.md       test-network            token-utxo
asset-transfer-ledger-queries  chaincode                         CONTRIBUTING.md     off_chain_data       test-network-k8s
asset-transfer-private-data    CHANGELOG.md                      fabcar              README.md            test-network-nano-bash
asset-transfer-sbe             ci                                high-throughput     scripts              token-erc-1155
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples$ cd bin
-bash: cd: bin: No such file or directory
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples$
----

As stated in the docs:

To pull the Docker containers and clone the samples repo, run one of these commands for example

./install-fabric.sh docker samples
./install-fabric.sh d s

If no arguments are supplied, then the arguments docker binary samples are assumed.


--
If I pass no arguments, the script downloads only the repository. To workaround this I executed the script again:

vagrant@vagrant:~/go/src/github.com/davidfdr$ ./install-fabric.sh b

Pull Hyperledger Fabric binaries

===> Downloading version 2.4.3 platform specific fabric binaries
===> Downloading:  https://github.com/hyperledger/fabric/releases/download/v2.4.3/hyperledger-fabric-linux-amd64-2.4.3.tar.gz
===> Will unpack to: fabric-samples
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 76.7M  100 76.7M    0     0  20.0M      0  0:00:03  0:00:03 --:--:-- 28.4M
==> Done.
===> Downloading version 1.5.3 platform specific fabric-ca-client binary
===> Downloading:  https://github.com/hyperledger/fabric-ca/releases/download/v1.5.3/hyperledger-fabric-ca-linux-amd64-1.5.3.tar.gz
===> Will unpack to: fabric-samples
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 25.1M  100 25.1M    0     0  13.6M      0  0:00:01  0:00:01 --:--:-- 40.2M
==> Done.
vagrant@vagrant:~/go/src/github.com/davidfdr$ ls
fabric-samples  install-fabric.sh
vagrant@vagrant:~/go/src/github.com/davidfdr$ cd fabric-samples/
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples$ ls
asset-transfer-abac            asset-transfer-secured-agreement  ci                  CONTRIBUTING.md      off_chain_data    test-network-k8s
asset-transfer-basic           auction-dutch                     Cloning             fabcar               README.md         test-network-nano-bash
asset-transfer-events          auction-simple                    CODE_OF_CONDUCT.md  high-throughput      scripts           token-erc-1155
asset-transfer-ledger-queries  bin                               CODEOWNERS          interest_rate_swaps  SECURITY.md       token-erc-20
asset-transfer-private-data    chaincode                         commercial-paper    LICENSE              test-application  token-erc-721
asset-transfer-sbe             CHANGELOG.md                      config              MAINTAINERS.md       test-network      token-utxo
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples$ cd bin
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples/bin$ ls
configtxgen  configtxlator  cryptogen  discover  fabric-ca-client  fabric-ca-server  ledgerutil  orderer  osnadmin  peer
vagrant@vagrant:~/go/src/github.com/davidfdr/fabric-samples/bin$




--


Mark Lewis
 

I haven't double-checked the behaviour myself but what you describe sounds like a bug. I would recommend raising an issue in GitHub to report it. You could even contribute a fix too.

https://github.com/hyperledger/fabric/issues