faet: omc在docker服务中配置
This commit is contained in:
@@ -1,160 +0,0 @@
|
|||||||
# file: log file name
|
|
||||||
# level: /trace/debug/info/warn/error/fatal, default: debug
|
|
||||||
# duration: rotation time with xx hours, example: 1/12/24 hours
|
|
||||||
# count: rotation count of log, default is 30 rotation
|
|
||||||
logger:
|
|
||||||
file: /usr/local/omc/log/restagent.log
|
|
||||||
level: debug
|
|
||||||
duration: 24
|
|
||||||
count: 90
|
|
||||||
|
|
||||||
# rest agent listen ipv4/v6 and port, support multiple routines
|
|
||||||
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
|
||||||
# clientAuthType: 0:NoClientCert (default), 1:RequestClientCert, 2:RequireAnyClientCert,
|
|
||||||
# 3:VerifyClientCertIfGiven, 4:RequireAndVerifyClientCerts
|
|
||||||
rest:
|
|
||||||
- ipv4: 0.0.0.0
|
|
||||||
ipv6:
|
|
||||||
port: 3030
|
|
||||||
|
|
||||||
webServer:
|
|
||||||
enabled: false
|
|
||||||
rootDir: /usr/local/omc/htdocs/front
|
|
||||||
listen:
|
|
||||||
- addr: :80
|
|
||||||
schema: http
|
|
||||||
- addr: :443
|
|
||||||
schema: https
|
|
||||||
clientAuthType: 0
|
|
||||||
caFile: /usr/local/omc/etc/certs/omc-ca.crt
|
|
||||||
certFile: /usr/local/omc/etc/certs/omc-server.crt
|
|
||||||
keyFile: /usr/local/omc/etc/certs/omc-server.key
|
|
||||||
|
|
||||||
database:
|
|
||||||
type: mysql
|
|
||||||
user: root
|
|
||||||
password: "root@1234"
|
|
||||||
host: "192.168.5.57"
|
|
||||||
port: 3306
|
|
||||||
name: omc_db
|
|
||||||
backup: /usr/local/omc/database
|
|
||||||
|
|
||||||
# Redis data cache
|
|
||||||
redis:
|
|
||||||
dataSource:
|
|
||||||
# OMC system db
|
|
||||||
default:
|
|
||||||
port: 6379 # Redis port
|
|
||||||
host: "192.168.5.57" # Redis host
|
|
||||||
password: ""
|
|
||||||
db: 10 # Redis db_num
|
|
||||||
# UDM sub/auth db
|
|
||||||
udmuser:
|
|
||||||
port: 6379 # Redis port
|
|
||||||
host: "192.168.5.57"
|
|
||||||
password: ""
|
|
||||||
db: 0 # Redis db_num
|
|
||||||
# used to specify the default data source for multiple data resourece
|
|
||||||
defaultDataSourceName: "default"
|
|
||||||
|
|
||||||
# sleep: time delay for after write buffer (millisecond)
|
|
||||||
# deadLine: timeout for io read and write (second)
|
|
||||||
mml:
|
|
||||||
port: 4100
|
|
||||||
sleep: 200
|
|
||||||
deadLine: 10
|
|
||||||
user: admin
|
|
||||||
password: admin
|
|
||||||
mmlHome: ./mmlhome
|
|
||||||
upload: /home/agtuser
|
|
||||||
|
|
||||||
# NE config
|
|
||||||
ne:
|
|
||||||
user: agtuser
|
|
||||||
etcdir: /usr/local/etc
|
|
||||||
bindir: /usr/local/bin
|
|
||||||
omcdir: /usr/local/omc
|
|
||||||
scpdir: /tmp
|
|
||||||
licensedir: /usr/local/etc/{neType}/license
|
|
||||||
# backup etc list of IMS, does not contain spaces
|
|
||||||
etcListIMS: "{*.yaml,mmtel,vars.cfg}"
|
|
||||||
|
|
||||||
# chk2ne: true/false, if put OmcNeConfig parameters to NE
|
|
||||||
omc:
|
|
||||||
uriPrefix: "/omc/rest"
|
|
||||||
neType: OMC
|
|
||||||
neId: 001
|
|
||||||
rmUID: 4400HX101
|
|
||||||
neName: OMC
|
|
||||||
province: GD
|
|
||||||
vendor: ""
|
|
||||||
dn: 4600
|
|
||||||
chk2ne: false
|
|
||||||
sn: "-"
|
|
||||||
checksign: false
|
|
||||||
rootDir: /usr/local/omc
|
|
||||||
binDir: /usr/local/omc/bin
|
|
||||||
backup: /usr/local/omc/backup
|
|
||||||
upload: /usr/local/omc/upload
|
|
||||||
frontUpload: /usr/local/omc/htdocs/front/upload
|
|
||||||
frontTraceDir: /usr/local/omc/htdocs/front/trace
|
|
||||||
software: /usr/local/omc/software
|
|
||||||
license: /usr/local/omc/license
|
|
||||||
gtpUri: gtp:192.168.2.119:2152
|
|
||||||
checkContentType: false
|
|
||||||
testMode: false
|
|
||||||
rbacMode: true
|
|
||||||
runDir: /usr/local/omc/run
|
|
||||||
cmdTimeout: 120
|
|
||||||
|
|
||||||
# Alarm module setting
|
|
||||||
# Forward interface:
|
|
||||||
# email/sms
|
|
||||||
alarm:
|
|
||||||
forwardAlarm: true
|
|
||||||
email:
|
|
||||||
smtp: smtp.xxx.com
|
|
||||||
port: 25
|
|
||||||
user: smtpuser@xxx.com
|
|
||||||
password: xxxxxx
|
|
||||||
# TLS skip verify: true/false
|
|
||||||
tlsSkipVerify: true
|
|
||||||
sms:
|
|
||||||
apiURL: http://smsc.xxx.com
|
|
||||||
accessKeyID: xxx
|
|
||||||
accessKeySecret: xxx
|
|
||||||
signName: XXX SMSC
|
|
||||||
templateCode: 1000
|
|
||||||
|
|
||||||
# User authorized information
|
|
||||||
# crypt: mysql/md5/bcrypt
|
|
||||||
# token: true/false to check accessToken
|
|
||||||
# expires for session, unit: second
|
|
||||||
# Support single/multiple session of user
|
|
||||||
#
|
|
||||||
auth:
|
|
||||||
crypt: bcrypt
|
|
||||||
token: true
|
|
||||||
expires: 1800
|
|
||||||
session: multiple
|
|
||||||
publicKey: /usr/local/omc/etc/certs/omc
|
|
||||||
privateKey: /usr/local/omc/etc/certs/omc
|
|
||||||
|
|
||||||
# Parameter for limit number
|
|
||||||
# rmuid_maxnum: the max number of rmUID, default: 50
|
|
||||||
# alarmid_maxnum: the max number of AlarmID, default: 50
|
|
||||||
# pmid_maxnum: the max number of pmID, default: 50
|
|
||||||
# subid_maxnum: the max number of subscription ID, default: 20
|
|
||||||
# uri_maxlen: the max length of uri, default: 8192
|
|
||||||
# rmuid_regexp: regexp pattern of rmUID
|
|
||||||
params:
|
|
||||||
rmuidmaxnum: 50
|
|
||||||
alarmidmaxnum: 50
|
|
||||||
pmidmaxnum: 50
|
|
||||||
subidmaxnum: 20
|
|
||||||
urimaxlen: 2100000
|
|
||||||
rmuidregexp: "[0-9]{4}[A-Z]{2}[A-Z]{2}[0-9A-Z]{1}[0-9A-Z]{3}[0-9A-Z]{1,16}"
|
|
||||||
|
|
||||||
testConfig:
|
|
||||||
enabled: false
|
|
||||||
file: /usr/local/omc/etc/testconfig.yaml
|
|
||||||
11
docker/omc/frontend/index.html
Normal file
11
docker/omc/frontend/index.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>OMC Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>OMC</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
0
docker/omc/logs/nginx/access.log
Normal file
0
docker/omc/logs/nginx/access.log
Normal file
0
docker/omc/logs/nginx/error.log
Normal file
0
docker/omc/logs/nginx/error.log
Normal file
0
docker/omc/logs/omc.log
Normal file
0
docker/omc/logs/omc.log
Normal file
0
docker/omc/machine.ini
Normal file
0
docker/omc/machine.ini
Normal file
@@ -48,7 +48,7 @@ http {
|
|||||||
|
|
||||||
# Path of the file with Diffie-Hellman parameters for EDH ciphers.
|
# Path of the file with Diffie-Hellman parameters for EDH ciphers.
|
||||||
# TIP: Generate with: `openssl dhparam -out /etc/ssl/nginx/dh2048.pem 2048`
|
# TIP: Generate with: `openssl dhparam -out /etc/ssl/nginx/dh2048.pem 2048`
|
||||||
ssl_dhparam /usr/local/omc/nginx/cert/dhparams.pem;
|
ssl_dhparam /etc/nginx/cert/dhparams.pem;
|
||||||
|
|
||||||
# Specifies that our cipher suits should be preferred over client ciphers.
|
# Specifies that our cipher suits should be preferred over client ciphers.
|
||||||
# Default is 'off'.
|
# Default is 'off'.
|
||||||
@@ -95,12 +95,39 @@ http {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
|
# 修改允许最大请求体大小为100MB
|
||||||
|
client_max_body_size 100M;
|
||||||
|
# 持久连接的超时时间默认60s
|
||||||
|
keepalive_timeout 180s;
|
||||||
|
|
||||||
|
#access_log /var/log/nginx/host.access.log main;
|
||||||
|
|
||||||
|
# ssl_certificate /usr/share/nginx/cert/www.x.cn_chain.crt;
|
||||||
|
# ssl_certificate_key /usr/share/nginx/cert/www.x.cn.key;
|
||||||
|
|
||||||
|
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
|
# ssl_session_timeout 5m;
|
||||||
|
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||||
|
# ssl_prefer_server_ciphers on;
|
||||||
|
# ssl_dhparam /usr/share/nginx/cert/dhparams.pem;
|
||||||
|
|
||||||
|
# OMC
|
||||||
|
location / {
|
||||||
|
root /usr/local/etc/omc/frontend;
|
||||||
|
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
location /omc-api/ {
|
location /omc-api/ {
|
||||||
proxy_pass http://127.0.0.1:3030/;
|
proxy_pass http://127.0.0.1:33030/;
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_connect_timeout 180s; # 默认60s
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_send_timeout 180s; # 默认60s
|
||||||
|
proxy_read_timeout 180s; # 默认60s
|
||||||
|
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
@@ -111,11 +138,30 @@ http {
|
|||||||
proxy_set_header X-Forwarded-Port $server_port;
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location /api/rest/ {
|
||||||
root /usr/local/bin/omc-frontend;
|
# 添加斜杠并重定向
|
||||||
|
#rewrite ^([^.]*[^/])$ $1/ permanent;
|
||||||
|
proxy_pass http://127.0.0.1:33030/api/rest/;
|
||||||
|
|
||||||
try_files $uri $uri/ /index.html;
|
proxy_cache_bypass $http_upgrade;
|
||||||
index index.html index.htm;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error_page 404 /404.html;
|
||||||
|
|
||||||
|
# redirect server error pages to the static page /50x.html
|
||||||
|
#
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/local/etc/omc/frontend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
178
docker/omc/omc.yaml
Normal file
178
docker/omc/omc.yaml
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
# file: log file name
|
||||||
|
# level: /trace/debug/info/warn/error/fatal, default: debug
|
||||||
|
# duration: rotation time with xx hours, example: 1/12/24 hours
|
||||||
|
# count: rotation count of log, default is 30 rotation
|
||||||
|
logger:
|
||||||
|
file: "/var/log/omc/restagent.log"
|
||||||
|
level: debug
|
||||||
|
duration: 24
|
||||||
|
count: 2
|
||||||
|
|
||||||
|
pprof:
|
||||||
|
enabled: true
|
||||||
|
addr: :33060
|
||||||
|
|
||||||
|
# rest agent listen ipv4/v6 and port, support multiple routines
|
||||||
|
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
||||||
|
# clientAuthType: 0:NoClientCert (default), 1:RequestClientCert, 2:RequireAnyClientCert,
|
||||||
|
# 3:VerifyClientCertIfGiven, 4:RequireAndVerifyClientCerts
|
||||||
|
rest:
|
||||||
|
- ipv4: 0.0.0.0
|
||||||
|
ipv6:
|
||||||
|
port: 33030
|
||||||
|
|
||||||
|
webServer:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
database:
|
||||||
|
type: mysql
|
||||||
|
user: root
|
||||||
|
password: "1000omc@kp!"
|
||||||
|
host: "192.168.9.58"
|
||||||
|
port: 13306
|
||||||
|
name: "omc_db"
|
||||||
|
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
|
||||||
|
backup: d:/omc.git/be.ems/restagent/database
|
||||||
|
|
||||||
|
# Redis data cache
|
||||||
|
redis:
|
||||||
|
dataSource:
|
||||||
|
# OMC system db
|
||||||
|
default:
|
||||||
|
port: 16379 # Redis port
|
||||||
|
host: "192.168.9.58" # Redis host
|
||||||
|
password: "helloearth"
|
||||||
|
db: 10 # Redis db_num
|
||||||
|
# used to specify the default data source for multiple data resourece
|
||||||
|
defaultDataSourceName: "default"
|
||||||
|
|
||||||
|
# sleep: time delay for after write buffer (millisecond)
|
||||||
|
# deadLine: timeout for io read and write (second)
|
||||||
|
mml:
|
||||||
|
sleep: 200
|
||||||
|
deadLine: 10
|
||||||
|
sizeRow: 600
|
||||||
|
sizeCol: 128
|
||||||
|
bufferSize: 65535
|
||||||
|
mmlHome: ./mmlhome
|
||||||
|
|
||||||
|
# Tracking configuration
|
||||||
|
trace:
|
||||||
|
enabled: true
|
||||||
|
host: "192.168.5.58" # Fill in the specific IP address
|
||||||
|
port: 33033
|
||||||
|
|
||||||
|
# NE config
|
||||||
|
ne:
|
||||||
|
user: omcuser
|
||||||
|
etcdir: /usr/local/etc
|
||||||
|
bindir: /usr/local/bin
|
||||||
|
omcdir: /usr/local/omc
|
||||||
|
scpdir: /tmp
|
||||||
|
licensedir: /usr/local/etc/{neType}/license
|
||||||
|
# backup etc list of IMS,no space
|
||||||
|
etcListIMS: "{*.yaml,mmtel,vars.cfg}"
|
||||||
|
etcListDefault: "{*.yaml,*.conf,*.cfg}"
|
||||||
|
# true/false to overwrite config file when dpkg ne software
|
||||||
|
dpkgOverwrite: false
|
||||||
|
# dpkg timeout (second)
|
||||||
|
dpkgTimeout: 180
|
||||||
|
|
||||||
|
# chk2ne: true/false, if put OmcNeConfig parameters to NE
|
||||||
|
omc:
|
||||||
|
uriPrefix: "/omc/rest"
|
||||||
|
neType: OMC
|
||||||
|
neId: 001
|
||||||
|
rmUID: 4400HX101
|
||||||
|
neName: OMC
|
||||||
|
province: GD
|
||||||
|
vendor: ""
|
||||||
|
dn: 4600
|
||||||
|
chk2ne: false
|
||||||
|
sn: "-"
|
||||||
|
checksign: false
|
||||||
|
rootDir: ./
|
||||||
|
binDir: ./bin
|
||||||
|
backup: C:/usr/local/omc/backup
|
||||||
|
upload: C:/usr/local/omc/upload
|
||||||
|
frontUpload: C:/usr/local/omc/upload
|
||||||
|
frontTraceDir: C:/usr/local/omc/trace
|
||||||
|
software: C:/usr/local/omc/software
|
||||||
|
license: C:/usr/local/omc/license
|
||||||
|
gtpUri: gtp:192.168.2.219:2152
|
||||||
|
checkContentType: false
|
||||||
|
testMode: false
|
||||||
|
rbacMode: true
|
||||||
|
runDir:
|
||||||
|
cmdTimeout: 120
|
||||||
|
|
||||||
|
# Alarm module setting
|
||||||
|
# Forward interface:
|
||||||
|
# TLS Skip verify: true/false
|
||||||
|
# email/sms
|
||||||
|
# smProxy: sms(Short Message Service)/smsc(SMS Centre)
|
||||||
|
# dataCoding: 0:GSM7BIT, 1:ASCII, 2:BINARY8BIT1, 3:LATIN1,
|
||||||
|
# 4:BINARY8BIT2, 6:CYRILLIC, 7:HEBREW, 8:UCS2
|
||||||
|
alarm:
|
||||||
|
alarmEmailForward:
|
||||||
|
enable: true
|
||||||
|
emailList:
|
||||||
|
smtp: mail.smtp.com
|
||||||
|
port: 25
|
||||||
|
user: smtpext@smtp.com
|
||||||
|
password: "1000smtp@omc!"
|
||||||
|
tlsSkipVerify: true
|
||||||
|
alarmSMSForward:
|
||||||
|
enable: true
|
||||||
|
mobileList: "1006,1008"
|
||||||
|
smscAddr: "192.168.14.212:2775"
|
||||||
|
systemID: "123456"
|
||||||
|
password: "123456"
|
||||||
|
systemType: "UTRAN"
|
||||||
|
dataCoding: 0
|
||||||
|
serviceNumber: "OMC"
|
||||||
|
sms:
|
||||||
|
apiURL: http://smsc.xxx.com/
|
||||||
|
accessKeyID: xxxx
|
||||||
|
accessKeySecret: xxxx
|
||||||
|
signName: xxx SMSC
|
||||||
|
templateCode: 1000
|
||||||
|
smProxy: smsc
|
||||||
|
|
||||||
|
#User authorized information
|
||||||
|
# crypt: mysql/md5/bcrypt
|
||||||
|
# token: true/false to check accessToken
|
||||||
|
# expires for session, unit: second
|
||||||
|
# Support single/multiple session of user
|
||||||
|
#
|
||||||
|
auth:
|
||||||
|
crypt: bcrypt
|
||||||
|
token: true
|
||||||
|
expires: 1800
|
||||||
|
session: multiple
|
||||||
|
publicKey: ./etc/certs/omc_pub.key
|
||||||
|
privateKey: ./etc/certs/omc_pri.key
|
||||||
|
|
||||||
|
# Parameter for limit number
|
||||||
|
# rmuid_maxnum: the max number of rmUID, default: 50
|
||||||
|
# alarmid_maxnum: the max number of AlarmID, default: 50
|
||||||
|
# pmid_maxnum: the max number of pmID, default: 50
|
||||||
|
# subid_maxnum: the max number of subscription ID, default: 20
|
||||||
|
# uri_maxlen: the max length of uri, default: 8192
|
||||||
|
# rmuid_regexp: regexp pattern of rmUID
|
||||||
|
params:
|
||||||
|
rmuidmaxnum: 50
|
||||||
|
alarmidmaxnum: 50
|
||||||
|
pmidmaxnum: 50
|
||||||
|
subidmaxnum: 20
|
||||||
|
urimaxlen: 2100000
|
||||||
|
rmuidregexp: "[0-9]{4}[A-Z]{2}[A-Z]{2}[0-9A-Z]{1}[0-9A-Z]{3}[0-9A-Z]{1,16}"
|
||||||
|
|
||||||
|
# 静态文件配置, 相对项目根路径或填绝对路径
|
||||||
|
staticFile:
|
||||||
|
# 默认资源,dir目录需要预先创建
|
||||||
|
default:
|
||||||
|
dir: "/usr/local/etc/omc/static"
|
||||||
|
# 文件上传资源目录映射,与项目目录同级
|
||||||
|
upload:
|
||||||
|
dir: "/usr/local/etc/omc/upload"
|
||||||
Reference in New Issue
Block a user