From 0ac5dff4b5a2230308a5778fbd52848e351d0cb6 Mon Sep 17 00:00:00 2001 From: "limin.zhang" Date: Fri, 14 Apr 2023 17:59:55 +0800 Subject: [PATCH] =?UTF-8?q?2023.04.14=20=E8=A1=A5=E5=85=85cmc=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E9=83=A8=E5=88=86=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmc/fms-core/dev.conf | 25 +++ cmc/fms-core/dev_actor.conf | 17 ++ cmc/fms-core/dev_core.conf | 305 ++++++++++++++++++++++++++++++++++++ cmc/fms-core/logback.xml | 64 ++++++++ cmc/fms-master/logback.xml | 64 ++++++++ cmc/fms-master/master1.conf | 28 ++++ cmc/fms-master/master2.conf | 28 ++++ 7 files changed, 531 insertions(+) create mode 100644 cmc/fms-core/dev.conf create mode 100644 cmc/fms-core/dev_actor.conf create mode 100644 cmc/fms-core/dev_core.conf create mode 100644 cmc/fms-core/logback.xml create mode 100644 cmc/fms-master/logback.xml create mode 100644 cmc/fms-master/master1.conf create mode 100644 cmc/fms-master/master2.conf diff --git a/cmc/fms-core/dev.conf b/cmc/fms-core/dev.conf new file mode 100644 index 0000000..ccd620f --- /dev/null +++ b/cmc/fms-core/dev.conf @@ -0,0 +1,25 @@ +# This is the configuration file for the gpst prod1 +include "dev_core.conf" +include "dev_actor.conf" + +slick { + dbs { + default { + db { + numThreads = 10 // evolutions is 20 + maxConnections = 10 // evolutions is 5*numThread + } + } + } +} + + +provider.kafka.producerClientID=fleet_api_prod1 + +akka.http.server.idle-timeout = 45 seconds +play.server.http.idleTimeout = 45 seconds + + +s360.workerID = 1 +s360.dataCenterID = 1 + diff --git a/cmc/fms-core/dev_actor.conf b/cmc/fms-core/dev_actor.conf new file mode 100644 index 0000000..7d41527 --- /dev/null +++ b/cmc/fms-core/dev_actor.conf @@ -0,0 +1,17 @@ +contact-points = [ + "akka.tcp://ClusterSystem@192.168.2.164:2551", + "akka.tcp://ClusterSystem@192.168.2.164:2552" +] + +play.akka.actor-system = "mkfleet-4g-actor-system" + +akka { + remote.netty.tcp.port=45000 + remote.netty.tcp.hostname=192.168.2.164 + + remote.netty.tcp.bind-port=45000 + remote.netty.tcp.bind-hostname=0.0.0.0 + + actor.provider = "akka.cluster.ClusterActorRefProvider" + extensions = ["akka.cluster.client.ClusterClientReceptionist"] +} diff --git a/cmc/fms-core/dev_core.conf b/cmc/fms-core/dev_core.conf new file mode 100644 index 0000000..b6c0f98 --- /dev/null +++ b/cmc/fms-core/dev_core.conf @@ -0,0 +1,305 @@ +# This is the main configuration file for the application. +# ~~~~~ + +# Secret key +# ~~~~~ +# The secret key is used to secure cryptographics functions. +# If you deploy your application to several instances be sure to use the same key! +play.crypto.secret = "]plvsqIOx02py7>9aoiugbDZejiGPDEE[bQL5z@/NAKbtnQ5E@KZwKGUf3kJqLgT" + +# The application languages +# ~~~~~ +play.i18n.langs = ["en"] + +# The application DI modules +play.modules { + enabled += "modules.AppModule" + enabled += "modules.ActorModule" + #enabled += "play.modules.swagger.SwaggerModule" +} + +# Evolutions +# ~~~~~ +# You can disable evolutions if needed +# evolutionplugin=disabled +play.evolutions.enabled = true +play.evolutions.autoApply = true + +# Logger +# ~~~~~ +# You can also configure logback (http://logback.qos.ch/), +# by providing an application-logger.xml file in the conf directory. + +# Root logger: +logger.root = ERROR + +# Logger used by the framework: +logger.play = INFO + +# Logger provided to your application: +logger.application = DEBUG + + +# WS +play.ws.timeout { + connection = 6s // evolutions.evolutions is 120 + idle = 30s // evolutions.evolutions is 120 + request = 6s //evolutions.evolutions is 120 +} + +play.http { + forwarded.trustedProxies = [ "0.0.0.0/0" ] + parser.maxDiskBuffer=524288000 //500M + parser.maxMemoryBuffer=2M +} + +# Filter +play.filters.enabled += "play.filters.cors.CORSFilter" +play.filters.cors { + pathPrefixes = ["/"] + allowedHttpMethods = ["POST", "GET", "PUT", "DELETE", "OPTIONS"] + allowedHttpHeaders = ["Origin", "X-Requested-With", "Content-Type", "Accept", "Referer", "User-Agent", "X-Auth-Token"] + supportsCredentials = false +} + + +# Global object class +# ~~~~~ +# Define the Global object class for this application. +# Default to Global in the root package. +# application.global=Global + +# Router +# ~~~~~ +# Define the Router object to use for this application. +# This router will be looked up first when the application is starting up, +# so make sure this is the entry point. +# Furthermore, it's assumed your route file is named properly. +# So for an application router like `my.application.Router`, +# you may need to define a router file `conf/my.application.routes`. +# Default to Routes in the root package (and conf/routes) +# application.router=my.application.Routes + +# Database configuration +# ~~~~~ +# You can declare as many datasources as you want. +# By convention, the evolutions.evolutions datasource is named `evolutions.evolutions` +# +# db.evolutions.evolutions.driver=org.h2.Driver +# db.evolutions.evolutions.url="jdbc:h2:mem:play" +# db.evolutions.evolutions.user=sa +# db.evolutions.evolutions.password="" +slick { + dbs { + default { + profile = "slick.jdbc.PostgresProfile$" + db { + driver = "org.postgresql.Driver" + url = "jdbc:postgresql://192.168.2.239/fms_api" + user = "postgres" + password = "password" + connectionTimeout = "10000" + numThreads = 3 // evolutions is 20 + maxConnections = 3 // evolutions is 5*numThread + + } + } + } +} + +# Redis +jedis { + hosts = ["192.168.2.239:6379"] + maxIdle = 80 + maxTotal = 80 + timeout = 3000 + maxWaitMillis = 3000 + isCluster = false + database = 8 + testOnBorrow = true + testOnReturn = true +} + +# Kafka +provider.kafka.producerNum=6 +provider.kafka.producerClientID=fleet_api_prod +#kafka.server.address="b-1.mkfleet.k48ako.c2.kafka.ap-southeast-1.amazonaws.com:9092,b-2.mkfleet.k48ako.c2.kafka.ap-southeast-1.amazonaws.com:9092" +kafka.server.address="192.168.2.239:9092" + +kafka.gps.topic=fleet-api-gps +kafka.notification.topic=fleet-api-notification +kafka.sns.topic=fleet-api-sns +kafka.notification-mail.topic=fleet-api-mail + +# fms_gps Server (waylens-fms-gps) +fms_gps.server.address = "http://192.168.2.164:9004" +# notification push server (waylens-fms-notification) +provider.waylens.notificationPusher.endpoint="http://192.168.2.164:8060/fmsKafka" + + +# mptool server +internal { + # mptool which provides camera information + mp { + server = "https://horn.vidit.com.cn" + getMPSyncInfoApi = "/api/mp/v1.0/cameras/" + } +} + +# att +provider.att { + endpoint = "https://api-iotdevice.att.com/rws/api/v1" + licensekey { + default = "todo" + } + customer { + default = "todo" + } + username { + default = "todo" + } + custom { + default = "todo" + } + defaultDataPlan { + default = "todo" + } + overageLimitOverride { + default = "PERMANENT_OVERRIDE" + } + billingDay = 19 +} + +# clip server (waylens-fms-clip) +provider.backend { + endpoint="http://192.168.2.167:36458/v.1.0" + key="dqy0S3MAdDLOp50R" + endpointForRemuxMp4 ="http://192.168.2.167:16587/v.1.0" +} + +# AWS +provider.aws { + key = "fTbjUPzlfsxlue0O" + secret = "Gf6xyQie5QDH28y41f4mXuDzvez26cWg" + region = "cn-qingdao-1" + host = "http://192.168.2.239:9000" + + s3 { + pathStyleAccessEnabled = true + } + +# sns { +# region = "ap-southeast-1" +# fleetArn = "arn:aws:sns:ap-southeast-1:397632607652:wtest-sns-forward" +# protocol = "https" +# } + +# cloudFront { +# keyPairId = "K19X44RTV6O2RC" +# keyPairFile = "../wtest_fleet_private_key.pem" +# } +} + +# Wowza parameters +provider.wowza { + defaultPublishServer = "rtmp://47.104.8.46" + appName = "live_fleet" + publishUsername = "publishfleet" + publishPassword = "aEvlBNzXvlFnjx4d" + playSecret = "eeYJSVCkttNVGLIY" + playParam = "fleet" + playProtocol = "rtmp" + playProtocolCN = "rtmp" + audio{ + host="47.104.8.46" + port=1935 + appName="live_audio", + publishUsername = "fleet_audio" + publishPassword = "waylensfleet2019" + } + privateIPMap { + #"47.104.8.46": "192.168.2.164" + } + + domainMap { + "192.168.2.164": "47.104.8.46" + } +} + +# Sendgrid Mail +#mail { +# midend.recipient = "midend@waylens.com" +# internal.from = "fleet@waylens.com" +#} + +#sendgrid { +# apikey="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" +#} + + +# clip storage & cloudfront +clip.storage.bucket = "/mkfleet/clip/" +clip.storage.address { + default = "https://minio.dev.eveus.com/mkfleet/clip/" +} + +# streaming storage & cloudfront +streaming.storage.bucket = "/mkfleet/live_video/" +streaming.storage.address { + default = "https://minio.dev.eveus.com/mkfleet/live_video/" +} + +# firmware storage & cloudfront +firmware.storage.bucket= "/mkfleet/firmware" +firmware.storage.address { + default = "https://minio.dev.eveus.com/mkfleet/firmware/" +} + +# gpsReport.storage cloudfront +gpsReport.storage.address { + default = "https://minio.dev.eveus.com/mkfleet/gps_data_report/" +} + +# fleetReport.storage cloudfront +fleetReport.storage.address { + default = "https://minio.dev.eveus.com/mkfleet/fleet_report/" +} + +# log storage cloudfront +log.storage.address = "https://minio.dev.eveus.com/mkfleet/log/" + +# audio storage & cloudfront +audio.storage.bucket="mkfleet" +audio.storage.address="https://minio.dev.eveus.com/mkfleet/audio/" + + +clip.request.pendingTimeout = 604800 +clip.storage.maxAge { +# default = 15811200 // 183 days + default = 604800 // 7days +} +clip.uploading.supportResume = true + + + +provider.backend.useDomain=true + +# log autoupload parameters +log.autoUpload.enable=true +log.autoUpload.periodInDay=30 +log.autoUpload.minIntervalInMinute=720 + +# test update parameters +test.UpdateOldUnfinishedTrip=true +test.UpdateLastSysTimeDurationInMs=3000 + +# some other parameters +dataUsage.cacheTime = 21600 +ota.firstTime.delayInDays = 0 +server.waylensPricing = false +# Camera automatically activated after register +server.autoActivated = true +# Disalbe iccid check +server.checkIccid = false +api.version="v3.05" +server.env="MK" diff --git a/cmc/fms-core/logback.xml b/cmc/fms-core/logback.xml new file mode 100644 index 0000000..b4f0405 --- /dev/null +++ b/cmc/fms-core/logback.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + [%d{yyyy-MM-dd HH:mm:ss.SSS}][%-5level][%logger{128}][%thread] %message%n%xException{5} + + + + + + ${log.txtfile}_%d{yyyy-MM-dd}.log + + + + + [%d{yyyy-MM-dd HH:mm:ss.SSS}][%-5level][%logger{128}][%thread] %message%n%xException{5} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmc/fms-master/logback.xml b/cmc/fms-master/logback.xml new file mode 100644 index 0000000..bf0e726 --- /dev/null +++ b/cmc/fms-master/logback.xml @@ -0,0 +1,64 @@ + + + + + + + + + + [%d{yyyy-MM-dd HH:mm:ss.SSS}][%-5level][%logger{128}][%thread] %message%n%xException{5} + + + + + + ${log.txtfile}_%d{yyyy-MM-dd}.log + + + + [%d{yyyy-MM-dd HH:mm:ss.SSS}][%-5level][%logger{128}][%thread] %message%n%xException{5} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmc/fms-master/master1.conf b/cmc/fms-master/master1.conf new file mode 100644 index 0000000..b6c19ce --- /dev/null +++ b/cmc/fms-master/master1.conf @@ -0,0 +1,28 @@ +akka { + + actor.provider = "akka.cluster.ClusterActorRefProvider" + + remote { + netty { + tcp { + hostname = 172.16.88.19 + port = 2551 + } + } + } + + cluster { + seed-nodes = [ + "akka.tcp://ClusterSystem@172.16.88.19:2551", + "akka.tcp://ClusterSystem@172.16.88.19:2552"] + + # auto-down-unreachable-after = 10s + } + + extensions = ["akka.cluster.client.ClusterClientReceptionist"] + + loggers = ["akka.event.slf4j.Slf4jLogger"] + loglevel = "DEBUG" + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" +} +redis.host = "172.16.88.19" diff --git a/cmc/fms-master/master2.conf b/cmc/fms-master/master2.conf new file mode 100644 index 0000000..3e8fb22 --- /dev/null +++ b/cmc/fms-master/master2.conf @@ -0,0 +1,28 @@ +akka { + + actor.provider = "akka.cluster.ClusterActorRefProvider" + + remote { + netty { + tcp { + hostname = 172.16.88.19 + port = 2552 + } + } + } + + cluster { + seed-nodes = [ + "akka.tcp://ClusterSystem@172.16.88.19:2551", + "akka.tcp://ClusterSystem@172.16.88.19:2552"] + + # auto-down-unreachable-after = 10s + } + + extensions = ["akka.cluster.client.ClusterClientReceptionist"] + + loggers = ["akka.event.slf4j.Slf4jLogger"] + loglevel = "DEBUG" + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" +} +redis.host = "172.16.88.19"