HyperLeDger织物部署在VM上

发布于 2025-02-11 23:29:40 字数 1481 浏览 0 评论 0 原文

我是Hyperledger面料的新手。

我只是在跟进此 docs GCP,现在我感到困惑。

  1. 同行是指一个VM吗?

  2. 如何为许多VM编写配置文件?

  3. 如果上述问题是正确的,我该如何配置它们以传达这些VM成为HyperLeDger Fabric Brabein网络?

我应该编辑 /ett /hont此文件以了解哪个vm上的主机名?


更新:

我一直在尝试创建一个自定义网络。我总是会遇到这个错误,

Fatal error when initializing core config : error when reading core config file: Config File "core" Not Found in "[/etc/hyperledger/peercfg]"

这是我的脚本

ROOTDIR=$(cd "$(dirname "$0")" && pwd)
export PATH=${ROOTDIR}/../bin:${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=${PWD}/configtx
export VERBOSE=false

pushd ${ROOTDIR} > /dev/null
trap "popd > /dev/null" EXIT

cryptogen generate --config=./organizations/cryptogen/crypto-config-org1.yaml --output="organizations"



: ${CONTAINER_CLI:="docker"}
: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"}

COMPOSE_FILE_BASE=compose-test-net.yaml


SOCK="${DOCKER_HOST:-/var/run/docker.sock}"
DOCKER_SOCK="${SOCK##unix://}"
COMPOSE_FILES="-f compose/${COMPOSE_FILE_BASE} -f compose/${CONTAINER_CLI}/${CONTAINER_CLI}-${COMPOSE_FILE_BASE}"
DOCKER_SOCK="${DOCKER_SOCK}" ${CONTAINER_CLI_COMPOSE} ${COMPOSE_FILES} up -d 2>&1
$CONTAINER_CLI ps -a

echo "${DOCKER_SOCK}" ${CONTAINER_CLI_COMPOSE} ${COMPOSE_FILES} up -d 2>&1

I'm new to hyperledger fabric.

I am just following up on this docs to deploy on one VM in GCP, now I got confused.

  1. Does the peer mean one VM?

  2. How to write the config file for many VMs?

  3. If the above question is true, how do I config them to communicate those VMs to become a Hyperledger Fabric blockchain network?

Should I edit /etc/hosts this file to know what hostname on what VM?


Update:

I've been trying to create a custom network. And I always got this error

Fatal error when initializing core config : error when reading core config file: Config File "core" Not Found in "[/etc/hyperledger/peercfg]"

Here is my script

ROOTDIR=$(cd "$(dirname "$0")" && pwd)
export PATH=${ROOTDIR}/../bin:${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=${PWD}/configtx
export VERBOSE=false

pushd ${ROOTDIR} > /dev/null
trap "popd > /dev/null" EXIT

cryptogen generate --config=./organizations/cryptogen/crypto-config-org1.yaml --output="organizations"



: ${CONTAINER_CLI:="docker"}
: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"}

COMPOSE_FILE_BASE=compose-test-net.yaml


SOCK="${DOCKER_HOST:-/var/run/docker.sock}"
DOCKER_SOCK="${SOCK##unix://}"
COMPOSE_FILES="-f compose/${COMPOSE_FILE_BASE} -f compose/${CONTAINER_CLI}/${CONTAINER_CLI}-${COMPOSE_FILE_BASE}"
DOCKER_SOCK="${DOCKER_SOCK}" ${CONTAINER_CLI_COMPOSE} ${COMPOSE_FILES} up -d 2>&1
$CONTAINER_CLI ps -a

echo "${DOCKER_SOCK}" ${CONTAINER_CLI_COMPOSE} ${COMPOSE_FILES} up -d 2>&1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北城孤痞 2025-02-18 23:29:45
  1. 是的。 Docker容器是运行HyperLeDger Peer,Orderer等的推荐方法,尽管可以在没有Docker的情况下在本机上运行组件。官方文档中提供的示例网络在单个主机机器中使用多个Docker容器来进行测试。在生产N/W中,所有这些组件都将在不同的VM实例中。
  2. 可以在YAML文件或环境变量中提供配置。
  3. 此需要配置在多个级别上进行更改,例如Channel Configuration(ConfigTx.YAML),订购器和PEER配置,八卦配置,宿主名称更改对等证书,订单,订购器等。 =“ https://hyperledger-fabric.readthedocs.io/en/release-2.2/deployment_guide_overview.html#step-five-deploy-deploy-peers-peers-peers-and ordoring-nodes” >。由于您是面料的新手,因此我建议您查看织物示例在设计n/w之前。
  1. Yes. Docker container is the recommended way to run Hyperledger peer, orderer etc, although it is possible to run components natively without docker. The sample network provided in official documentation uses multiple docker containers in a single host machine for testing purpose. In a production n/w, all these components will be in different vm instances.
  2. Configuration can be provided either in yaml file or as environment variables. Deploy peers and ordering nodes
  3. This needs configuration change at multiple levels like channel configuration(configtx.yaml), orderer and peer configuration, gossip configuration, hostname change in the certificates of peer,orderer etc. An overview is available in official documentation. Since you are new to fabric, I would recommend to have a look at the sample n/w provided in fabric-samples before designing your n/w.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文