搭建Hyperledger Fabric网络

注意:进行本文操作的前提是已完成Hyperledger Fabric的开发环境搭建,具体搭建步骤可参考[Hyperledger Fabric开发环境搭建(https://blog.csdn.net/yuanziwoxin/article/details/92831521)

文章目录

  • 一、下载Fabric源码库
  • 二、安装configtxgen和configtogen(Fabric 1.4及以上可忽略本操作)
    • (1)安装configtxgen
    • (2)安装configtogen
  • 三、执行引导脚本
  • 四、添加环境变量
  • 五、检查环境变量是否配置成功
  • 六、创建和管理网络
    • (1)生成所需的证书,并创建创世区块
    • (2)启动网络
    • (3)查看节点的启动情况
    • (4)关闭网络

一、下载Fabric源码库

我们需要将仓库clone到 $GOPATH/src目录下,具体操作如下:

cd $GOPATH/src
mkdir -p github.com/hyperledger
cd github.com/hyperledger

把代码库clone下来

git clone https://github.com/hyperledger/fabric.git

二、安装configtxgen和configtogen(Fabric 1.4及以上可忽略本操作)

如果是fabric 1.0版本,才需要进行如下步骤,1.4及以上可忽略下面两步操作(现在默认下载下来的fabric源码库版本是1.4或者以上)。

(1)安装configtxgen

cd common/configtx/tool/configtxgen
go install --tags=nopkcsll

fabric 1.4 这个目录下未找到configtxgen, 可能切换成1.0版本才有。

(2)安装configtogen

cd /common/tools/cryptogen
go install --tags=nopkcsll

注意:
如需切换Fabric源代码的版本,可使用如下命令:
(1)先打开Fabric源码库的存放文件夹fabric

# 针对你当前所在目录,cd后面的路径可能要进行相应的修改
cd fabric

将Fabric源码库的版本切换到1.4 (在fabric目录下执行)

git checkout release-1.4

切换成其他的版本,只需修改“ release-x”中的x为相应的版本号即可

三、执行引导脚本

在Fabric源码库的scripts文件夹下有一个bootstrap.sh的引导脚本

cd scripts
ls

查看结果如下:

bootstrap.sh       check_trailingspaces.sh  metrics_doc.sh
changelog.sh       compile_protos.sh        multiarch.sh
check_deps.sh      generateHelpDocs.sh      pull_build_artifacts.sh
check_license.sh   golinter.sh              run-integration-tests.sh
check_spelling.sh  goListFiles.sh

执行引导脚本bootstrap.sh,就会自动进行fabric相关镜像的下载 ,并且还会把fabric samples库下载下来(时间可能有点久,如果出现长时间停顿,可以尝试重新执行脚本)

./bootstrap.sh

下载完成之后,可以通过下列命令去查看已下载的Fabric镜像:

sudo docker images | grep hyperledger*

查询结果如下:

hyperledger/fabric-ca          1.4.1               3a1799cda5d7        2 months ago        252MB
hyperledger/fabric-ca          latest              3a1799cda5d7        2 months ago        252MB
hyperledger/fabric-tools       1.4.1               432c24764fbb        2 months ago        1.55GB
hyperledger/fabric-tools       latest              432c24764fbb        2 months ago        1.55GB
hyperledger/fabric-ccenv       1.4.1               d7433c4b2a1c        2 months ago        1.43GB
hyperledger/fabric-ccenv       latest              d7433c4b2a1c        2 months ago        1.43GB
hyperledger/fabric-orderer     1.4.1               ec4ca236d3d4        2 months ago        173MB
hyperledger/fabric-orderer     latest              ec4ca236d3d4        2 months ago        173MB
hyperledger/fabric-peer        1.4.1               a1e3874f338b        2 months ago        178MB
hyperledger/fabric-peer        latest              a1e3874f338b        2 months ago        178MB
hyperledger/fabric-javaenv     1.4.1               b8c9d7ff6243        2 months ago        1.74GB
hyperledger/fabric-javaenv     latest              b8c9d7ff6243        2 months ago        1.74GB
hyperledger/fabric-zookeeper   0.4.15              20c6045930c8        3 months ago        1.43GB
hyperledger/fabric-zookeeper   latest              20c6045930c8        3 months ago        1.43GB
hyperledger/fabric-kafka       0.4.15              b4ab82bbaf2f        3 months ago        1.44GB
hyperledger/fabric-kafka       latest              b4ab82bbaf2f        3 months ago        1.44GB
hyperledger/fabric-couchdb     0.4.15              8de128a55539        3 months ago        1.5GB
hyperledger/fabric-couchdb     latest              8de128a55539        3 months ago        1.5GB
hyperledger/fabric-baseos      latest              9d6ec11c60ff        3 months ago        145MB

在scripts目录下执行查看命令ls, 会发现文件夹中多了一个fabric samples文件夹:

bootstrap.sh   check_license.sh         compile_protos.sh    golinter.sh     multiarch.sh
changelog.sh   check_spelling.sh        fabric-samples       goListFiles.sh  pull_build_artifacts.sh
check_deps.sh  check_trailingspaces.sh  generateHelpDocs.sh  metrics_doc.sh  run-integration-tests.sh

四、添加环境变量

打开profile文件

sudo vim /etc/profile

将最后一行的Path, 在原来的配置基础上再添加“:$GOPATH/src/github.com/hyperledger/fabric-samples/bin ”,添加之后如下所示:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:$GOPATH/src/github.com/hyperledger/fabric/scripts/fabric-samples/bin

注意:我们直接从github上clone下来的fabric-samples源代码库目录下是没有bin这个目录,而经过我们执行引导脚本之后,fabric/scripts/fabric-samples目录下是有bin目录的,所以这里配置指向的是fabric/scripts/fabric-samples这个目录。

为了使修改的配置文件立即生效,记得使用source命令:

source /etc/profile

五、检查环境变量是否配置成功

fabric-ca-client version

运行结果如下:

fabric-ca-client:
 Version: 1.4.1
 Go version: go1.11.5
 OS/Arch: linux/amd64

六、创建和管理网络

构建您的第一个网络(BYFN)方案提供了一个Hyperledger Fabric网络示例,该网络由两个组织组成,每个组织维护两个peer节点。它还将默认部署“Solo”排序服务,但也可以使用其他排序服务实现。
基于fabric-samples提供的BYFN(build your first network),来快速的构建我们第一个超级账本fabric网络,以此来熟悉整个运行过程。
先进入fabric/scripts/fabric-samples/first-network/目录下:

cd $GOPATH/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network

使用ls命令

ls

我们可以看到其中包含了一个byfn.sh文件,这就是我们所需要的快速构建hyperledger fabric网络的脚本:

base                     docker-compose-couch-org3.yaml    eyfn.sh
byfn.sh                  docker-compose-couch.yaml         org3-artifacts
channel-artifacts        docker-compose-e2e-template.yaml  README.md
configtx.yaml            docker-compose-etcdraft2.yaml     scripts
crypto-config.yaml       docker-compose-kafka.yaml
docker-compose-cli.yaml  docker-compose-org3.yaml

现在我们来了解一下byfn.sh脚本的相关命令和参数,这些在以后的开发工作中会大有裨益:

Usage: 
  byfn.sh  [-c ] [-t ] [-d ] [-f ] [-s ] [-l ] [-o ] [-i ] [-v]
     - one of 'up', 'down', 'restart', 'generate' or 'upgrade'
      - 'up' - bring up the network with docker-compose up  //启动网络
      - 'down' - clear the network with docker-compose down  //关闭网络
      - 'restart' - restart the network  //重启网络
      - 'generate' - generate required certificates and genesis block
                     // 生成所需的证书和创世区块
      - 'upgrade'  - upgrade the network from version 1.3.x to 1.4.0
                     // 将网络从1.3.x升级到1.4.0
    -c  - channel name to use (defaults to "mychannel")
      // 设置通道名字(默认是“mychannel”)
    -t  - CLI timeout duration in seconds (defaults to 10)
      // CLI的超时时间,单位为秒(默认为10秒)
    -d  - delay duration in seconds (defaults to 3)
     // 延时时间(默认为3秒)
    -f  - specify which docker-compose file use (defaults to docker-compose-cli.yaml)
    // 指定使用哪一个docker-compose文件(默认是docker-compose-cli.yaml
)
    -s  - the database backend to use: goleveldb (default) or couchdb
    // 指定使用的数据库:goleveldb(默认)或者couchdb
    -l  - the chaincode language: golang (default) or node
    // 指定链码使用的语言:golang(默认)或者node
    -o  - the consensus-type of the ordering service: solo (default), kafka, or etcdraft
    // 指定排序服务使用的共识机制:solo(默认),kafka,或者etcdraft
    -i  - the tag to be used to launch the network (defaults to "latest")
    // 用于启动网络的版本(默认是“最新”) 
    -v - verbose mode   // 详细模式
  byfn.sh -h (print this message)

Typically, one would first generate the required certificates and 
genesis block, then bring up the network. e.g.:
   // 生成所需的证书和创世区块,设置的通道名称为mychannel
	byfn.sh generate -c mychannel 
   // 启动mychannel网络,使用的数据库为couchdb 
	byfn.sh up -c mychannel -s couchdb
       // 在上面的基础上,指定了启动网络的fabric的版本号
        byfn.sh up -c mychannel -s couchdb -i 1.4.0
    // 启动网络,编写链码的语言是node
	byfn.sh up -l node
    // 关闭网络
	byfn.sh down -c mychannel
       // 将网络从1.3.x升级到1.4.0
        byfn.sh upgrade -c mychannel

Taking all defaults:
	byfn.sh generate
	byfn.sh up
	byfn.sh down

(1)生成所需的证书,并创建创世区块

sudo ./byfn.sh generate -c yuan 

(2)启动网络

sudo ./byfn.sh up -c yuan

运行结果如下:

Starting for channel 'yuan' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
LOCAL_VERSION=1.4.1
DOCKER_IMAGE_VERSION=1.4.1
Creating network "net_byfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.org1.example.com" with default driver
Creating volume "net_peer1.org1.example.com" with default driver
Creating volume "net_peer0.org2.example.com" with default driver
Creating volume "net_peer1.org2.example.com" with default driver
Creating peer1.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating orderer.example.com    ... done
Creating peer1.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating cli                    ... done
CONTAINER ID        IMAGE                               COMMAND             CREATED             STATUS                    PORTS                      NAMES
b5f3e635b02e        hyperledger/fabric-tools:latest     "/bin/bash"         3 seconds ago       Up Less than a second                                cli
3cdfdd11858e        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:7051->7051/tcp     peer0.org1.example.com
75d8b85a229c        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:10051->10051/tcp   peer1.org2.example.com
29aaf8c1816a        hyperledger/fabric-orderer:latest   "orderer"           10 seconds ago      Up 2 seconds              0.0.0.0:7050->7050/tcp     orderer.example.com
1b7522769f77        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:8051->8051/tcp     peer1.org1.example.com
2b1eb5ed28bf        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:9051->9051/tcp     peer0.org2.example.com
a0d59b8ce754        hello-world                         "/hello"            11 hours ago        Exited (0) 11 hours ago                              jolly_nobel

 ____    _____      _      ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  
 ___) |   | |    / ___ \  |  _ <    | |  
|____/    |_|   /_/   \_\ |_| \_\   |_|  

Build your first network (BYFN) end-to-end test

Channel name : yuan
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c yuan -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2019-06-19 13:54:40.946 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:41.119 UTC [cli.common] readBlock -> INFO 002 Received block: 0
===================== Channel 'yuan' created ===================== 

Having all peers join the channel...
+ peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:41.322 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:41.787 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org1 joined channel 'yuan' ===================== 

+ peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:44.887 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:45.338 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org1 joined channel 'yuan' ===================== 

+ peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:48.426 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:48.886 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org2 joined channel 'yuan' ===================== 

+ peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:52.001 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:52.444 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org2 joined channel 'yuan' ===================== 

Updating anchor peers for org1...
+ peer channel update -o orderer.example.com:7050 -c yuan -f ./channel-artifacts/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2019-06-19 13:54:55.557 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:55.572 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org1MSP' on channel 'yuan' ===================== 

Updating anchor peers for org2...
+ peer channel update -o orderer.example.com:7050 -c yuan -f ./channel-artifacts/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2019-06-19 13:54:58.665 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:58.677 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org2MSP' on channel 'yuan' ===================== 

Installing chaincode on peer0.org1...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2019-06-19 13:55:01.798 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:55:01.798 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-06-19 13:55:04.602 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response: 
===================== Chaincode is installed on peer0.org1 ===================== 

Install chaincode on peer0.org2...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2019-06-19 13:55:04.897 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:55:04.897 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-06-19 13:55:05.040 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response: 
===================== Chaincode is installed on peer0.org2 ===================== 

Instantiating chaincode on peer0.org2...
+ peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C yuan -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
+ res=0
+ set +x
2019-06-19 13:55:05.107 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:55:05.107 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
===================== Chaincode is instantiated on peer0.org2 on channel 'yuan' ===================== 

Querying chaincode on peer0.org1...
===================== Querying on peer0.org1 on channel 'yuan'... ===================== 
Attempting to Query peer0.org1 ...3 secs
+ peer chaincode query -C yuan -n mycc -c '{"Args":["query","a"]}'
+ res=0
+ set +x

100
===================== Query successful on peer0.org1 on channel 'yuan' ===================== 
Sending invoke transaction on peer0.org1 peer0.org2...
+ peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C yuan -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'
+ res=0
+ set +x
2019-06-19 13:56:03.011 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200 
===================== Invoke transaction successful on peer0.org1 peer0.org2 on channel 'yuan' ===================== 

Installing chaincode on peer1.org2...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2019-06-19 13:56:03.093 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:56:03.093 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-06-19 13:56:03.385 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response: 
===================== Chaincode is installed on peer1.org2 ===================== 

Querying chaincode on peer1.org2...
===================== Querying on peer1.org2 on channel 'yuan'... ===================== 
+ peer chaincode query -C yuan -n mycc -c '{"Args":["query","a"]}'
Attempting to Query peer1.org2 ...3 secs
+ res=0
+ set +x

90
===================== Query successful on peer1.org2 on channel 'yuan' ===================== 

========= All GOOD, BYFN execution completed =========== 


 _____   _   _   ____   
| ____| | \ | | |  _ \  
|  _|   |  \| | | | | | 
| |___  | |\  | | |_| | 
|_____| |_| \_| |____/  

(3)查看节点的启动情况

sudo docker ps

查询结果如下:

CONTAINER ID        IMAGE                                                                                                  COMMAND                  CREATED             STATUS              PORTS                      NAMES
d2978de47b60        dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab   "chaincode -peer.add…"   39 minutes ago      Up 39 minutes                                  dev-peer1.org2.example.com-mycc-1.0
30bde37b9283        dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9   "chaincode -peer.add…"   39 minutes ago      Up 39 minutes                                  dev-peer0.org1.example.com-mycc-1.0
eccc23cb6774        dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b   "chaincode -peer.add…"   39 minutes ago      Up 39 minutes                                  dev-peer0.org2.example.com-mycc-1.0
b5f3e635b02e        hyperledger/fabric-tools:latest                                                                        "/bin/bash"              40 minutes ago      Up 40 minutes                                  cli
3cdfdd11858e        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:7051->7051/tcp     peer0.org1.example.com
75d8b85a229c        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:10051->10051/tcp   peer1.org2.example.com
29aaf8c1816a        hyperledger/fabric-orderer:latest                                                                      "orderer"                41 minutes ago      Up 40 minutes       0.0.0.0:7050->7050/tcp     orderer.example.com
1b7522769f77        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:8051->8051/tcp     peer1.org1.example.com
2b1eb5ed28bf        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:9051->9051/tcp     peer0.org2.example.com

(4)关闭网络

sudo ./byfn.sh down

运行效果如下:

Stopping for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
Stopping cli                    ... done
Stopping peer0.org1.example.com ... done
Stopping peer1.org2.example.com ... done
Stopping orderer.example.com    ... done
Stopping peer1.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Removing cli                    ... done
Removing peer0.org1.example.com ... done
Removing peer1.org2.example.com ... done
Removing orderer.example.com    ... done
Removing peer1.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing network net_byfn
Removing volume net_orderer.example.com
Removing volume net_peer0.org1.example.com
Removing volume net_peer1.org1.example.com
Removing volume net_peer0.org2.example.com
Removing volume net_peer1.org2.example.com
Removing volume net_orderer2.example.com
WARNING: Volume net_orderer2.example.com not found.
Removing volume net_orderer3.example.com
WARNING: Volume net_orderer3.example.com not found.
Removing volume net_orderer4.example.com
WARNING: Volume net_orderer4.example.com not found.
Removing volume net_orderer5.example.com
WARNING: Volume net_orderer5.example.com not found.
Removing volume net_peer0.org3.example.com
WARNING: Volume net_peer0.org3.example.com not found.
Removing volume net_peer1.org3.example.com
WARNING: Volume net_peer1.org3.example.com not found.
d2978de47b60
30bde37b9283
eccc23cb6774
Untagged: dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab:latest
Deleted: sha256:533a6db1467da2888f3fbff3666920e450957fa6a95c23d6fb3839462d2e5ecf
Deleted: sha256:0b127d65857aa7fbe7d1bbfe098a041141bcc791f243f6ccfbec19f0bb2cb324
Deleted: sha256:1e0be3d2fc236f8e568a116be14705c3b41fc0330e3653cfba8b25bfd9e3b702
Deleted: sha256:142c050eac5fb3c21f5dab6536c3ea7a3d96eaab314ba22819a1ba4cfbe00066
Untagged: dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9:latest
Deleted: sha256:cb6aec8062eb1a02d5f698fbea4fb53a1b4115c75d1a4968a490b9246613cb05
Deleted: sha256:52a7dccd290a2c1e05c3b6faa8cb70030fe9e7588baa6291cdc0c0b8587de159
Deleted: sha256:efc19260ba27dbb9f117a33ce615dfb9da1e7c5d5a1637002b61d91b6c788cf4
Deleted: sha256:0b86ec02d55b1029ff171fa52ea7340afe22d6f4ff18edfbdc77f95ff0cfe08b
Untagged: dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b:latest
Deleted: sha256:15b4e2d6ebddb10bce3e2b3fdc9948c68b7de567f3a35d9c25bf5da0dc78b9c1
Deleted: sha256:f732302d2be7f49c8d8dcce1c8e866cfd100d7548db07c35dacf78cedc33ebd7
Deleted: sha256:ff0a6362b69c5f1b07192690800049f1e6f728d635a3be3ede54b0fbfe4736d4
Deleted: sha256:655f67c3288e29d6ebda1fb2d0dec9c018602eb33af32de247f2f7f501b90dfe

至此,我们通过官方提供的first-network快速地构建了一个hyperledger fabric网络,也算是尝了鲜!万里长征,我们跨出了第一步,但是革命尚未成功,我们还需继续努力!加油!

参考:

  1. 搭建HyperLedger Fabric1.2.0开发环境
  2. Hyperledger Fabric环境搭建
  3. centos7安装配置Hyperledger fabric1.4.0
  4. Building Your First Network

你可能感兴趣的:(Hyperledger,Fabric)