手动end-2-end测试
1.定义who is who,谁是谁
在fabric-sample里创建文件夹my-network
mkdir my-network
创建文件夹my-network
2.在my-network里创建文件crypto-config.yaml
touch crypto-config.yaml
vi crypto-config.yaml 键入下面的代码,然后按Esc按钮,再输入 “:wq”,保存退出
OrdererOrgs:
- Name: Orderer
Domain: example.com
Specs:
- Hostname: orderer
PeerOrgs:
- Name: Org1
Domain: Org1.example.com
Template:
Count: 2
Users:
Count: 1
- Name: Org2
Domain: Org2.example.com
Template:
Count: 2
Users:
Count: 1
image.png
image.png
export PATH=${PWD}/../bin:${PWD}:$PATH
cryptogen generate --config=./crypto-config.yaml
image.png
image.png
安装树
yum install tree
安装树
以树的形式查看文件
修改crypto-config.yaml,等下重新执行看看效果
OrdererOrgs:
- Name: Orderer
Domain: example.com
Specs:
- Hostname: orderer
- Name: Orderer2
Domain: example.com
Specs:
- Hostname: orderer2
PeerOrgs:
- Name: Org1
Domain: Org1.example.com
Template:
Count: 5
Users:
Count: 2
- Name: Org2
Domain: Org2.example.com
Template:
Count: 2
Users:
Count: 1
修改crypto-config.yaml文件
因为修改crypto-config.yaml文件,避免等下生成证书产生冲突,所以要提前删除crypto-config文件夹
rm -rf crypto-config
删除之前生成的crypto-config文件夹
image.png
3.创世区块创建和生成(Generating Orderer Genesis block)
cp configtx.yaml ../my-network/
把文件configtx.yaml拷贝到上级文件夹my-network
网友评论