花了小两天时间来尝试cello项目,这个项目可以解决fabric自动部署和一定程度运维管理的问题。

但结果不太好,项目最新发布版本0.9.0,正在开发1.0.0版本;

下载代码,将版本切到0.9.0,官方攻略写的很见到,就下载代码,make,启动;然而坑却非常之多。

https://hyperledger-cello.readthedocs.io/en/latest/setup/setup_master/

1号坑

setup很顺利,启动后user-dashboard报错,少config.passportOauth2.key 。

这个服务是入口服务,搞不定接下来都免谈,又是熟悉又不熟悉的nodejs,上网查了查,有一个哥们提了问,但是没有响应。

https://lists.hyperledger.org/g/cello/topic/egg_passport_oauth2_error_key/32582120?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,32582120

这里卡住之后首先想的是从技术方面解决,查了下这个报错,没有啥直观解答,还是算了,不想掉进nodejs的大坑。

2019-11-27 06:50:12,942 INFO 134 [egg-multipart] stream mode enable
/node_modules/egg/lib/application.js:70throw e;^
AssertionError [ERR_ASSERTION]: [egg-passport-oauth2] config.passportOauth2.key requiredat module.exports.app (/node_modules/egg-passport-oauth2/app.js:10:3)at Hook.configDidLoad (/node_modules/egg-core/lib/lifecycle.js:92:9)at Lifecycle.triggerConfigDidLoad (/node_modules/egg-core/lib/lifecycle.js:143:14)at Lifecycle.triggerConfigWillLoad (/node_modules/egg-core/lib/lifecycle.js:137:10)at AppWorkerLoader.loadCustomApp (/node_modules/egg-core/lib/loader/mixin/custom.js:37:20)at AppWorkerLoader.load (/node_modules/egg/lib/loader/app_worker_loader.js:33:10)at new Application (/node_modules/egg/lib/application.js:66:19)at Object.<anonymous> (/node_modules/egg-cluster/lib/app_worker.js:19:13)at Module._compile (module.js:643:30)at Object.Module._extensions..js (module.js:654:10)

看网上其他的安装攻略,顺利务必,但都是18年底19年初那会的,仔细看了下,发现有个make build-admin-js 的操作,官方文档没写,但是在dev模式下却有。

尝试执行,继续报错npm有问题,还是nodejs的事,查了查无果。

build-admin-js_1  |
build-admin-js_1  | > cello-operator@0.8.0 build /var/www/dashboard
build-admin-js_1  | > cross-env ESLINT=none roadhog build
build-admin-js_1  |
build-admin-js_1  | Failed to compile.
build-admin-js_1  |
build-admin-js_1  | Module not found: Error: Can't resolve '@babel/runtime/helpers/esm/extends' in '/node_modules/history/esm'
build-admin-js_1  |
build-admin-js_1  |
build-admin-js_1  | [graceful-process#25] exit with code:1
build-admin-js_1  | npm ERR! code ELIFECYCLE
build-admin-js_1  | npm ERR! errno 1
build-admin-js_1  | npm ERR! cello-operator@0.8.0 build: `cross-env ESLINT=none roadhog build`
build-admin-js_1  | npm ERR! Exit status 1
build-admin-js_1  | npm ERR!
build-admin-js_1  | npm ERR! Failed at the cello-operator@0.8.0 build script.
build-admin-js_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
build-admin-js_1  |
build-admin-js_1  | npm ERR! A complete log of this run can be found in:
build-admin-js_1  | npm ERR!     /root/.npm/_logs/2019-11-27T11_03_59_043Z-debug.log

此时查看了下镜像库,发现全是latest,攻略有的在setup前面加了版本号 v0.9.0;

我尝试了下,发现根本下载不下来,提示没有。到docker-hub上一看,发现只有latest的包,而且是自动根据master代码来打的,最新的是两天前,这不是坑么。而且最新的代码将user-dashboard和operator-dashboard进行了合并,这两个镜像已经不存在了,但是本地镜像库确实有这两个镜像,没太搞明白。

接下来决定尝试自己编译docker镜像,解决镜像和diamante版本不一致可能导致的问题。

接下来掉进二号坑

make docker执行一段时间后也报错,第一个baseimage都没通过,首先报一个目录不为空无法删除的错

Step 3/6 : RUN cd /tmp/baseimage &&     bash install.sh && rm -rf /tmp/baseimage---> Running in 2184df0fca72+ set -x
+ apt-get update
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7908 kB]
Get:5 http://deb.debian.org/debian buster-updates/main amd64 Packages [5792 B]
Get:6 http://security.debian.org/debian-security buster/updates/main amd64 Packages [158 kB]
Fetched 8279 kB in 4min 9s (33.2 kB/s)
Reading package lists...
+ apt-get install -y supervisor
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:python-meld3 python-pkg-resources
Suggested packages:python-setuptools supervisor-doc
The following NEW packages will be installed:python-meld3 python-pkg-resources supervisor
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 503 kB of archives.
After this operation, 2210 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 python-meld3 all 1.0.2-2 [37.3 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 python-pkg-resources all 40.8.0-1 [182 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 supervisor all 3.3.5-1 [284 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 503 kB in 3min 45s (2234 B/s)
Selecting previously unselected package python-meld3.
(Reading database ... 24526 files and directories currently installed.)
Preparing to unpack .../python-meld3_1.0.2-2_all.deb ...
Unpacking python-meld3 (1.0.2-2) ...
Selecting previously unselected package python-pkg-resources.
Preparing to unpack .../python-pkg-resources_40.8.0-1_all.deb ...
Unpacking python-pkg-resources (40.8.0-1) ...
Selecting previously unselected package supervisor.
Preparing to unpack .../supervisor_3.3.5-1_all.deb ...
Unpacking supervisor (3.3.5-1) ...
Setting up python-pkg-resources (40.8.0-1) ...
Setting up python-meld3 (1.0.2-2) ...
Setting up supervisor (3.3.5-1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
+ rm -rf /var/lib/apt/lists/auxfiles /var/lib/apt/lists/deb.debian.org_debian_dists_buster-updates_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_buster-updates_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/deb.debian.org_debian_dists_buster_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/lock /var/lib/apt/lists/partial /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_InRelease /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_main_binary-amd64_Packages.lz4
rm: cannot remove '/tmp/baseimage': Directory not empty
The command '/bin/sh -c cd /tmp/baseimage &&     bash install.sh && rm -rf /tmp/baseimage' returned anon-zero code: 1
make: *** [build/docker/baseimage/.x86_64-0.9.0-snapshot-b6a340d] 错误 1

感觉有点莫名其妙,但也没有办法,在docker文件里面删除这条命令后继续,到第五步又报pip安装依赖无法满足requirement文件的问题,我也是醉了,python也不熟。

本来到这基本就打住了,因为baseimage看起来是基础镜像,是其他服务需要依赖的;另辟蹊径修改Makefile单独编译user-dashboard服务,过程很漫长,下了很多包,最终这次单独打包成功了。

还没来得及运行,又试了下make start,user-dashboard服务竟然启动成功了,囧。

编译的同时也在找0.9.0镜像的其他渠道,发现dockerhub有三个个人编译的,试了下载量最大的handchain的,启动了下发现日志不太对劲,略过。https://hub.docker.com/r/handchain/cello-user-dashboard

启动成功后,又遇到新问题,好多资源加载不到,控制台console报错如下

Refused to apply style from 'http://172.16.31.122:8081/static/index.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.(index):18 GET http://172.16.31.122:8081/static/index.js net::ERR_ABORTED 404 (Not Found)

直接访问资源报404,到此耐心功力耗尽,还是等1.0.0版本吧,本来就不成熟,支持的fabric最大也就到1.2;目前faric已经release 1.4 ltm版本了。本来后续的区块链方案想基于开源升级,但看起来希望渺茫,技术栈差距太大了。1.0版本release再来看看吧

之所以花了这么长时间,是因为每个坑的操作都很耗时,一次尝试少则数分钟,多则几十分钟。尤其是node相关和docker相关,都要下载好多东西。

附官方地址

官方文档

https://hyperledger-cello.readthedocs.io/en/latest/setup/setup_master/

官方jira

https://jira.hyperledger.org/issues/?filter=-4

官方wiki

https://wiki.hyperledger.org/display/cello/Hyperledger+Cello

0.9版本部署介绍视频(远没有看上去这么轻松。。)

https://www.youtube.com/watch?v=3v_H9-JlBLw&feature=youtu.be

1.0前瞻视频

https://www.youtube.com/watch?v=mnZJEakWyOY

参考

https://blog.csdn.net/weixin_30883271/article/details/99760048

https://www.cnblogs.com/zooqkl/p/10945177.html

hyperledger cello 0.9.0 项目部署总结相关推荐

  1. wildfly-9.0.2 web项目部署详细步骤

    http://www.cnblogs.com/101key/p/5131546.html 一.配置操作系统环境变量 JAVA_HOME = C:\Program Files (x86)\Java\jd ...

  2. 区块链100讲:Hyperledger Cello简介

    Hyperledger Cello是超级账本项目下面的一个子项目,提供按需部署的功能,可以将区块链部署在各种裸机.虚拟机.容器等环境中.该项目最初由IBM发起,目前得到了Soramitsu, 华为,和 ...

  3. 若依RuoYi-Vue项目部署(前后端分离版本)

    一.简介 RuoYi是一个后台管理系统,基于经典技术组合(Spring Boot.Apache Shiro.MyBatis.Thymeleaf)主要目的让开发者注重专注业务,降低技术难度,从而节省人力 ...

  4. JSP_运维_JSP项目部署到server(适合0经验新手)

    实战:真正server端部署jsp项目经验总结与记录(完整过程从0到10适合对server端部署0经验新手) jsp+tomcat+mysql项目部署到真正server; servermysql安装; ...

  5. Ubuntu 18.04上进行HyperLedger Fabric 1.2.0环境及链码安装、部署和测试

    Ubuntu 18.04上进行HyperLedger Fabric 1.2.0环境及链码安装.部署和测试 1.环境安装 HyperLedger Fabric 1.2.0环境的安装推荐一篇博客:http ...

  6. 用Hyperledger cello的0.9.0-h3c分支创建一套区块链系统

    来源 | CSDN博客 作者 | rtxie 责编 | Jerry 本文介绍用hyperledger cello的0.9.0-h3c分支创建一套区块链系统的完整流程,希望对读者有所帮助. 环境准备工作 ...

  7. 如何将node项目部署到云服务器 从0开始详细步骤

    前言 记录一下将node项目部署到云服务器的详细步骤 先确保自己的node后台能在本地服务器运行 一.购买云服务器以及配置 这里我用的腾讯云的轻量应用服务器 针对新用户首单这里有个一折链接(便宜的一年 ...

  8. JSP_运维_JSP项目部署到服务器(适合0经验新手)

    实战:真正服务器端部署jsp项目经验总结与记录(完整过程从0到10适合对服务器端部署0经验新手) jsp+tomcat+mysql项目部署到真正服务器; 服务器mysql安装; 服务器jdk安装; 服 ...

  9. 深度学习目标检测(YoloV5)项目——从0开始到项目落地部署

    前言 训练和开发环境是win10,显卡RTX3080;cuda10.2,cudnn7.1;OpenCV4.5;yolov5用的是5s的模型,2020年8月13日的发布v3.0这个版本; ncnn版本是 ...

最新文章

  1. R语言dplyr包的slice函数提取数据集的数据行实战
  2. 关于$_SERVER['PHP_AUTH_USER']
  3. pycharm 修改成中文教程(图文简单记录)
  4. tensorboard出现OSError: [Errno 22] Invalid argument问题解决
  5. 104. Maximum Depth of Binary Tree 二叉树的最大深度
  6. Spring Boot + Mybatis多数据源和动态数据源配置
  7. 湖北省武汉科技大学计算机报名,湖北武汉科技大学第33次计算机等级考试报名通知...
  8. 如何在ubuntu下安装source insight
  9. Python的if判断与while循环
  10. 安卓手机投屏到win10电脑无需安装任何软件(电脑和手机必须连接同一网络或者wifi)【投影到此电脑灰色无法操作怎么办?】by qiweb 端午节
  11. django 框架 SQL 语句 查询篇
  12. 链路聚合Eth-Trunk
  13. C语言数组制作拼图游戏,C语言例子自制拼图游戏
  14. 点击按钮弹出单选列表对话框和加载Webview
  15. python批量修改替换文件内容
  16. 第七章:Paging添加header和footer
  17. git修改已提交的信息
  18. VisionPro(1) —— 简介
  19. [导入]收录Google公益广告的答案
  20. Flexsim物流配送中心系统仿真

热门文章

  1. elementui表格自定义序号
  2. NKOJ-Unknow 不死的 LYM
  3. 隐写术-PNG文件隐写(一)
  4. 微信开放平台绑定各移动应用、网站应用、公众号、小程序、第三方的个数
  5. Idea运行单元测试 Test framework quit unexpectedly
  6. 【空格】前后是非多,它能导致大故障,请看
  7. 关于AI+医疗的调研
  8. 学习安卓开发第七天【网格视图qq相册页面】【下拉;列表框】【下拉列表框实例】【列表视图】
  9. 【leetcode】377. 组合总和 Ⅳ(combination-sum-iv)(DP)[中等]
  10. 程序员的核心竞争力是什么?为什么?