Hyperledger Fabric 1.0 Public Cloud Installation 5--Test Cluster

0. Install python, pip

$ sudo apt-get install python
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
1. Compile configtxgen
# cd $GOPATH/src/github.com/hyperledger/fabric
# make configtxgen
In case of error: 'ltdl.h' file not found
sudo apt install libtool libltdl-dev
then run make again
# make configtxgen

2. The successful compilation file is placed in build/bin/configtxgen in the fabric directory

build/bin/configtxgen
CGO_CFLAGS=" " GOBIN=/Users/johndoe/work/src/github.com/hyperledger/fabric/build/bin go install -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.0-snapshot-8d3275f -X github.com/hyperledger/fabric/common /metadata.BaseVersion=0.3.0 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric"       github.com/hyperledger/fabric/common/configtx/tool/configtxgen
Binary available as build/bin/configtxgen``

3. e2e_cli sample test environment, enter the examples/e2e_cli directory

$ sudo chmod +x download-dockerimages.sh

It should be noted that modify the content of this file and download 1.0.0 instead of 1.0.0-beta
./download-dockerimages.sh
Download the docker image
ubuntu@VM-0-13-ubuntu:/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli$ docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
hello-world                    latest              f2a91732366c        4 months ago        1.85kB
hyperledger/fabric-tools       latest              ae6b0f53cb70        10 months ago       1.32GB
hyperledger/fabric-tools       x86_64-1.0.0-beta   ae6b0f53cb70        10 months ago       1.32GB
hyperledger/fabric-couchdb     latest              31bbbec3d853        10 months ago       1.48GB
hyperledger/fabric-couchdb     x86_64-1.0.0-beta   31bbbec3d853        10 months ago       1.48GB
hyperledger/fabric-kafka       latest              c4ac1c9a4797        10 months ago       1.3GB
hyperledger/fabric-kafka       x86_64-1.0.0-beta   c4ac1c9a4797        10 months ago       1.3GB
hyperledger/fabric-zookeeper   latest              2c4ebacb6f00        10 months ago       1.31GB
hyperledger/fabric-zookeeper   x86_64-1.0.0-beta   2c4ebacb6f00        10 months ago       1.31GB
hyperledger/fabric-orderer     latest              11ff350dd297        10 months ago       179MB
hyperledger/fabric-orderer     x86_64-1.0.0-beta   11ff350dd297        10 months ago       179MB
hyperledger/fabric-peer        latest              e01c2b645f11        10 months ago       182MB
hyperledger/fabric-peer        x86_64-1.0.0-beta   e01c2b645f11        10 months ago       182MB
hyperledger/fabric-javaenv     latest              61c188dca542        10 months ago       1.42GB
hyperledger/fabric-javaenv     x86_64-1.0.0-beta   61c188dca542        10 months ago       1.42GB
hyperledger/fabric-ccenv       latest              7034cca1918d        10 months ago       1.29GB
hyperledger/fabric-ccenv       x86_64-1.0.0-beta   7034cca1918d        10 months ago       1.29GB
hyperledger/fabric-ca          latest              e549e8c53c2e        10 months ago       238MB
hyperledger/fabric-ca          x86_64-1.0.0-beta   e549e8c53c2e        10 months ago       238MB

4. Execute the command to start the network

$ sudo ./network_setup.sh up <channl id>
$ sudo ./network_setup.sh down

The startup error is the sodu environment variable. You can edit the /etc/sudoers file to change Defaults env_reset to Defaults! env_reset

make: Entering directory '/opt/gopath/src/github.com/hyperledger/fabric'
can't load package: package github.com/hyperledger/fabric/core/chaincode/shim: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of:
	/usr/local/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT)
	/home/ubuntu/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH)
find: ‘/src/github.com/hyperledger/fabric/core/chaincode/shim’: No such file or directory
===================== Query on PEER3 on channel 'mychannel' is successful =====================

===================== All GOOD, End-2-End execution completed =====================


 _____   _   _   ____            _____   ____    _____
| ____| | \ | | |  _ \          | ____| |___ \  | ____|
|  _|   |  \| | | | | |  _____  |  _|     __) | |  _|  
| |___  | |\  | | |_| | |_____| | |___   / __/  | |___
|_____| |_| \_| |____/          |_____| |_____| |_____|
The above interface appears, indicating that the test passed

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324429004&siteId=291194637