Refactor server configuration and update certificate handling
- Changed the NotifyUrl in PostMeasureTaskToNF to use a hardcoded port (33030). - Updated GetEMSState to retrieve the port from the server configuration instead of the YAML config. - Removed deprecated RestParam struct and related code from YamlConfig. - Deleted old certificate files (omc-server.crt, omc-server.key, omc-web.crt, omc-web.key). - Added new certificate files (www.omc.net.crt, www.omc.net.key) for updated server configuration. - Modified local/omc.yaml to reflect changes in server configuration and certificate paths. - Updated main.go to load server configuration instead of rest configuration, ensuring proper handling of multiple HTTP services.
This commit is contained in:
@@ -1,10 +1,82 @@
|
||||
# server version: std/lite
|
||||
serverVersion: "std"
|
||||
# operation mode system/docker
|
||||
# serverMode: "system"
|
||||
# login authentication, default true
|
||||
# serverLoginAuth: true
|
||||
# interface encryption, default false
|
||||
# serverCryptoApi: false
|
||||
|
||||
# database for server version
|
||||
|
||||
# service listen ipv4/v6 and port, support multiple routines
|
||||
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
||||
server:
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6: ""
|
||||
port: 33030
|
||||
schema: http
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6: ""
|
||||
port: 33443
|
||||
schema: https
|
||||
certFile: /usr/local/etc/omc/certs/www.omc.net.crt
|
||||
keyFile: /usr/local/etc/omc/certs/www.omc.net.key
|
||||
|
||||
|
||||
# web service configuration
|
||||
# if you are using nginx to take over, you can disable the
|
||||
webServer:
|
||||
enabled: true
|
||||
rootDir: /usr/local/etc/omc/web
|
||||
listen:
|
||||
- addr: 0.0.0.0:80
|
||||
schema: http
|
||||
- addr: 0.0.0.0:443
|
||||
schema: https
|
||||
certFile: /usr/local/etc/omc/certs/www.omc.net.crt
|
||||
keyFile: /usr/local/etc/omc/certs/www.omc.net.key
|
||||
|
||||
|
||||
# track configuration for NE
|
||||
trace:
|
||||
enabled: false
|
||||
host: "172.16.5.100" # fill in the specific IP address
|
||||
port: 33033
|
||||
|
||||
|
||||
# data source
|
||||
database:
|
||||
# default data source name
|
||||
defaultDataSourceName: "std"
|
||||
|
||||
# dataSource:
|
||||
# # std: standard
|
||||
# std:
|
||||
# type: "mysql"
|
||||
# host: "127.0.0.1"
|
||||
# port: 3306
|
||||
# username: "<username>"
|
||||
# password: "<password>"
|
||||
# database: "<database>"
|
||||
# logging: false
|
||||
# # lite: lite
|
||||
# lite:
|
||||
# type: "sqlite"
|
||||
# database: "<database path>"
|
||||
# logging: false
|
||||
|
||||
|
||||
# redis cached data
|
||||
redis:
|
||||
# default data source name
|
||||
defaultDataSourceName: "default"
|
||||
# dataSource:
|
||||
# default:
|
||||
# port: 6379 # port
|
||||
# host: "127.0.0.1" # host
|
||||
# password: "<password>"
|
||||
# db: 10 # db_num
|
||||
|
||||
|
||||
# file: log file name
|
||||
# level: /trace/debug/info/warn/error/fatal, default: debug
|
||||
# duration: rotation time with xx hours, example: 1/12/24 hours
|
||||
@@ -15,31 +87,6 @@ logger:
|
||||
duration: 24
|
||||
count: 90
|
||||
|
||||
# rest agent listen ipv4/v6 and port, support multiple routines
|
||||
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
||||
rest:
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6: ""
|
||||
port: 33030
|
||||
schema: http
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6: ""
|
||||
port: 33443
|
||||
schema: https
|
||||
certFile: /usr/local/etc/omc/certs/omc-server.crt
|
||||
keyFile: /usr/local/etc/omc/certs/omc-server.key
|
||||
|
||||
webServer:
|
||||
enabled: true
|
||||
rootDir: /usr/local/etc/omc/web
|
||||
listen:
|
||||
- addr: 0.0.0.0:80
|
||||
schema: http
|
||||
- addr: 0.0.0.0:443
|
||||
schema: https
|
||||
certFile: /usr/local/etc/omc/certs/omc-web.crt
|
||||
keyFile: /usr/local/etc/omc/certs/omc-web.key
|
||||
|
||||
# sleep: time delay for after write buffer (millisecond)
|
||||
# deadLine: timeout for io read and write (second)
|
||||
mml:
|
||||
@@ -50,12 +97,6 @@ mml:
|
||||
bufferSize: 65535
|
||||
mmlHome: ./mmlhome
|
||||
|
||||
# Tracking configuration
|
||||
trace:
|
||||
enabled: false
|
||||
host: "172.16.5.100" # Fill in the specific IP address
|
||||
port: 33033
|
||||
|
||||
# NE config
|
||||
ne:
|
||||
user: omcuser
|
||||
|
||||
Reference in New Issue
Block a user