agent-backend/cmconfig.readme.md

80 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2021-11-05 02:29:30 +00:00
# 配置项
2022-11-29 07:14:58 +00:00
## 示例格式
2022-11-29 07:14:58 +00:00
```json
{
2022-11-29 07:14:58 +00:00
"cmi": "",
"debug": "",
"disableDoRepo": false,
"disableLocalLhs": false,
"doipCertPath": "",
"doipLhsAddress": "",
"doipPort": -1,
"doipUserHandle": "",
"enableEventPersistence": false,
"enableSsl": "./ssl/chained.pem:./ssl/domain.pem",
"ip": "127.0.0.1",
"isLAN": true,
"overwrite": false,
"servicePort": 21030,
"textFileSuffixes": ".yjs,.json,.txt,.css,.js,.html,.md,.conf,.csv",
"withBdledgerClient": "./runnable/bdledger_mac",
"withBdledgerServer": false,
"consistencyPlugins": "./libs/custom-plugin.jar",
"startContract": [],
"datachainConf": "021.node.internetapi.cn:21121"
}
```
2022-11-29 07:14:58 +00:00
## consistencyPlugins 配置
2022-11-29 07:14:58 +00:00
下述四项插件使用字符串分割如需添加多项以逗号分隔在cmconfig.json里修改如:
2022-11-29 07:14:58 +00:00
``````
"consistencyPlugins": "xxx/xxx.jar,xxx/xxx.jar"
``````
2022-11-29 07:14:58 +00:00
## 通讯插件配置
2022-11-29 07:14:58 +00:00
下述四项插件使用字符串分割如需添加多项在cmconfig.json里修改如:
2022-11-29 07:14:58 +00:00
2021-11-05 06:42:20 +00:00
``````
"wsPluginActions": "org.bdware.metering.MeteringAction"
``````
2022-11-29 07:14:58 +00:00
1. wsPluginActions: WS端,包括contractManagerFrameHandler和CMHttpHandler
2. clientToAgentPlugins: client -> cluster 包括MasterClientFrameHandler
3. clientToClusterPlugins:[], client -> NodeCenterClientHandler
4. tcpPlugins:tcp 包括TcpserverFrameHandler
## startContract配置说明
2022-11-29 07:14:58 +00:00
其中startConfig.json为json数组结构格式如下
2022-11-29 07:14:58 +00:00
```json
[
{
"path": "./BDWareProjectDir/publicCompiled/xxx.ypk",
"owner": "",
2022-11-29 07:14:58 +00:00
"killBeforeStart": "",
"createParam": {}
},
{
2022-11-29 07:14:58 +00:00
}
]
2022-11-29 07:14:58 +00:00
```
path为必填配置项。表示启动的ypk的路径。
owner为可选配置不填时使用NodeManger的key作为Owner。
2022-11-29 07:14:58 +00:00
killBeforeStart为可选配置填写kill的合约名称。
createParam为可选配置。表示合约的启动参数。
2022-11-29 07:14:58 +00:00
## datachainConf 配置说明
2022-11-29 07:14:58 +00:00
1.针对Window Docker/Mac Docker
可使用`"datachainConf":"host.docker.internal:2401"`进行配置。
2.针对Linux Docker可通过查看`docker 0`的网卡IP进行设置。
如:`"datachainConf":"172.16.10.1:2401"`。
3.如果是在同一dockercompose.yml下启动可以使用
`"datachainConf":"bdledger:2401"`进行配置。