Skip to content

Commit 0045c95

Browse files
author
xuguang
committed
Merge branch 'dev' of github.com:kingdomrushing/LogiKM into dev_v2.6.0
2 parents fdce41b + e1b2c44 commit 0045c95

File tree

76 files changed

+974
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+974
-545
lines changed

distribution/conf/application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ server:
1515
spring:
1616
application:
1717
name: kafkamanager
18+
version: @project.version@
1819
profiles:
1920
active: dev
2021
datasource:

distribution/conf/application.yml.example

Lines changed: 54 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ server:
1515
spring:
1616
application:
1717
name: kafkamanager
18+
version: @project.version@
1819
profiles:
1920
active: dev
2021
datasource:
@@ -26,7 +27,6 @@ spring:
2627
main:
2728
allow-bean-definition-overriding: true
2829

29-
3030
servlet:
3131
multipart:
3232
max-file-size: 100MB
@@ -36,37 +36,58 @@ logging:
3636
config: classpath:logback-spring.xml
3737

3838
custom:
39-
idc: cn # 部署的数据中心, 忽略该配置, 后续会进行删除
40-
jmx:
41-
max-conn: 10 # 2.3版本配置不在这个地方生效
39+
idc: cn
4240
store-metrics-task:
4341
community:
44-
broker-metrics-enabled: true # 社区部分broker metrics信息收集开关, 关闭之后metrics信息将不会进行收集及写DB
45-
topic-metrics-enabled: true # 社区部分topic的metrics信息收集开关, 关闭之后metrics信息将不会进行收集及写DB
46-
didi:
47-
app-topic-metrics-enabled: false # 滴滴埋入的指标, 社区AK不存在该指标,因此默认关闭
48-
topic-request-time-metrics-enabled: false # 滴滴埋入的指标, 社区AK不存在该指标,因此默认关闭
49-
topic-throttled-metrics-enabled: false # 滴滴埋入的指标, 社区AK不存在该指标,因此默认关闭
42+
topic-metrics-enabled: true
43+
didi: # 滴滴Kafka特有的指标
44+
app-topic-metrics-enabled: false
45+
topic-request-time-metrics-enabled: false
46+
topic-throttled-metrics-enabled: false
5047

51-
# 任务相关的开关
48+
# 任务相关的配置
5249
task:
5350
op:
54-
sync-topic-enabled: false # 未落盘的Topic定期同步到DB中
55-
order-auto-exec: # 工单自动化审批线程的开关
56-
topic-enabled: false # Topic工单自动化审批开关, false:关闭自动化审批, true:开启
57-
app-enabled: false # App工单自动化审批开关, false:关闭自动化审批, true:开启
51+
sync-topic-enabled: false # 未落盘的Topic定期同步到DB中
52+
order-auto-exec: # 工单自动化审批线程的开关
53+
topic-enabled: false # Topic工单自动化审批开关, false:关闭自动化审批, true:开启
54+
app-enabled: false # App工单自动化审批开关, false:关闭自动化审批, true:开启
5855
metrics:
59-
delete-metrics:
60-
delete-limit-size: 1000
56+
collect: # 收集指标
57+
broker-metrics-enabled: true # 收集Broker指标
58+
sink: # 上报指标
59+
cluster-metrics: # 上报cluster指标
60+
sink-db-enabled: true # 上报到db
61+
broker-metrics: # 上报broker指标
62+
sink-db-enabled: true # 上报到db
63+
delete: # 删除指标
64+
delete-limit-size: 1000 # 单次删除的批大小
6165
cluster-metrics-save-days: 14 # 集群指标保存天数
6266
broker-metrics-save-days: 14 # Broker指标保存天数
6367
topic-metrics-save-days: 7 # Topic指标保存天数
6468
topic-request-time-metrics-save-days: 7 # Topic请求耗时指标保存天数
6569
topic-throttled-metrics-save-days: 7 # Topic限流指标保存天数
6670
app-topic-metrics-save-days: 7 # App+Topic指标保存天数
6771

68-
# ldap相关的配置
72+
thread-pool:
73+
collect-metrics:
74+
thread-num: 256 # 收集指标线程池大小
75+
queue-size: 5000 # 收集指标线程池的queue大小
76+
api-call:
77+
thread-num: 16 # api服务线程池大小
78+
queue-size: 5000 # api服务线程池的queue大小
79+
80+
client-pool:
81+
kafka-consumer:
82+
min-idle-client-num: 24 # 最小空闲客户端数
83+
max-idle-client-num: 24 # 最大空闲客户端数
84+
max-total-client-num: 24 # 最大客户端数
85+
borrow-timeout-unit-ms: 3000 # 租借超时时间,单位毫秒
86+
6987
account:
88+
jump-login:
89+
gateway-api: false # 网关接口
90+
third-part-api: false # 第三方接口
7091
ldap:
7192
enabled: false
7293
url: ldap://127.0.0.1:389/
@@ -80,28 +101,20 @@ account:
80101
auth-user-registration: true
81102
auth-user-registration-role: normal
82103

83-
# 集群升级部署相关的功能,需要配合夜莺及S3进行使用
84-
kcm:
85-
enabled: false
86-
s3:
104+
kcm: # 集群安装部署,仅安装broker
105+
enabled: false # 是否开启
106+
s3: # s3 存储服务
87107
endpoint: s3.didiyunapi.com
88108
access-key: 1234567890
89109
secret-key: 0987654321
90110
bucket: logi-kafka
91-
n9e:
92-
base-url: http://127.0.0.1:8004
93-
user-token: 12345678
94-
timeout: 300
95-
account: root
96-
script-file: kcm_script.sh
97-
98-
# 监控告警相关的功能,需要配合夜莺进行使用
99-
# enabled: 表示是否开启监控告警的功能, true: 开启, false: 不开启
100-
# n9e.nid: 夜莺的节点ID
101-
# n9e.user-token: 用户的密钥,在夜莺的个人设置中
102-
# n9e.mon.base-url: 监控地址
103-
# n9e.sink.base-url: 数据上报地址
104-
# n9e.rdb.base-url: 用户资源中心地址
111+
n9e: # 夜莺
112+
base-url: http://127.0.0.1:8004 # 夜莺job服务地址
113+
user-token: 12345678 # 用户的token
114+
timeout: 300 # 当台操作的超时时间
115+
account: root # 操作时使用的账号
116+
script-file: kcm_script.sh # 脚本,已内置好,在源码的kcm模块内,此处配置无需修改
117+
logikm-url: http://127.0.0.1:8080 # logikm部署地址,部署时kcm_script.sh会调用logikm检查部署中的一些状态
105118

106119
monitor:
107120
enabled: false
@@ -115,25 +128,9 @@ monitor:
115128
rdb:
116129
base-url: http://127.0.0.1:8000 # 夜莺v4版本,默认端口统一调整为了8000
117130

118-
119-
notify: # 通知的功能
120-
kafka: # 默认通知发送到kafka的指定Topic中
121-
cluster-id: 95 # Topic的集群ID
122-
topic-name: didi-kafka-notify # Topic名称
123-
order: # 部署的KM的地址
131+
notify:
132+
kafka:
133+
cluster-id: 95
134+
topic-name: didi-kafka-notify
135+
order:
124136
detail-url: http://127.0.0.1
125-
126-
thread-pool:
127-
collect-metrics:
128-
thread-num: 256 # 收集指标线程池大小
129-
queue-size: 5000 # 收集指标线程池的queue大小
130-
api-call:
131-
thread-num: 16 # api服务线程池大小
132-
queue-size: 5000 # api服务线程池的queue大小
133-
134-
client-pool:
135-
kafka-consumer:
136-
min-idle-client-num: 24 # 最小空闲客户端数
137-
max-idle-client-num: 24 # 最大空闲客户端数
138-
max-total-client-num: 24 # 最大客户端数
139-
borrow-timeout-unit-ms: 3000 # 租借超时时间,单位秒

distribution/conf/create_mysql_table.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ CREATE TABLE `account` (
1313
`username` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名',
1414
`password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码',
1515
`role` tinyint(8) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户 1:研发 2:运维',
16+
`department` varchar(256) DEFAULT '' COMMENT '部门名',
17+
`display_name` varchar(256) DEFAULT '' COMMENT '用户姓名',
18+
`mail` varchar(256) DEFAULT '' COMMENT '邮箱',
1619
`status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃',
1720
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
1821
`gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',

distribution/upgrade_config.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,14 @@ ALTER TABLE `gateway_config`
3939
ADD COLUMN `description` TEXT NULL COMMENT '描述信息' AFTER `version`;
4040
```
4141

42+
### 升级至`2.6.0`版本
4243

44+
#### 1.mysql变更
45+
`2.6.0`版本在`account`表增加用户姓名,部门名,邮箱三个字段,因此需要执行下面的sql进行字段的增加。
46+
47+
```sql
48+
ALTER TABLE `account`
49+
ADD COLUMN `display_name` VARCHAR(256) NOT NULL DEFAULT '' COMMENT '用户名' AFTER `role`,
50+
ADD COLUMN `department` VARCHAR(256) NOT NULL DEFAULT '' COMMENT '部门名' AFTER `display_name`,
51+
ADD COLUMN `mail` VARCHAR(256) NOT NULL DEFAULT '' COMMENT '邮箱' AFTER `department`;
52+
```
69.4 KB
Loading
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<mxfile host="65bd71144e">
2+
<diagram id="bhaMuW99Q1BzDTtcfRXp" name="Page-1">
3+
<mxGraphModel dx="1138" dy="830" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0"/>
6+
<mxCell id="1" parent="0"/>
7+
<mxCell id="11" value="待部署Kafka-Broker的机器" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;dashed=1;" vertex="1" parent="1">
8+
<mxGeometry x="380" y="240" width="320" height="240" as="geometry"/>
9+
</mxCell>
10+
<mxCell id="24" value="" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;dashed=1;fillColor=#eeeeee;strokeColor=#36393d;" vertex="1" parent="1">
11+
<mxGeometry x="410" y="310" width="260" height="160" as="geometry"/>
12+
</mxCell>
13+
<mxCell id="6" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="3">
14+
<mxGeometry relative="1" as="geometry"/>
15+
</mxCell>
16+
<mxCell id="7" value="调用夜莺接口,&lt;br&gt;创建集群安装部署任务" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="6">
17+
<mxGeometry x="-0.0875" y="1" relative="1" as="geometry">
18+
<mxPoint x="9" y="1" as="offset"/>
19+
</mxGeometry>
20+
</mxCell>
21+
<mxCell id="9" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="4">
22+
<mxGeometry relative="1" as="geometry"/>
23+
</mxCell>
24+
<mxCell id="10" value="通过版本管理,将Kafka的安装包,&lt;br&gt;server配置上传到s3中" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="9">
25+
<mxGeometry x="0.0125" y="2" relative="1" as="geometry">
26+
<mxPoint as="offset"/>
27+
</mxGeometry>
28+
</mxCell>
29+
<mxCell id="2" value="LogiKM" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
30+
<mxGeometry x="40" y="100" width="120" height="40" as="geometry"/>
31+
</mxCell>
32+
<mxCell id="12" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5">
33+
<mxGeometry relative="1" as="geometry"/>
34+
</mxCell>
35+
<mxCell id="13" value="1、下发任务脚本(kcm_script.sh);&lt;br&gt;2、下发任务操作命令;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="12">
36+
<mxGeometry x="-0.0731" y="2" relative="1" as="geometry">
37+
<mxPoint x="-2" y="-16" as="offset"/>
38+
</mxGeometry>
39+
</mxCell>
40+
<mxCell id="3" value="夜莺——任务中心" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#cdeb8b;strokeColor=#36393d;" vertex="1" parent="1">
41+
<mxGeometry x="480" y="100" width="120" height="40" as="geometry"/>
42+
</mxCell>
43+
<mxCell id="4" value="S3" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
44+
<mxGeometry x="40" y="310" width="120" height="40" as="geometry"/>
45+
</mxCell>
46+
<mxCell id="5" value="夜莺——Agent(&lt;font color=&quot;#ff3333&quot;&gt;代理执行kcm_script.sh脚本&lt;/font&gt;)" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
47+
<mxGeometry x="400" y="260" width="280" height="40" as="geometry"/>
48+
</mxCell>
49+
<mxCell id="22" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontColor=#FF3333;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="14" target="4">
50+
<mxGeometry relative="1" as="geometry"/>
51+
</mxCell>
52+
<mxCell id="25" value="下载安装包" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#000000;" vertex="1" connectable="0" parent="22">
53+
<mxGeometry x="0.2226" y="-2" relative="1" as="geometry">
54+
<mxPoint x="27" y="2" as="offset"/>
55+
</mxGeometry>
56+
</mxCell>
57+
<mxCell id="14" value="执行kcm_script.sh脚本:下载安装包" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#eeeeee;strokeColor=#36393d;" vertex="1" parent="1">
58+
<mxGeometry x="425" y="320" width="235" height="20" as="geometry"/>
59+
</mxCell>
60+
<mxCell id="18" value="执行kcm_script.sh脚本:安装" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#eeeeee;strokeColor=#36393d;" vertex="1" parent="1">
61+
<mxGeometry x="425" y="350" width="235" height="20" as="geometry"/>
62+
</mxCell>
63+
<mxCell id="19" value="执行kcm_script.sh脚本:检查安装结果" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#eeeeee;strokeColor=#36393d;" vertex="1" parent="1">
64+
<mxGeometry x="425" y="380" width="235" height="20" as="geometry"/>
65+
</mxCell>
66+
<mxCell id="23" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontColor=#FF3333;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="20" target="2">
67+
<mxGeometry relative="1" as="geometry">
68+
<Array as="points">
69+
<mxPoint x="770" y="420"/>
70+
<mxPoint x="770" y="40"/>
71+
<mxPoint x="100" y="40"/>
72+
</Array>
73+
</mxGeometry>
74+
</mxCell>
75+
<mxCell id="26" value="检查副本同步状态" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontColor=#000000;" vertex="1" connectable="0" parent="23">
76+
<mxGeometry x="-0.3344" relative="1" as="geometry">
77+
<mxPoint as="offset"/>
78+
</mxGeometry>
79+
</mxCell>
80+
<mxCell id="20" value="执行kcm_script.sh脚本:检查副本同步" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#eeeeee;strokeColor=#36393d;" vertex="1" parent="1">
81+
<mxGeometry x="425" y="410" width="235" height="20" as="geometry"/>
82+
</mxCell>
83+
<mxCell id="21" value="执行kcm_script.sh脚本:结束" style="rounded=0;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=1;fillColor=#eeeeee;strokeColor=#36393d;" vertex="1" parent="1">
84+
<mxGeometry x="425" y="440" width="235" height="20" as="geometry"/>
85+
</mxCell>
86+
</root>
87+
</mxGraphModel>
88+
</diagram>
89+
</mxfile>

docs/dev_guide/upgrade_manual/logi-km-v2.2.0.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/dev_guide/upgrade_manual/logi-km-v2.3.0.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)