Skip to content

Commit

Permalink
Merge pull request #223 from WeBankBlockchain/lab-dev
Browse files Browse the repository at this point in the history
Lab-rc2 to lab
  • Loading branch information
eveagle authored May 9, 2022
2 parents ec2c8f9 + 3b6cb3c commit d42a7be
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
中文|[English](README-en.md)

[![Code Lines](https://tokei.rs/b1/github/WeBankBlockchain/WeBASE?category=code)](https://github.com/WeBankFinTech/WeBASE)
[![Code Lines](https://tokei.rs/b1/github/WeBankBlockchain/WeBASE?category=code)](https://github.com/WeBankBlockchain/WeBASE)

![image](https://webasedoc.readthedocs.io/zh_CN/lab/_images/logo.jpg)

Expand All @@ -15,6 +15,8 @@

**WBC-WeBASE一键部署**(FISCO BCOS + WeBASE-Front + WeBASE-Node-Manager + WeBASE-Sign + WeBASE-Web)可以参考[WBC-WeBASE一键部署文档](https://webasedoc.readthedocs.io/zh_CN/lab/docs/WeBASE/install.html)**WBC-WeBASE**整体结构设计与各子系统功能与安装部署的详细介绍,请参考[WBC-WeBASE在线文档](https://webasedoc.readthedocs.io/zh_CN/lab/index.html)

- **WeBASE lab版本**已适配**FISCO-BCOS 3.0.0**版本,相关文档与代码仓库可跳转至 [WeBASE-lab分支](https://webasedoc.readthedocs.io/zh_CN/lab)查看

## 各子系统简介
* **节点前置服务 [WeBASE-Front](https://github.com/WeBankBlockchain/WeBASE-Front)**
集成java-sdk,提供restful风格的接口,客户端可以使用http的形式和节点进行交互,内置内存数据库,采集节点健康度数据。内置web控制台,实现节点的可视化、合约部署IDE等功能。
Expand Down
24 changes: 22 additions & 2 deletions deploy/comm/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ def installNode(docker_mode=False):
fisco_version = getCommProperties("fisco.version")
node_counts = getCommProperties("node.counts")
encrypt_type = int(getCommProperties("encrypt.type"))

use_liquid = int(getCommProperties("fisco.wasm"))
enable_auth = int(getCommProperties("fisco.auth"))

node_nums = 2
if node_counts != "nodeCounts":
node_nums = int(node_counts)
Expand Down Expand Up @@ -188,6 +190,11 @@ def installNode(docker_mode=False):
# guomi
if encrypt_type == 1:
buildComm = buildComm + " -s"
# use wasm
if use_liquid == 1:
buildComm = buildComm + " -w"
if enable_auth == 1:
buildComm = buildComm + " -A"
os.system(buildComm)
else:
info = "n"
Expand All @@ -202,6 +209,11 @@ def installNode(docker_mode=False):
# guomi
if encrypt_type == 1:
buildComm = buildComm + " -s"
# use wasm
if use_liquid == 1:
buildComm = buildComm + " -w"
if enable_auth == 1:
buildComm = buildComm + " -A"
os.system(buildComm)
log.info(buildComm)
startNode()
Expand Down Expand Up @@ -506,6 +518,10 @@ def changeFrontConfig():
frontDb = getCommProperties("front.h2.name")
encrypt_type = int(getCommProperties("encrypt.type"))
if_exist_fisco = getCommProperties("if.exist.fisco")
node_counts = getCommProperties("node.counts")
node_nums = 2
if node_counts != "nodeCounts":
node_nums = int(node_counts)
# init file
server_dir = currentDir + "/webase-front/conf"
Expand All @@ -518,8 +534,12 @@ def changeFrontConfig():
doCmd('sed -i "s/5002/{}/g" {}/application.yml'.format(frontPort, server_dir))
if if_exist_fisco == "no":
doCmd('sed -i "s/127.0.0.1:20200/{}:{}/g" {}/application.yml'.format(nodeListenIp, nodeRpcPort, server_dir))
doCmd('sed -i "s/127.0.0.1:20201/{}:{}/g" {}/application.yml'.format(nodeListenIp, nodeRpcPort+1, server_dir))
if node_nums != 1:
doCmd('sed -i "s/127.0.0.1:20201/{}:{}/g" {}/application.yml'.format(nodeListenIp, nodeRpcPort+1, server_dir))
else:
# 尝试设置单个节点的配置文件为.properties配置的内容
doCmd('sed -i "s%\[\'127.0.0.1:20200\'\]%{}%" {}/application.yml'.format(nodeRpcPeers, server_dir))
# 尝试设置两个节点的配置文件为.properties配置的内容
doCmd('sed -i "s%\[\'127.0.0.1:20200\',\'127.0.0.1:20201\'\]%{}%" {}/application.yml'.format(nodeRpcPeers, server_dir))
if encrypt_type == 1:
doCmd('sed -i "s%useSmSsl: false%useSmSsl: true%g" {}/application.yml'.format(server_dir))
Expand Down
19 changes: 14 additions & 5 deletions deploy/common.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[common]
# Webase Subsystem Version (lab-rc1)
webase.web.version=lab-rc1
webase.mgr.version=lab-rc1
webase.sign.version=lab-rc1
webase.front.version=lab-rc1
webase.web.version=lab-rc2
webase.mgr.version=lab-rc2
webase.sign.version=lab-rc2
webase.front.version=lab-rc2

# Mysql database configuration of WeBASE-Node-Manager
mysql.ip=localhost
Expand Down Expand Up @@ -35,6 +35,7 @@ front.port=5002
sign.port=5004

# sdk ssl encrypt type (0: standard ssl, 1: sm ssl)
# if use sm ssl, fisco bcos would use sm as encrypt type and ssl type
encrypt.type=0

# Use existing chain or not (yes/no)
Expand All @@ -49,9 +50,17 @@ node.rpcPort=20200
# Node p2p service port
node.p2pPort=30300
# Fisco-bcos version(v3.0.0 or above)
fisco.version=v3.0.0-rc1
fisco.version=v3.0.0-rc2
# Number of building nodes (default value: 2)
node.counts=nodeCounts
# whether air version fisco bcos use liquid(wasm), default solidity
# if use liquid, require configure liquid in the host of webase-front
# [0: solidity, 1: liquid]
fisco.wasm=0
# whether enable permission control, default disabled
# if enable, default generate one random admin private key in 'webase-deploy/nodes/ca' directory
# [0: disabled, 1: enable]
fisco.auth=0

### if using existing chain, [if.exist.fisco=yes]
# Configuration required when using existing chain
Expand Down
2 changes: 1 addition & 1 deletion release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lab-rc1
lab-rc2

0 comments on commit d42a7be

Please sign in to comment.