Building Your First Network(构建你的第一个网络)

这些指令已经经过验证,可以在提供的tar文件中使用最新的稳定Docker映像和预编译的安装实用程序。如果您使用来自当前主分支的图像或工具运行这些命令,您可能会看到配置和紧急错误。

构建您的第一个网络(BYFN)场景提供了一个示例Hyperledger Fabric网络,该网络由两个组织组成,每个组织维护两个对等节点,以及一个“solo”模式的订购服务。

Install prerequisites(安装先决条件)

在我们开始之前,如果您还没有这样做,您可能希望检查您在开发区块链应用程序和/或操作Hyperledger Fabric的平台上安装了所有先决条件。

您还需要下载并安装Hyperledger Fabric Samples。 您会注意到fabric-samples存储库中包含许多样本。 我们将使用第一个网络样本。 我们现在打开那个子目录。

cd fabric-samples/first-network

本文档中提供的命令必须从fabric-samples存储库克隆的第一个网络子目录运行。 如果您选择从其他位置运行命令,则各种提供的脚本将无法找到二进制文件。

Want to run it now?(想现在运行吗?)

我们提供了一个完全注释的脚本 - byfn.sh--利用这些Docker镜像快速引导Hyperledger Fabric网络,该网络由代表两个不同组织的4个peer和一个orderer节点组成。 它还将启动一个容器来运行脚本执行,该执行将对等方连接到一个通道,部署和实例化链代码并根据部署的链码驱动事务执行。

这是byfn.sh脚本的帮助文本:

./byfn.sh --help Usage: byfn.sh up|down|restart|generate [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>] [-s <dbtype>] byfn.sh -h|--help (print this message) -m <mode> - one of 'up', 'down', 'restart' or 'generate' - '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 -c <channel name> - channel name to use (defaults to "mychannel") -t <timeout> - CLI timeout duration in seconds (defaults to 10) -d <delay> - delay duration in seconds (defaults to 3) -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml) -s <dbtype> - the database backend to use: goleveldb (default) or couchdb -l <language> - the chaincode language: golang (default) or node -a - don't ask for confirmation before proceeding Typically, one would first generate the required 

转载于:https://www.cnblogs.com/apolov-fabric/p/9300621.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值