From 5342989d8cd7dc482458a933bf6ffec4394cfad1 Mon Sep 17 00:00:00 2001 From: workabee <2950914812@qq.com> Date: Mon, 29 Jan 2024 15:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/dev/config.yaml | 27 ++++++++++++++++ conf/dev/dubbogo.yaml | 68 +++++++++++++++++++++++++++++++++++++++ conf/k8stest/config.yaml | 25 ++++++++++++++ conf/k8stest/dubbogo.yaml | 68 +++++++++++++++++++++++++++++++++++++++ conf/prod/config.yaml | 25 ++++++++++++++ conf/prod/dubbogo.yaml | 68 +++++++++++++++++++++++++++++++++++++++ conf/test/config.yaml | 25 ++++++++++++++ conf/test/dubbogo.yaml | 68 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 374 insertions(+) create mode 100644 conf/dev/config.yaml create mode 100644 conf/dev/dubbogo.yaml create mode 100644 conf/k8stest/config.yaml create mode 100644 conf/k8stest/dubbogo.yaml create mode 100644 conf/prod/config.yaml create mode 100644 conf/prod/dubbogo.yaml create mode 100644 conf/test/config.yaml create mode 100644 conf/test/dubbogo.yaml diff --git a/conf/dev/config.yaml b/conf/dev/config.yaml new file mode 100644 index 0000000..7078ef2 --- /dev/null +++ b/conf/dev/config.yaml @@ -0,0 +1,27 @@ +system: + mode: dev #正式 prod #测试 test # 开发 dev + config_source: config +exhibitionRegister: + host: 121.229.45.214 + port: 9007 + user: artuser + password: C250PflXIWv2SQm8 + db_name: "exhibition_register" +zapLog: + level: "info" + filename: "logs/exhibition_register.log" + max_size: 5 + max_age: 30 + max_backups: 30 +snowflake: + node_num: 4 + start_time: "2023-12-20" +jaeger: + addr: "127.0.0.1:6831" + open: false +#rabbitmq: +# user: "myuser" +# password: "mypass" +# host: "localhost" +# port: 5672 +# vhost: "oa" \ No newline at end of file diff --git a/conf/dev/dubbogo.yaml b/conf/dev/dubbogo.yaml new file mode 100644 index 0000000..da4e10e --- /dev/null +++ b/conf/dev/dubbogo.yaml @@ -0,0 +1,68 @@ +dubbo: + metrics: + enable: true # default is true + path: /metrics # default is /metrics + port: 9092 # default is 9090 + namespace: dubboExhibition # default is dubbo 作为数据上报 metrics 的前缀 + registries: + demoZK: + protocol: zookeeper + timeout: 10s + address: 172.16.100.93:2181 + protocols: + triple: #triple + name: tri + port: 21501 + provider: + filter: tracing + services: + ExhibitionProvider: + interface: com.fontree.microservices.common.Exhibition + retries: 0 + filter: tps,tracing + tps.limiter: method-service + tps.limit.strategy: fixedWindow + tps.limit.rejected.handler: DefaultValueHandler + tps.limit.interval: 1000 # 间隔时间 + tps.limit.rate: 30 # 间隔时间内次数 + warmup: 100 #预热时间 + logger: + zap-config: + level: info # 日志级别 + development: false + disableCaller: false + disableStacktrace: false + encoding: "json" + # zap encoder 配置 + encoderConfig: + messageKey: "message" + levelKey: "level" + timeKey: "time" + nameKey: "logger" + callerKey: "caller" + stacktraceKey: "stacktrace" + lineEnding: "" + levelEncoder: "capitalColor" + timeEncoder: "iso8601" + durationEncoder: "seconds" + callerEncoder: "short" + nameEncoder: "" + EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"), + EncodeDuration: zapcore.SecondsDurationEncoder, + outputPaths: + - "stderr" + errorOutputPaths: + - "stderr" + lumberjack-config: + # 写日志的文件名称 + filename: "runtime/logs/exhibition_register.log" + # 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB + maxSize: 5 + # 日志保留的最大天数(只保留最近多少天的日志) + maxAge: 30 + # 只保留最近多少个日志文件,用于控制程序总日志的大小 + maxBackups: 30 + # 是否使用本地时间,默认使用 UTC 时间 + localTime: true + # 是否压缩日志文件,压缩方法 gzip + compress: false \ No newline at end of file diff --git a/conf/k8stest/config.yaml b/conf/k8stest/config.yaml new file mode 100644 index 0000000..aff2bae --- /dev/null +++ b/conf/k8stest/config.yaml @@ -0,0 +1,25 @@ +system: + mode: dev #正式 prod #测试 test #开发 dev +# config_source: configmap +exhibitionRegister: + host: 121.229.45.214 + port: 9007 + user: artuser + password: C250PflXIWv2SQm8 + db_name: "exhibition_register" +#redis: +# db: ${oa-meeting.redis.db} +# addr: ${redis.addr} +# password: ${redis.password} +zapLog: + level: "info" + filename: "logs/exhibition_register.log" + max_size: 5 + max_age: 30 + max_backups: 30 +snowflake: + node_num: 4 + start_time: "2023-12-20" +jaeger: + addr: "127.0.0.1:6831" + open: false diff --git a/conf/k8stest/dubbogo.yaml b/conf/k8stest/dubbogo.yaml new file mode 100644 index 0000000..3a819ee --- /dev/null +++ b/conf/k8stest/dubbogo.yaml @@ -0,0 +1,68 @@ +dubbo: + metrics: + enable: true # default is true + path: /metrics # default is /metrics + port: 9092 # default is 9090 + namespace: dubboExhibition # default is dubbo 作为数据上报 metrics 的前缀 + registries: + demoZK: + protocol: zookeeper + timeout: 10s + address: 172.16.100.93:2181 + protocols: + triple: #triple + name: tri + port: 20501 + provider: + filter: tracing + services: + ExhibitionProvider: + interface: com.fontree.microservices.common.Exhibition + retries: 0 + filter: tps,tracing + tps.limiter: method-service + tps.limit.strategy: fixedWindow + tps.limit.rejected.handler: DefaultValueHandler + tps.limit.interval: 1000 # 间隔时间 + tps.limit.rate: 30 # 间隔时间内次数 + warmup: 100 #预热时间 + logger: + zap-config: + level: info # 日志级别 + development: false + disableCaller: false + disableStacktrace: false + encoding: "json" + # zap encoder 配置 + encoderConfig: + messageKey: "message" + levelKey: "level" + timeKey: "time" + nameKey: "logger" + callerKey: "caller" + stacktraceKey: "stacktrace" + lineEnding: "" + levelEncoder: "capitalColor" + timeEncoder: "iso8601" + durationEncoder: "seconds" + callerEncoder: "short" + nameEncoder: "" + EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"), + EncodeDuration: zapcore.SecondsDurationEncoder, + outputPaths: + - "stderr" + errorOutputPaths: + - "stderr" + lumberjack-config: + # 写日志的文件名称 + filename: "runtime/logs/exhibition_register.log" + # 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB + maxSize: 5 + # 日志保留的最大天数(只保留最近多少天的日志) + maxAge: 30 + # 只保留最近多少个日志文件,用于控制程序总日志的大小 + maxBackups: 30 + # 是否使用本地时间,默认使用 UTC 时间 + localTime: true + # 是否压缩日志文件,压缩方法 gzip + compress: false \ No newline at end of file diff --git a/conf/prod/config.yaml b/conf/prod/config.yaml new file mode 100644 index 0000000..60ef478 --- /dev/null +++ b/conf/prod/config.yaml @@ -0,0 +1,25 @@ +system: + mode: dev #正式 prod #测试 test #开发 dev +# config_source: configmap +exhibitionRegister: + host: svc-fontree-mysql-service + port: 3306 + user: fonchain_opv + password: "IhQmhg8HZjDmU=Ove5PnA^D" + db_name: "exhibition_register" +#redis: +# db: ${oa-meeting.redis.db} +# addr: ${redis.addr} +# password: ${redis.password} +zapLog: + level: "info" + filename: "logs/exhibition_register.log" + max_size: 5 + max_age: 30 + max_backups: 30 +snowflake: + node_num: 4 + start_time: "2023-12-20" +jaeger: + addr: "127.0.0.1:6831" + open: false diff --git a/conf/prod/dubbogo.yaml b/conf/prod/dubbogo.yaml new file mode 100644 index 0000000..7d423bb --- /dev/null +++ b/conf/prod/dubbogo.yaml @@ -0,0 +1,68 @@ +dubbo: + metrics: + enable: true # default is true + path: /metrics # default is /metrics + port: 9092 # default is 9090 + namespace: dubboExhibition # default is dubbo 作为数据上报 metrics 的前缀 + registries: + demoZK: + protocol: zookeeper + timeout: 10s + address: zookeeper:2181 + protocols: + triple: #triple + name: tri + port: 20501 + provider: + filter: tracing + services: + ExhibitionProvider: + interface: com.fontree.microservices.common.Exhibition + retries: 0 + filter: tps,tracing + tps.limiter: method-service + tps.limit.strategy: fixedWindow + tps.limit.rejected.handler: DefaultValueHandler + tps.limit.interval: 1000 # 间隔时间 + tps.limit.rate: 30 # 间隔时间内次数 + warmup: 100 #预热时间 + logger: + zap-config: + level: info # 日志级别 + development: false + disableCaller: false + disableStacktrace: false + encoding: "json" + # zap encoder 配置 + encoderConfig: + messageKey: "message" + levelKey: "level" + timeKey: "time" + nameKey: "logger" + callerKey: "caller" + stacktraceKey: "stacktrace" + lineEnding: "" + levelEncoder: "capitalColor" + timeEncoder: "iso8601" + durationEncoder: "seconds" + callerEncoder: "short" + nameEncoder: "" + EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"), + EncodeDuration: zapcore.SecondsDurationEncoder, + outputPaths: + - "stderr" + errorOutputPaths: + - "stderr" + lumberjack-config: + # 写日志的文件名称 + filename: "runtime/logs/exhibition_register.log" + # 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB + maxSize: 5 + # 日志保留的最大天数(只保留最近多少天的日志) + maxAge: 30 + # 只保留最近多少个日志文件,用于控制程序总日志的大小 + maxBackups: 30 + # 是否使用本地时间,默认使用 UTC 时间 + localTime: true + # 是否压缩日志文件,压缩方法 gzip + compress: false \ No newline at end of file diff --git a/conf/test/config.yaml b/conf/test/config.yaml new file mode 100644 index 0000000..8847608 --- /dev/null +++ b/conf/test/config.yaml @@ -0,0 +1,25 @@ +system: + mode: dev #正式 prod #测试 test #开发 dev +# config_source: configmap +exhibitionRegister: + host: 121.229.45.214 + port: 9007 + user: artuser + password: C250PflXIWv2SQm8 + db_name: "exhibition_register" +#redis: +# db: ${oa-meeting.redis.db} +# addr: ${redis.addr} +# password: ${redis.password} +zapLog: + level: "info" + filename: "logs/exam-platform.log" + max_size: 5 + max_age: 30 + max_backups: 30 +snowflake: + node_num: 4 + start_time: "2023-12-20" +jaeger: + addr: "127.0.0.1:6831" + open: false diff --git a/conf/test/dubbogo.yaml b/conf/test/dubbogo.yaml new file mode 100644 index 0000000..7d423bb --- /dev/null +++ b/conf/test/dubbogo.yaml @@ -0,0 +1,68 @@ +dubbo: + metrics: + enable: true # default is true + path: /metrics # default is /metrics + port: 9092 # default is 9090 + namespace: dubboExhibition # default is dubbo 作为数据上报 metrics 的前缀 + registries: + demoZK: + protocol: zookeeper + timeout: 10s + address: zookeeper:2181 + protocols: + triple: #triple + name: tri + port: 20501 + provider: + filter: tracing + services: + ExhibitionProvider: + interface: com.fontree.microservices.common.Exhibition + retries: 0 + filter: tps,tracing + tps.limiter: method-service + tps.limit.strategy: fixedWindow + tps.limit.rejected.handler: DefaultValueHandler + tps.limit.interval: 1000 # 间隔时间 + tps.limit.rate: 30 # 间隔时间内次数 + warmup: 100 #预热时间 + logger: + zap-config: + level: info # 日志级别 + development: false + disableCaller: false + disableStacktrace: false + encoding: "json" + # zap encoder 配置 + encoderConfig: + messageKey: "message" + levelKey: "level" + timeKey: "time" + nameKey: "logger" + callerKey: "caller" + stacktraceKey: "stacktrace" + lineEnding: "" + levelEncoder: "capitalColor" + timeEncoder: "iso8601" + durationEncoder: "seconds" + callerEncoder: "short" + nameEncoder: "" + EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"), + EncodeDuration: zapcore.SecondsDurationEncoder, + outputPaths: + - "stderr" + errorOutputPaths: + - "stderr" + lumberjack-config: + # 写日志的文件名称 + filename: "runtime/logs/exhibition_register.log" + # 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB + maxSize: 5 + # 日志保留的最大天数(只保留最近多少天的日志) + maxAge: 30 + # 只保留最近多少个日志文件,用于控制程序总日志的大小 + maxBackups: 30 + # 是否使用本地时间,默认使用 UTC 时间 + localTime: true + # 是否压缩日志文件,压缩方法 gzip + compress: false \ No newline at end of file