在本地计算机设置上没有Docker的Hyperledger Fabric [英] Hyperledger Fabric without Docker on Local Machine Setup

查看:145
本文介绍了在本地计算机设置上没有Docker的Hyperledger Fabric的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Hyperledger Fabric的新手。我需要在本地计算机上设置Hypeledger Fabric开发环境(Ubuntu 16)。 将Fabric进行码头化后,我想知道如何在本地计算机上进行设置。我曾尝试搜索一种教程,但没有一个。



我正在制作一个生产级项目,所以我不能依赖Docker,请指导我进行本地计算机设置(与docker独立)。

超级目录结构文档非常易于使用,但是它不提供有关在本地设置环境的信息。先前关于堆栈溢出的问题没有达到我的目的。

解决方案

基于以下 Fabric 教程,您可以从shell脚本和docker-compose文件中提取这些命令,然后运行它们



首先,您必须具有两个配置文件: crypto-config.yaml configtx.yaml 。您可以在目录中找到它们: fabric-samples / first-network /



使用 crypto-config.yaml 生成公共密钥,私钥,证书等。



使用 configtx。 yaml 文件生成创世记块,依此类推。



您可以使用<$ c手动生成证书/密钥和各种配置工件$ c> configtxgen 和 cryptogen 命令。



1)

 #cryptogen generate --config =。/ crypto-config.yaml 

2)

 #export FABRIC_CFG_PATH = $ PWD 
#mkdir channel-artifacts
#configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
#export CHANNEL_NAME = mychannel
#configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel .tx -channelID $ CHANNEL_NAME
#configtxgen -profile TwoOrgsChannel -outp utAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID $ CHANNEL_NAME -asOrg Org1MSP
#configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID $ CHANNEL_NAME code>

3)配置 orderer.yaml core .yaml ,您可以从



4)使用真实密钥和证书更新这两个文件。



5)

 #订购者开始

6)

 #导出集FABRIC_CFG_PATH = $ {PWD} 
#对等节点开始>> peerlog.log 2>& 1&

到目前为止,结构网络已打开。然后,您可以创建&加入频道或进行其他操作。



如果对此有任何疑问,请告诉我。祝你好运。


I am new to Hyperledger Fabric. I need to set up the Hypeledger Fabric development environment on my local machine (Ubuntu 16). As Fabric is dockerized, I want to know how can I set it up on my local machine. I have tried searching for a tutorial but there isn't one.

I am making a production level project so I cannot rely on Docker, please guide me on local machine setup (docker independent).

Hyperledger Fabric documentation is very user-friendly however it does not provide information on setting environments locally. Previous questions on Stack Overflow are not serving my purpose.

解决方案

Based on this Fabric tutorial, you can extract these commands from shell script and docker-compose file, then run them on your local machine.

First, you must have two config files: crypto-config.yaml and configtx.yaml. You can find them on the directory: fabric-samples/first-network/

Using crypto-config.yaml to generate the public key, private key, certificate and etc.

Consuming configtx.yaml file to generate genesis block and so on.

You can manually generate the certificates/keys and the various configuration artifacts using the configtxgen and cryptogen commands.

1)

# cryptogen generate --config=./crypto-config.yaml

2)

# export FABRIC_CFG_PATH=$PWD
# mkdir channel-artifacts
# configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
# export CHANNEL_NAME=mychannel
# configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME
# configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP
# configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org2MSP

3) configure orderer.yaml and core.yaml, you can get it from this

4) update these two file with real keys and certs.

5)

# orderer start

6)

# export set FABRIC_CFG_PATH = ${PWD}
# peer node start >> peerlog.log 2>&1 &

Up to now, the fabric network is on. Then you can create & join channel, or do other operations.

If you have any confision about this, let me know. Good luck.

这篇关于在本地计算机设置上没有Docker的Hyperledger Fabric的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆