首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >超分类器织物探索者-码头组成库伯奈特

超分类器织物探索者-码头组成库伯奈特
EN

Stack Overflow用户
提问于 2022-02-16 18:30:10
回答 1查看 156关注 0票数 1

我有一个基于工作对接的安装-对等程序,订单和浏览器(db & app),我的目标是部署在上。

对于对等程序和排序器,我使用了对接器映像并创建了Kubernetes yaml文件(StatefulSet、Service、NodePort和I)来部署在kubernetes上。

对于资源管理器,我有下面的停靠-合成文件,这取决于我的本地连接配置文件和密码文件。

我正努力在kubernetes上部署探险者,并寻求有关方法的建议。

  1. 我已经尝试转换对接-撰写使用Kompose但面临的问题,同时翻译网络和健康检查标签。
  2. 我尝试从超级分类法/资源管理器-db:最新和超级分类器/资源管理器:最新,但再次指定网络成为一个问题,从超级分类器-映像(Dockerfile - multiple )。

有关于如何在集群中部署资源管理器的建议或示例吗?

谢谢

资源管理器Docker组成

代码语言:javascript
复制
version: '2.1'

volumes:
  pgdata:
  walletstore:

networks:
  mynetwork.com:
    external:
      name: my-netywork

services:

  explorerdb.mynetwork.com:
    image: hyperledger/explorer-db:latest
    container_name: explorerdb.mynetwork.com
    hostname: explorerdb.mynetwork.com
    environment:
      - DATABASE_DATABASE=fabricexplorer
      - DATABASE_USERNAME=hppoc
      - DATABASE_PASSWORD=password
    healthcheck:
      test: "pg_isready -h localhost -p 5432 -q -U postgres"
      interval: 30s
      timeout: 10s
      retries: 5
    volumes:
      - pgdata:/var/lib/postgresql/data
    networks:
      - mynetwork.com

  explorer.mynetwork.com:
    image: hyperledger/explorer:latest
    container_name: explorer.mynetwork.com
    hostname: explorer.mynetwork.com
    environment:
      - DATABASE_HOST=explorerdb.mynetwork.com
      - DATABASE_DATABASE=fabricexplorer
      - DATABASE_USERNAME=hppoc
      - DATABASE_PASSWD=password
      - LOG_LEVEL_APP=info
      - LOG_LEVEL_DB=info
      - LOG_LEVEL_CONSOLE=debug
      - LOG_CONSOLE_STDOUT=true
      - DISCOVERY_AS_LOCALHOST=false
    volumes:
      - ./config.json:/opt/explorer/app/platform/fabric/config.json
      - ./connection-profile:/opt/explorer/app/platform/fabric/connection-profile
      - ../config/crypto-config:/tmp/crypto
      - walletstore:/opt/explorer/wallet
    ports:
      - 8080:8080
    depends_on:
      explorerdb.mynetwork.com:
        condition: service_healthy
    networks:
      - mynetwork.com

资源管理器文档文件-多来自

代码语言:javascript
复制
# Updated to Fabric 2.x
#1. Docker file for setting up the Orderer
# FROM hyperledger/fabric-orderer:1.4.2
FROM hyperledger/explorer-db:latest


ENV DATABASE_DATABASE=fabricexplorer
ENV DATABASE_USERNAME=hppoc
ENV DATABASE_PASSWORD=password

FROM hyperledger/explorer:latest


COPY ./config/explorer/. /opt/explorer/
COPY ./config/crypto-config/. /tmp/crypto

ENV DATABASE_HOST=explorerdb.xxx.com
ENV DATABASE_DATABASE=fabricexplorer
ENV DATABASE_USERNAME=hppoc
ENV DATABASE_PASSWD=password
ENV LOG_LEVEL_APP=info
ENV LOG_LEVEL_DB=info
ENV LOG_LEVEL_CONSOLE=debug
ENV LOG_CONSOLE_STDOUT=true
ENV DISCOVERY_AS_LOCALHOST=false

ENV DISCOVERY_AS_LOCALHOST=false
# ENV EXPLORER_APP_ROOT=${EXPLORER_APP_ROOT:-dist}
# ENV ${EXPLORER_APP_ROOT}/main.js name - hyperledger-explorer
ENTRYPOINT ["tail", "-f", "/dev/null"]
EN

回答 1

Stack Overflow用户

发布于 2022-02-17 00:46:02

此设置有两组必需的步骤。我测试过的一个是:

1.创建K8s集群

2.将集群与云外壳连接起来

3.克隆这个存储库

代码语言:javascript
复制
git clone https://github.com/acloudfan/HLF-K8s-Cloud.git

4.设置存储类

代码语言:javascript
复制
cd HLF-K8s-Cloud/gcp kubectl apply -f . This will setup the storage class

5.启动Acme订单程序

代码语言:javascript
复制
cd .. kubectl apply -f ./k8s-acme-orderer.yaml Check the logs for 'acme-orderer-0' to ensure there is no error

6.启动Acme Peer

代码语言:javascript
复制
kubectl apply -f ./k8s-acme-peer.yaml Check the logs for 'acme-peer-0' to ensure there is no error

7.建立频道,并与之连接。

代码语言:javascript
复制
kubectl exec -it acme-peer-0 /bin/bash ./submit-channel-create.sh
 
./join-channel.sh

确保对等方已加入该通道

代码语言:javascript
复制
peer channel list
 
exit

8.启动预算伙伴并将其加入频道

代码语言:javascript
复制
kubectl apply -f ./k8s-budget-peer.yaml Wait for the container to launch & check the logs for errors



kubectl exec -it budget-peer-0 /bin/bash ./fetch-channel-block.sh ./join-channel.sh

确保对等方已加入该通道

代码语言:javascript
复制
peer channel list
 
exit ** At this point your K8s Fabric Network is up **

验证网络

1.安装并实例化测试链代码

代码语言:javascript
复制
kubectl exec -it acme-peer-0 /bin/bash



./cc-test.sh install ./cc-test.sh instantiate

2.调用/查询链码以查看a/b值的变化

代码语言:javascript
复制
./cc-test.sh query ./cc-test.sh invoke

3.检查预算同行中的值

代码语言:javascript
复制
kubectl exec -it acme-peer-0 /bin/bash



./cc-test.sh install



./cc-test.sh query The query should return the same values as you see in acme-peer Execute invoke/query in both peers to validate

此外,您还可以访问以下线程,查看选项2和有关设置环境基于GKE的生产网络HLF-K8s-云Google Kubernetes引擎上超分类器结构块链的部署超级分类账/织物同行的适当步骤的更多引用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71147402

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档