1
0

67 Commits

Author SHA1 Message Date
zhangsz
9bf9ac6479 release 1.2506.2 2025-06-20 19:11:50 +08:00
zhangsz
ff0f52efac fix: ... 2025-06-17 09:57:45 +08:00
zhangsz
b758a21bab fix: ... 2025-06-16 16:52:38 +08:00
zhangsz
aa974c21dc fix: ... 2025-06-16 16:50:33 +08:00
zhangsz
6affa5f93e fix: ... 2025-06-16 16:33:15 +08:00
zhangsz
1b531f3556 fix: changed omcd to psapd 2025-06-16 16:22:18 +08:00
zhangsz
4ebbbbf1f3 fix: change OMC to PSAP 2025-06-16 14:17:59 +08:00
zhangsz
f0688a4273 db name changed 2025-06-16 14:10:05 +08:00
zhangsz
e3319048ea release r1.2506.1 2025-06-16 11:42:56 +08:00
zhangsz
0f90394faa feat: ... 2025-06-16 11:41:54 +08:00
zhangsz
79c5378bc3 fix: icon update 2025-05-17 18:02:43 +08:00
zhangsz
e1cc70a0b8 for psap 2025-04-23 17:27:49 +08:00
zhangsz
1d29e002f3 fix: ... 2025-04-15 15:14:09 +08:00
zhangsz
fdcf8be579 feat: psap r1.2504.1 2025-04-15 12:04:21 +08:00
zhangsz
e2ee082cb8 fix:... 2025-04-15 11:48:09 +08:00
zhangsz
150d7aadbc feat: psap portal 2025-04-15 11:42:08 +08:00
zhangsz
4215a73c8c feat: psap portal 2025-04-15 11:33:33 +08:00
zhangsz
e1f4eb6267 feat: psap init 2025-04-14 16:05:39 +08:00
TsMask
17591b1705 chore: 更新版本号 2.2503.5 2025-04-12 10:11:01 +08:00
TsMask
5d9425c457 chore: 更新版本号 2.2503.4 2025-03-31 20:06:01 +08:00
TsMask
d8624c2fe9 chore: 更新版本号 2.2503.3 2025-03-21 15:36:13 +08:00
TsMask
cb8692cf44 chore: 更新版本号 2.2503.2 2025-03-14 11:04:59 +08:00
TsMask
cc45dd1be3 chore: 更新版本号 2.2503.1 2025-03-08 11:11:18 +08:00
TsMask
56d62831eb fix: badeb 中文字符串替换 2025-03-04 18:09:37 +08:00
TsMask
246fb027cd fix: badeb 中文字符串替换 2025-03-04 16:13:51 +08:00
TsMask
7818759109 chore: 更新版本号 2.2502.4 2025-02-28 19:56:37 +08:00
TsMask
48d5a0a783 feat: 添加kylin|anolis打包rpm 2025-02-24 16:36:32 +08:00
TsMask
e42d35c5e0 chore: 更新版本号 2.2502.3 2025-02-21 21:11:29 +08:00
zhangsz
667f6b1987 fix: ... 2025-02-21 19:39:40 +08:00
zhangsz
6adf76b589 fix: build arm /amd 2025-02-21 19:38:51 +08:00
zhangsz
49f0ba4a7a fix: ... 2025-02-20 21:20:04 +08:00
zhangsz
27826e4523 fix: ... 2025-02-20 21:16:25 +08:00
zhangsz
1316629dc8 fix:... 2025-02-20 21:06:47 +08:00
zhangsz
82a0d32f15 fix: git ignore 2025-02-20 20:42:35 +08:00
zhangsz
83ce21d2c3 fix: ... 2025-02-20 20:39:35 +08:00
zhangsz
1efc851b39 fix: support openEuler build 2025-02-20 19:50:18 +08:00
TsMask
d9c16a616c chore: 更新版本号 2.2502.2 2025-02-14 19:41:46 +08:00
TsMask
a2800bed0d chore: 更新版本号 2.2502.1 2025-02-08 19:47:04 +08:00
TsMask
cf97351fc9 chore: 更新版本号 2.2501.4 2025-01-24 20:42:17 +08:00
TsMask
251284aa38 chore: 更新版本号 2.2501.3 2025-01-17 18:43:50 +08:00
TsMask
1fe4eddd33 del: 移除程序打包service错误 2025-01-11 11:37:40 +08:00
TsMask
6211a88f2e del: 移除captrace/data2html/crontask程序 2025-01-11 10:17:20 +08:00
TsMask
b73cd05af8 chore: 更新版本号 2.2501.2 2025-01-10 19:41:54 +08:00
TsMask
16d20fcad4 chore: 更新版本号 2.2501.1 2025-01-03 21:51:22 +08:00
TsMask
9f1a097e2a chore: 更新版本号 2.2412.4 2024-12-28 10:56:29 +08:00
TsMask
cfa0825e22 chore: 更新版本号 2.2412.3 2024-12-20 18:55:56 +08:00
TsMask
5bc958e911 chore: 更新版本号 2.2412.2 2024-12-13 21:23:58 +08:00
TsMask
e636f76506 chore: 更新版本号 2.2412.1 2024-12-09 09:58:32 +08:00
TsMask
1ca15477ca chore: 更新版本号 2.2411.4 2024-11-30 17:14:23 +08:00
TsMask
7ce96a7178 chore: 更新版本号 2.2411.3 2024-11-23 16:38:37 +08:00
TsMask
639107ba3d chore: 更新版本号 2.2411.2 2024-11-15 18:17:41 +08:00
dd0d67c0ea update spec for ky10 arm build 2024-11-12 09:24:50 +08:00
343e32735d update spec for build 2024-11-08 19:39:40 +08:00
37477ad9f1 update spec for build 2024-11-08 19:25:56 +08:00
1fb64561c4 update spec for build 2024-11-08 19:15:39 +08:00
abb2a8a33d update spec for build 2024-11-08 19:11:31 +08:00
TsMask
1dc143c062 chore: 更新版本号 2.2411.1 2024-11-08 17:56:57 +08:00
ff7973194f update makepkg.sh 2024-11-07 16:40:44 +08:00
c9277f1123 shell to sed fe src/hooks 2024-11-07 15:16:15 +08:00
b8c1740875 update make package shell 2024-11-07 14:57:42 +08:00
121cbea72e update make package sh 2024-11-07 14:46:21 +08:00
3e08ef0cc4 update build package shell script 2024-11-07 14:37:00 +08:00
38dabd180d support customized images and locales for FE 2024-11-07 11:47:18 +08:00
cd6578f57c update npm install --force 2024-11-05 18:02:49 +08:00
TsMask
f403456185 chore: 更新版本号 2.2410.4 2024-11-02 15:35:36 +08:00
dbded5635f update git ignore list 2024-11-01 17:29:25 +08:00
44fad7ae82 Optimize the packaging process 2024-11-01 17:24:37 +08:00
42 changed files with 279 additions and 505 deletions

30
.gitignore vendored
View File

@@ -12,26 +12,20 @@
# Run temp file and dir
docs/temp/
# Built Visual Studio Code Extensions
*.vsix
*.bak
# build files
build
debbuild/etc
debbuild/usr
debbuild/lib
debbuild/22.04/etc
debbuild/22.04/usr
debbuild/22.04/lib
release
rpmbuild/RPMS
rpmbuild/SOURCES
rpmbuild/BUILD
build/usr/local/omc/bin/captrace
build/usr/local/omc/bin/crontask
build/usr/local/omc/bin/data2html
build/usr/local/omc/bin/restagent
build/usr/local/omc/bin/sshsvc
debbuild/22.04/usr/local/omc/bin/captrace
debbuild/22.04/usr/local/omc/bin/crontask
debbuild/22.04/usr/local/omc/bin/data2html
debbuild/22.04/usr/local/omc/bin/restagent
debbuild/22.04/usr/local/omc/bin/sshsvc
# release package
build/usr/local/omc/htdocs
debbuild/22.04/usr/local/omc/htdocs
debbuild/usr/local/omc/htdocs
build/
debbuild/
release/

View File

@@ -1,14 +1,17 @@
#!/bin/bash
usage() {
echo "Usage: $0 [OPTION] deb|badeb|rpm"
echo "Usage: $0 [OPTION] deb|badeb|rpm|psapdeb"
echo
echo "Build omc package, option as follow:"
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
echo " badeb: ubuntu|debian package build by dpkg"
echo " rpm: centos/redhat package, build by rpmbuild"
echo " psapdeb psap package, build by dpkg"
echo
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
echo " -d dump SQL from database"
echo " -h, --help display this help and exit"
echo
}
@@ -16,7 +19,7 @@ pkgtype=""
new_args=()
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" ]]; then
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" || "$arg" == "psapdeb" ]]; then
pkgtype=$arg
else
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
@@ -31,7 +34,7 @@ fi
# Use a new parameter list
set -- "${new_args[@]}"
GitLocalRoot=${HOME}/omc.git
GitLocalRoot=${HOME}/${ProjectL}.git
while getopts "r:d" option; do
case $option in
r)
@@ -53,10 +56,10 @@ if [ ! -d ${GitLocalRoot} ]; then
exit 3
fi
ProjectL=omc
ProjectU=OMC
ProjectL=psap
ProjectU=PSAP
PROJECT=${ProjectL}
VERSION=2.2410.3
VERSION=1.2506.2
RelDate=`date +%Y%m%d`
RelVer=${VERSION}-${RelDate}
Ky10Arch=ky10.aarch64
@@ -66,9 +69,10 @@ DebPkgName=${ProjectL}-r${RelVer}-ub*.deb
EmsBEDir=${GitLocalRoot}/be.ems
EmsBuildRoot=${GitLocalRoot}/build.ems
RpmArch=`arch`
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS/
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS
ReleaseDir=${EmsBuildRoot}/release
DumpToolDir=${EmsBEDir}/tools/misc
ProjectTag=""
BuildDir=${EmsBuildRoot}/build
CustomizedDir=${EmsBuildRoot}/customized
@@ -79,12 +83,13 @@ BuildLibDir=${BuildDir}/lib
BuildLibSystemDir=${BuildLibDir}/systemd/system
DebBuildDir=${EmsBuildRoot}/debbuild
DebBuildOMCDir=${EmsBuildRoot}/debbuild/usr/local/omc
DebFEBuildDir=${EmsBuildRoot}/debbuild/usr/local/omc/htdocs
DebFEBuildDir=${DebBuildOMCDir}/htdocs
DebBuild2204Dir=${EmsBuildRoot}/debbuild/22.04
DebBuild2204OMCDir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc
DebFEBuild2204Dir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc/htdocs
DebFEBuild2204Dir=${DebBuild2204OMCDir}/htdocs
RpmBuildDir=${EmsBuildRoot}/rpmbuild
RpmFEBuildDir=${RpmBuildDir}/BUILD/usr/local/omc/htdocs
RpmBuildOMCDir=${RpmBuildDir}/BUILD/usr/local/omc
RpmFEBuildDir=${RpmBuildOMCDir}/htdocs
OmcInstallDir=/usr/local/omc
ConfigEtcDir=${EmsBEDir}/config/etc
ConfigSystemdDir=${EmsBEDir}/config/systemd
@@ -92,36 +97,92 @@ EmsFEDir=${GitLocalRoot}/fe.ems
EmsFEVue3Dir=${GitLocalRoot}/fe.ems.vue3/dist
LibDir=${EmsBEDir}/lib
RESTAGENT=restagent
CRONTASK=crontask
SshSvcBin=sshsvc
CapTraceBin=captrace
Data2htmlBin=data2html
NBI_ALARM=nbi_alarm
NBI_AGENT=nbi_agent
AAAA_AGENT=4a_agent
RestagentDir=${EmsBEDir}/${RESTAGENT}
CrontaskDir=${EmsBEDir}/${CRONTASK}
SshSvcDir=${EmsBEDir}/${SshSvcBin}
CapTraceDir=${EmsBEDir}/${CapTraceBin}
Data2htmlDir=${EmsBEDir}/${Data2htmlBin}
DBSQLSrcDir=${EmsBEDir}/database
MiscDir=${EmsBEDir}/misc
FrontBuildDir=${BuildOMCDir}/htdocs
FrontSrcDir=${EmsBEDir}/front
CrontaskSize=27788951
RestagentSize=29525312
BinWriterDir=${HOME}/bin
if [[ ${RpmArch} =~ "x86_64" ]];then
# Get the output of uname -a
UnameOutput=$(uname -a)
# Extract hardware architecture
if [[ $UnameOutput =~ "x86_64" ]]; then
RelArch=amd64
elif [[ ${RpmArch} =~ "aarch64" ]];then
RpmArch=x86_64
elif [[ $UnameOutput =~ "aarch64" ]]; then
RelArch=arm64
RpmArch=aarch64
else
echo "Unsupported hardware architecture"
exit 1
fi
get_os_info() {
if [ -f /etc/os-release ]; then
. /etc/os-release
echo $ID
else
echo "unknown"
fi
}
get_os_version() {
if [ -f /etc/os-release ]; then
. /etc/os-release
echo $VERSION_ID
else
echo "unknown"
fi
}
OSVersion=$(get_os_version)
case $(get_os_info) in
ubuntu|debian)
ptype=deb
if [[ "$OSVersion" == "22.04" ]]; then
RelOS=ub22
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
elif [[ "$OSVersion" == "18.04" ]]; then
RelOS=ub18
else
echo "Unsupported Ubuntu version: $OSVersion"
exit 1
fi
;;
centos|rhel)
ptype=rpm
RelOS=ct8
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
openEuler)
ptype=rpm
RelOS=oe20
RpmPkgName=${ProjectL}-${RelVer}.${RpmArch}.${ptype}
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
kylin|anolis)
ptype=rpm
RelOS=ky
RpmPkgName=${ProjectL}-${RelVer}.${RpmArch}.${ptype}
RpmPkgRename=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
;;
*)
echo "Unsupported OS"
exit 1
;;
esac
case "${pkgtype}" in
rpm)
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/rpms/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
ProcList="restagent sshsvc"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
@@ -137,24 +198,15 @@ case "${pkgtype}" in
rm -rf ${RpmBuildDir}/BUILD/usr/local/omc/etc/db/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
# ${BinWriterDir}/binWriter ${BuildOMCBinDir}/${RESTAGENT} ${RestagentSize}
# ${BinWriterDir}/binWriter ${BuildOMCBinDir}/${CRONTASK} ${CrontaskSize}
# cp -rf ${MiscDir}/ne-hosts ${BuildOMCBinDir}
# cp -rf ./nbi/${NBI_ALARM}/bin/${NBI_ALARM} ${BinDir2}
# cp -rf ./nbi/${NBI_AGENT}/bin/${NBI_AGENT} ${BinDir2}
# cp -rf ./${4A_AGENT}/bin/${4A_AGENT} ${BinDir2}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
# rm -rf ${BinDir2}/ne-hosts
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
#Get SQL from database, overwrite from git
if [ "$dumpdb" = "yes" ]; then
cd ${DumpToolDir}
@@ -166,22 +218,23 @@ case "${pkgtype}" in
mkdir -p ${FrontBuildDir}/front
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
# chmod 755 ${BinDir2}/*
cp -rf ${BuildDir}/* ${RpmBuildDir}/BUILD/
#cp -rf ${BuildDir}/nginx ${RpmBuildDir}/BUILD/etc/
#cp -rf ${BuildDir}/systemd ${RpmBuildDir}/BUILD/lib/
cp -rf ${CustomizedDir}/agt.d ${RpmBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${RpmBuildOMCDir}/static
cd ${RpmBuildDir}
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
mv -f $RpmsDir/$RpmArch/$RpmPkgName ${ReleasePkgDir}/$RpmPkgRename
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
rm -f ${ProjectL}-md5sum.txt
# rpm --addsign *.rpm
md5sum $RpmPkgRename >omc-md5sum.txt
md5sum $RpmPkgRename >${ProjectL}-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
deb)
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
ProcList="restagent sshsvc"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
@@ -189,19 +242,10 @@ case "${pkgtype}" in
make
done
VersionID=`grep VERSION_ID /etc/os-release`
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22.deb
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18.deb
else
echo "Invalid OS release: ${VersionID}"
exit 1
fi
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-${ProjectTag}.${ptype}
fi
cd ${EmsBEDir}
@@ -213,17 +257,14 @@ case "${pkgtype}" in
rm -rf ${DebBuildOMCDir}/static/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "${dumpdb}" = "yes" ]; then
cd ${DumpToolDir}
@@ -238,22 +279,25 @@ case "${pkgtype}" in
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
# rpm --addsign *.rpm
md5sum ${DebPkgName} >omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======="
;;
badeb)
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent crontask sshsvc captrace data2html"
ProcList="restagent sshsvc"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
@@ -261,19 +305,7 @@ case "${pkgtype}" in
make
done
VersionID=`grep VERSION_ID /etc/os-release`
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
DebBuildDir=${DebBuild2204Dir}
DebBuildOMCDir=${DebBuild2204OMCDir}
DebFEBuildDir=${DebFEBuild2204Dir}
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub22-ba.deb
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
DebPkgFile=${PROJECT}-r${VERSION}-${RelDate}-ub18-ba.deb
else
echo "Invalid OS release: ${VersionID}"
exit 1
fi
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-ba.deb
cd ${EmsBEDir}
@@ -285,17 +317,15 @@ case "${pkgtype}" in
rm -rf ${DebBuildOMCDir}/static/*
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
cp -rf ${CrontaskDir}/${CRONTASK} ${BuildOMCBinDir}
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
cp -rf ${CapTraceDir}/${CapTraceBin} ${BuildOMCBinDir}
cp -rf ${Data2htmlDir}/${Data2htmlBin} ${BuildOMCBinDir}
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgvue3
#Get SQL from database, overwrite from git
if [ "${dumpdb}" = "yes" ]; then
cd ${DumpToolDir}
@@ -311,16 +341,78 @@ case "${pkgtype}" in
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/ba.d ${DebBuildOMCDir}/static
# replace Chinese character
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥]//g' {} +
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
echo "Replace all chinese character."
chmod +x ${DebBuildDir}/usr/local/omc/bin
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
psapdeb)
ProjectL="psap"
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
echo "Make $procName ..."
make
done
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-${ProjectTag}.${ptype}
fi
cd ${EmsBEDir}
#make deb
# clear build cache
rm -rf ${FrontBuildDir}/front/*
rm -rf ${DebFEBuildDir}/front/*
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
rm -rf ${DebBuildOMCDir}/static/*
for procName in $ProcList;do
cd $EmsBEDir/$procName
cp -rf ${procName} ${BuildOMCBinDir}
done
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
#Get SQL from database, overwrite from git
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
chmod 755 ${DebBuildDir}/DEBIAN/preinst
chmod 755 ${DebBuildDir}/DEBIAN/postinst
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======="
;;
*)
usage

View File

@@ -11,11 +11,19 @@ usage() {
echo " -m, =be|fe|all be: only process back-end code, default if non input"
echo " fe: only process front-end code"
echo " all: process all include be and fe"
echo " -c, =ba|psap ba: customized for BA OMC, psap: customized for PSAP Portal"
}
pkgtype=""
new_args=()
be_args=()
handle_invalid_option() {
echo "Invalid option: -$1" >&2
usage
exit 2
}
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "rpm" ]]; then
@@ -49,13 +57,19 @@ while getopts "m:r:c:d" option; do
be_args+=("-d")
;;
c)
pkgtype="badeb"
be_args+=("$pkgtype")
c_arg=$(echo $OPTARG | tr '[:upper:]' '[:lower:]')
if [ "${c_arg}" == "ba" ]; then
pkgtype="badeb"
be_args+=("${pkgtype}")
elif [ "${c_arg}" == "psap" ]; then
pkgtype="psapdeb"
be_args+=("${pkgtype}")
else
handle_invalid_option "$OPTARG"
fi
;;
\?)
echo "Invalid option: -$OPTARG" >&2
usage
exit 2
handle_invalid_option "$OPTARG"
;;
esac
done
@@ -66,36 +80,66 @@ if [ ! -d ${rootdir} ]; then
fi
bedir=${rootdir}/be.ems
fedir=${rootdir}/fe.ems.vue3
builddir=${rootdir}/build.ems
buildcustomized=${builddir}/customized
customizeddir=${buildcustomized}/${c_arg}.d
fedir=${rootdir}/fe.ems.vue3
feassetsdir=${fedir}/src/assets
felocalesdir=${fedir}/src/i18n/locales
feconstantsdir=${fedir}/src/constants
fehooksdir=${fedir}/src/hooks
makefe() {
cd ${fedir}
git checkout ${feassetsdir}
git checkout ${felocalesdir}
git checkout ${feconstantsdir}
git checkout ${fehooksdir}
git pull
npm install --registry https://registry.npmmirror.com
if [ "${pkgtype}" == "badeb" ]; then
cp -rf ${customizeddir}/images/* ${feassetsdir}
cp -rf ${customizeddir}/locales/* ${felocalesdir}
find "${feconstantsdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
find "${fehooksdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
fi
npm install --force --registry https://registry.npmmirror.com
echo -n "Building front-end vue ... "
npm run build 1>/dev/null
if [ $? = 0 ]; then
echo "done"
fi
git checkout ${feassetsdir}
git checkout ${felocalesdir}
git checkout ${feconstantsdir}
git checkout ${fehooksdir}
}
makebe() {
cd ${builddir}
cd ${builddir}/bin
#chmod +x mkpkg.sh
chmod +x build.sh
./build.sh ${be_args[@]}
}
post_makepkg() {
cd ${builddir}
git checkout debbuild/DEBIAN/
git checkout debbuild/22.04/DEBIAN/
}
case "${m_arg}" in
fe)
makefe
;;
all)
makefe
makebe
makebe
post_makepkg
;;
be | *)
makebe
makebe
post_makepkg
;;
esac

View File

@@ -1,44 +0,0 @@
# file: log file name
# level: /trace/debug/info/warn/error/fatal, default: debug
# duration: saved days, default is 30 days
logger:
file: /usr/local/omc/log/crontask.log
level: warn
duration: 24
count: 90
omc:
name: OMC01
hosturi: http://127.0.0.1:33030
hostno: A001
province: ""
netabbr: HX
vendor: ""
tasks:
file: /usr/local/omc/etc/tasks.yaml
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
# northbound interface, cm/pm
# duration(day): saved days
# zipPeriods(day): periods of zip pm data file
nbi:
cm:
cfgfiledir: /usr/local/omc/etc/cm
xmlfiledir: /opt/omc/ftp
version: V1.0.1
duration: 30
pm:
cfgfiledir: /usr/local/omc/etc/pm
xmlfiledir: /opt/omc/ftp
version: V1.0.1
duration: 30
zipPeriods: 1

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
name: psap_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -57,12 +57,6 @@ redis:
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# UDM sub/auth db
udmuser:
port: 6379 # Redis port
host: "127.0.0.1"
password: "helloearth"
db: 0 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
@@ -78,7 +72,7 @@ mml:
# Tracking configuration
trace:
enabled: true
enabled: false
host: "172.16.5.100" # Fill in the specific IP address
port: 33033
@@ -109,7 +103,9 @@ omc:
vendor: ""
dn: ""
chk2ne: false
capability: 50
sn: "-"
expiryDate: "-"
checksign: false
rootDir: /usr/local/omc
binDir: /usr/local/omc/bin

View File

@@ -71,7 +71,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
name: psap_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc:

View File

@@ -1,183 +0,0 @@
# example:
# tasks:
# - name: test # task comment
# uri: # restful uri
# params: # params of url
# interval: 30 # do sometion in the interval
# unit: Seconds #Seconds/Minutes/Hours/Days/Weeks, Monday/Tuesday/.../Sunday,
# at: 00:10:00 # do at time such as xx:xx:xx
# do: HelloWorldTask # (Do what: callback function)
#
# Attention: must restart crontask after modified this file
#
tasks:
- name: test # task comment
status: Active #active/inactive
uri: # restful uri
params: # params of http url
body: # body of http request
interval: 60 # do sometion in the interval
unit: Seconds #Seconds/Minutes/Hours/Days/Weeks, Monday/Tuesday/.../Sunday,
at: 00:10:00 # do at time such as xx:xx:xx when unit such as Day/Days/Mondays...
do: TaskHelloWorld # (Do what: callback function)
- name: clear expired history alarm
status: Inactive
uri: /api/rest/databaseManagement/v1/omc_db/alarm
params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0'
interval: 1
unit: Days
at: 00:10:00
do: TaskDeleteExpiredRecord
- name: clear expired history gold_kpi
status: Inactive
uri: /api/rest/databaseManagement/v1/omc_db/gold_kpi
params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day)
interval: 1
unit: Days
at: 00:12:00
do: TaskDeleteExpiredRecord
- name: clear deleted custom pm kpi
uri: /api/rest/databaseManagement/v1/omc_db/pm_custom_title
params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted'
interval: 1
unit: Days
at: 00:15:00
do: TaskDeleteExpiredRecord
- name: update expired user session
status: Inactive
uri: /api/rest/databaseManagement/v1/omc_db/session
params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online'
body: '{"session":{"status":"offline"}}'
interval: 30
unit: Seconds
at:
do: TaskUpdateTable
- name: clear expired log
status: Inactive
uri:
params:
interval: 1
unit: Days
at: 00:50:00
do: TaskDeleteExpiredRecord
- name: Backup measure data
uri: /api/rest/databaseManagement/v1/omc_db/measure_data
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b
interval: 1
unit: Days
at: 00:20:00
do: TaskDBBackupCSVGetBySQL
- name: Backup operation log
uri: /api/rest/databaseManagement/v1/omc_db/operation_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b
interval: 1
unit: Days
at: 00:26:00
do: TaskDBBackupCSVGetBySQL
- name: Backup security log
uri: /api/rest/databaseManagement/v1/omc_db/security_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b
interval: 1
unit: Days
at: 00:28:00
do: TaskDBBackupCSVGetBySQL
- name: Backup alarm log
uri: /api/rest/databaseManagement/v1/omc_db/alarm_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b
interval: 1
unit: Days
at: 00:30:00
do: TaskDBBackupCSVGetBySQL
- name: handshake to NF
status: Active
uri: /api/rest/systemManagement/v1/elementType/%s/objectType/systemState
params:
interval: 10
unit: Seconds
at:
do: TaskHandShakeToNF
- name: Export CM from NF
status: Inactive
uri: /api/rest/systemManagement/v1/elementType/%s/objectType/cm
params: ne_id=%s
interval: 1
unit: Days
at: 00:15
do: TaskExportCmFromNF
- name: Generate NRM xml file
uri:
params:
interval: 1
unit: Day
at: 00:00,06:00,12:00,18:00
do: GenCmXmlFile
- name: Task of Generate measure threshold alarm
status: Active
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10200
interval: 10
unit: Seconds
at:
do: TaskGenMeasureThresholdAlarm
- name: Task of Generate license alarm
status: Inactive
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10100 #alarm_code
interval: 1
unit: Days
at: 00:30
do: TaskGenLicenseAlarm
- name: Task of Generate NE system state alarm
status: Inactive
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10000
interval: 5
unit: Seconds
at:
do: TaskGenNeStateAlarm
- name: Task of Generate Measure Report Timeout
status: Active
uri: /api/rest/faultManagement/v1/elementType/%s/objectType/alarms
params: 10201
interval: 10
unit: Seconds
at:
do: TaskGenMeasureReportTimeoutAlarm
- name: Monitor proces list and write system log
uri: /api/rest/databaseManagement/v1/omc_db/system_log
params:
body:
interval: 10
unit: Seconds
at:
do: TaskWriteSystemLog
- name: Copy log to /opt/omc/ftp/log
uri:
params: cp -rf /usr/local/omc/database/*.csv /opt/omc/ftp/log
interval: 10
unit: Minutes
at:
do: TaskRunShellCommand
# - name: Import CM to NF
# uri: /api/rest/systemManagement/v1/elementType/udm/objectType/cm
# params: ne_id=SZ_01
# interval: 15
# unit: Seconds
# at:
# do: TaskImportCmToNF
crontab:
# - name: 每隔1分钟执行
# tab: 0 */1 * * * ? // crontab: rule like linux crontab
# do: CronHelloWorldTask // function name to call
# params:
- name: Generate PM xml file
status: Active
tab: 5,20,35,50 * * * *
do: GenPmXmlFile
uri: this is uri
params: Generating PM xml file
# - name: Import CM to NF
# tab: 0 * * * * *
# do: TaskImportCmToNF
# uri: /api/rest/systemManagement/v1/elementType/udm/objectType/cm
# params: ne_id=SZ_01

View File

@@ -8,10 +8,10 @@ REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', '
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2025 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2025 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

View File

@@ -1,20 +0,0 @@
SET FOREIGN_KEY_CHECKS = 0;
--
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.bluearcus.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
UPDATE `sys_menu` SET `status` = '0' WHERE `menu_id` = 2122;
SET FOREIGN_KEY_CHECKS = 1;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

View File

@@ -8,10 +8,10 @@ REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', '
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'OMC', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'OMC', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,8 +1,9 @@
Package: OMC
Version: 2.2410.3-YYYYMMDD
Package: PSAP
Version: 1.2506.2-20250616
Section: AGrandTech
Prioritt: optional
Architecture: amd64
Maintainer: Simon Zhangsz
Depends:
Description: OMC
Description: psap

View File

@@ -4,36 +4,23 @@ OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OmcBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OmcDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
CFileList="restconf.yaml sshsvc.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi
@@ -60,7 +47,7 @@ fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
@@ -82,9 +69,7 @@ systemctl daemon-reload
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
@@ -104,9 +89,7 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
echo -n "Starting PSAP service ... "
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,13 +1,5 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
@@ -15,17 +7,13 @@ rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -2,11 +2,9 @@
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db
name: psap_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -57,12 +57,6 @@ redis:
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# UDM sub/auth db
udmuser:
port: 6379 # Redis port
host: "127.0.0.1"
password: "helloearth"
db: 0 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
@@ -78,7 +72,7 @@ mml:
# Tracking configuration
trace:
enabled: true
enabled: false
host: "172.16.5.100" # Fill in the specific IP address
port: 33033
@@ -109,7 +103,9 @@ omc:
vendor: ""
dn: ""
chk2ne: false
capability: 50
sn: "-"
expiryDate: "-"
checksign: false
rootDir: /usr/local/omc
binDir: /usr/local/omc/bin

View File

@@ -1,5 +1,5 @@
Package: OMC
Version: 2.2410.3-YYYYMMDD
Version: 1.2506.2-YYYYMMDD
Section: AGrandTech
Prioritt: optional
Architecture: amd64

View File

@@ -4,36 +4,23 @@ OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OmcBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OmcDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
CFileList="restconf.yaml sshsvc.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi
@@ -60,7 +47,7 @@ fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
@@ -82,9 +69,7 @@ systemctl daemon-reload
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
@@ -104,9 +89,7 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
echo -n "Starting PSAP service ... "
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,13 +1,5 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
@@ -15,17 +7,13 @@ rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -2,11 +2,9 @@
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
echo -n "Stopping PSAP service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi

Binary file not shown.

Binary file not shown.

6
package-lock.json generated
View File

@@ -1,6 +0,0 @@
{
"name": "build.ems",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@@ -8,7 +8,7 @@
Name: %{project_lname}
Summary: 5GC OMC
Version: 2.2410.3
Version: 1.2506.2
Release: %{release_date}
Vendor: omc
URL: https://www.omc.com/
@@ -33,50 +33,40 @@ chmod +rx ${RPM_BUILD_ROOT}/usr/lib64/*
OMCRootDir=/usr/local/omc
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
UsrLib64Dir=/usr/lib64
OMCBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OMCDaemon=omcd
NginxEtcDir=/etc/nginx
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
CFileList="restconf.yaml sshsvc.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
for CFile in ${CFileList}; do
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
else
#else
# mv -f ${OMCEtcDir}/${CFile} ${OMCEtcDir}/${CFile}.bak
# cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
if [ -e "${OMCBinDir}/upgconf.sh" ]; then
${OMCBinDir}/upgconf.sh
fi
#if [ -e "${OMCBinDir}/upgconf.sh" ]; then
# ${OMCBinDir}/upgconf.sh
#fi
fi
done
if [ ! -e "${FERootDir}/config.js" ]; then cp ${FERootDir}/default/config.js ${FERootDir}; fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
if ! id -u omc >/dev/null 2>&1 ; then useradd -d /opt/omc -m -s /bin/bash -p1000ftp@kp omc; else echo "user omc exist"; fi
mkdir -p /opt/omc/ftp
mkdir -p /opt/omc/ftp/log
cd ${UsrLib64Dir}
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
@@ -89,9 +79,7 @@ firewall-cmd --reload
systemctl daemon-reload
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
# read environment parameter and to do
if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
@@ -110,23 +98,13 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
echo -n "Starting OMC service ... "
systemctl start captrace.service
systemctl start sshsvc.service
systemctl start crontask.service
systemctl start restagent.service
echo "done"
# 卸载时执行
%postun
UsrLocalBinDir=/usr/local/bin
UsrLib64Dir=/usr/lib64
cd ${UsrLib64Dir}
rm libwireshark.so.15
rm libwireshark.so
rm libwiretap.so.12
rm libwiretap.so
rm libwsutil.so.13
rm libwsutil.so
rm -f ${UsrLocalBinDir}/omcd
# setting firewall
@@ -138,25 +116,17 @@ firewall-cmd --reload
if [ "$1" = "0" ] ; then
sudo systemctl stop restagent.service
sudo systemctl stop crontask.service
sudo systemctl stop sshsvc.service
sudo systemctl stop captrace.service
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
sudo systemctl disable restagent.service
sudo systemctl disable crontask.service
sudo systemctl disable sshsvc.service
sudo systemctl disable captrace.service
sudo systemctl daemon-reload
else
sudo systemctl daemon-reload
sudo systemctl stop restagent.service
sudo systemctl stop crontask.service
sudo systemctl stop sshsvc.service
sudo systemctl stop captrace.service
sudo systemctl start crontask.service
sudo systemctl start sshsvc.service
sudo systemctl start captrace.service
sudo systemctl start restagent.service
fi
@@ -179,11 +149,7 @@ fi
/usr/local/omc/static
#/etc/nginx/conf.d/omc.conf
/lib/systemd/system/restagent.service
/lib/systemd/system/crontask.service
/lib/systemd/system/sshsvc.service
/lib/systemd/system/captrace.service
/usr/lib64/libwireshark.so.15.0.12
/usr/lib64/libwiretap.so.12.0.12
/usr/lib64/libwsutil.so.13.1.0
/usr/local/bin/tshark