Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add flyway and h2 #308

Merged
merged 2 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions datasophon-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>

</dependencies>

<build>
Expand Down
12 changes: 12 additions & 0 deletions datasophon-api/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
spring:
datasource:
# 配置自带数据库的相对路径
url: jdbc:h2:~/.datasophon/db/datasophon_dev;MODE=MYSQL
driver-class-name: org.h2.Driver
h2:
console:
enabled: true
path: /h2
settings:
trace: true
web-allow-others: true
7 changes: 7 additions & 0 deletions datasophon-api/src/main/resources/application-pro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://ddp2:3306/datasophon?useUnicode=true&characterEncoding=utf-8
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
11 changes: 5 additions & 6 deletions datasophon-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ security:
type: PASSWORD
# mysql
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://ddp2:3306/datasophon?useUnicode=true&characterEncoding=utf-8
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
profiles:
active: dev
resources:
static-locations: classpath:/front/views/
#json格式化全局配置
Expand All @@ -24,6 +20,9 @@ spring:
date-format: yyyy-MM-dd HH:mm:ss
view:
suffix: .html
flyway:
locations: classpath:db/migration
placeholder-replacement: false
#国际化配置
messages:
basename: i18n/messages
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,16 @@ INSERT INTO `t_ddh_cluster_alert_quota` VALUES (611, 'KafkaBorker进程存活',
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (612, 'TrinoCoordinator进程存活', 'TRINO', 'up{job=\"trinocoordinator\"}', 2, 17, 1, '重新启动', '!=', 1, 1, 1, 15, 'TrinoCoordinator', 1, NULL);
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (613, 'TrinoWorker进程存活', 'TRINO', 'up{job=\"trinoworker\"}', 2, 17, 1, '重新启动', '!=', 1, 1, 1, 15, 'TrinoWorker', 1, NULL);
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (614, '主机状态', 'NODE', 'up{job=\"node\"}', 2, 11, 1, '重新启动该服务器', '!=', 1, 1, 1, 0, 'node', 1, NULL);
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (615, 'FE进程存活', 'STARROCKS', 'up{group=\'fe\'}', 2, 19, 1, '重新启动', '!=', 1, 1, 1, 15, 'FE', 1, '2022-09-13 14:54:39');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (616, 'BE进程存活', 'STARROCKS', 'up{group=\'be\'}', 2, 19, 1, '重新启动', '!=', 1, 1, 1, 15, 'BE', 1, '2022-09-13 14:55:16');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (615, 'FE进程存活', 'STARROCKS', 'up{group=\"fe\"}', 2, 19, 1, '重新启动', '!=', 1, 1, 1, 15, 'FE', 1, '2022-09-13 14:54:39');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (616, 'BE进程存活', 'STARROCKS', 'up{group=\"be\"}', 2, 19, 1, '重新启动', '!=', 1, 1, 1, 15, 'BE', 1, '2022-09-13 14:55:16');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (617, 'SparkMaster进程存活', 'SPARK3', 'up{job=\"sparkmaster\"}', 2, 16, 1, '重新启动', '!=', 1, 1, 1, 15, 'SparkMaster', 1, '2022-09-16 10:24:38');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (618, 'SparkWorker进程存活', 'SPARK3', 'up{job=\"sparkworker\"}', 2, 16, 1, '重新启动', '!=', 1, 1, 1, 15, 'SparkWorker', 1, '2022-09-16 10:25:18');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (619, 'ElasticSearch进程存活', 'ELASTICSEARCH', 'com_datasophon_ddh_worker_metrics_esMetrics_EsUp', 2, 20, 1, '重新启动', '!=', 1, 1, 1, 15, 'ElasticSearch', 1, '2022-10-08 16:17:00');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (620, 'DS API存活', 'DS', 'up{job=\'apiserver\'}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'ApiServer', 1, '2022-11-20 21:00:54');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (621, 'DSMaster存活', 'DS', 'up{job=\'masterserver\'}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'MasterServer', 1, '2022-11-20 21:01:33');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (622, 'DSWorker存活', 'DS', 'up{job=\'workerserver\'}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'WorkerServer', 1, '2022-11-20 21:02:10');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (623, 'DSAlert存活', 'DS', 'up{job=\'alertserver\'}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'AlertServer', 1, '2022-11-20 21:02:46');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (624, 'StreamPark存活', 'STREAMPARK', 'up{job=\'streampark\'}', 2, 22, 1, '重新启动', '!=', 1, 1, 1, 15, 'StreamPark', 1, '2022-11-21 18:20:51');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (620, 'DS API存活', 'DS', 'up{job=\"apiserver\"}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'ApiServer', 1, '2022-11-20 21:00:54');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (621, 'DSMaster存活', 'DS', 'up{job=\"masterserver\"}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'MasterServer', 1, '2022-11-20 21:01:33');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (622, 'DSWorker存活', 'DS', 'up{job=\"workerserver\"}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'WorkerServer', 1, '2022-11-20 21:02:10');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (623, 'DSAlert存活', 'DS', 'up{job=\"alertserver\"}', 2, 21, 1, '重新启动', '!=', 1, 1, 1, 15, 'AlertServer', 1, '2022-11-20 21:02:46');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (624, 'StreamPark存活', 'STREAMPARK', 'up{job=\"streampark\"}', 2, 22, 1, '重新启动', '!=', 1, 1, 1, 15, 'StreamPark', 1, '2022-11-21 18:20:51');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (625, 'FE进程存活', 'DORIS', 'up{group=\"fe\",job=\"doris\"}', 2, 23, 1, 'restart', '!=', 1, 1, 1, 15, 'FE', 1, '2023-01-07 22:21:36');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (626, 'BE进程存活', 'DORIS', 'up{group=\"be\",job=\"doris\"}', 2, 23, 1, 'restart', '!=', 1, 1, 1, 15, 'BE', 1, '2023-01-07 22:22:10');
INSERT INTO `t_ddh_cluster_alert_quota` VALUES (627, 'HistoryServer进程存活', 'YARN', 'up{job=\"historyserver\"}', 2, 3, 1, '重新启动', '!=', 1, 1, 1, 15, 'HistoryServer', 1, '2023-01-12 14:20:23');
Expand Down
Loading