feat: psap init
This commit is contained in:
@@ -1,14 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [OPTION] deb|badeb|rpm"
|
echo "Usage: $0 [OPTION] deb|badeb|rpm|psap"
|
||||||
echo
|
echo
|
||||||
echo "Build omc package, option as follow:"
|
echo "Build omc package, option as follow:"
|
||||||
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
|
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
|
||||||
echo " badeb: ubuntu|debian package build by dpkg"
|
echo " badeb: ubuntu|debian package build by dpkg"
|
||||||
echo " rpm: centos/redhat package, build by rpmbuild"
|
echo " rpm: centos/redhat package, build by rpmbuild"
|
||||||
|
echo " psap psap package, build by dpkg"
|
||||||
|
echo
|
||||||
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
|
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
|
||||||
echo " -d dump SQL from database"
|
echo " -d dump SQL from database"
|
||||||
|
echo " -h, --help display this help and exit"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,7 +19,7 @@ pkgtype=""
|
|||||||
new_args=()
|
new_args=()
|
||||||
# Traverse all parameters
|
# Traverse all parameters
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" ]]; then
|
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" || "$arg" == "psap" ]]; then
|
||||||
pkgtype=$arg
|
pkgtype=$arg
|
||||||
else
|
else
|
||||||
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
|
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
|
||||||
@@ -351,6 +354,66 @@ case "${pkgtype}" in
|
|||||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||||
echo "Finish to make ${pkgtype} package <======"
|
echo "Finish to make ${pkgtype} package <======"
|
||||||
;;
|
;;
|
||||||
|
psap)
|
||||||
|
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}/omc.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
|
usage
|
||||||
exit 4
|
exit 4
|
||||||
@@ -57,12 +57,6 @@ redis:
|
|||||||
host: "127.0.0.1" # Redis host
|
host: "127.0.0.1" # Redis host
|
||||||
password: "helloearth"
|
password: "helloearth"
|
||||||
db: 10 # Redis db_num
|
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
|
# used to specify the default data source for multiple data resourece
|
||||||
defaultDataSourceName: "default"
|
defaultDataSourceName: "default"
|
||||||
|
|
||||||
@@ -78,7 +72,7 @@ mml:
|
|||||||
|
|
||||||
# Tracking configuration
|
# Tracking configuration
|
||||||
trace:
|
trace:
|
||||||
enabled: true
|
enabled: false
|
||||||
host: "172.16.5.100" # Fill in the specific IP address
|
host: "172.16.5.100" # Fill in the specific IP address
|
||||||
port: 33033
|
port: 33033
|
||||||
|
|
||||||
@@ -109,7 +103,9 @@ omc:
|
|||||||
vendor: ""
|
vendor: ""
|
||||||
dn: ""
|
dn: ""
|
||||||
chk2ne: false
|
chk2ne: false
|
||||||
|
capability: 50
|
||||||
sn: "-"
|
sn: "-"
|
||||||
|
expiryDate: "-"
|
||||||
checksign: false
|
checksign: false
|
||||||
rootDir: /usr/local/omc
|
rootDir: /usr/local/omc
|
||||||
binDir: /usr/local/omc/bin
|
binDir: /usr/local/omc/bin
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Package: OMC
|
Package: OMC
|
||||||
Version: 2.2503.5-YYYYMMDD
|
Version: 2.2503.5-20250414
|
||||||
Section: AGrandTech
|
Section: AGrandTech
|
||||||
Prioritt: optional
|
Prioritt: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
|
|||||||
@@ -57,12 +57,6 @@ redis:
|
|||||||
host: "127.0.0.1" # Redis host
|
host: "127.0.0.1" # Redis host
|
||||||
password: "helloearth"
|
password: "helloearth"
|
||||||
db: 10 # Redis db_num
|
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
|
# used to specify the default data source for multiple data resourece
|
||||||
defaultDataSourceName: "default"
|
defaultDataSourceName: "default"
|
||||||
|
|
||||||
@@ -78,7 +72,7 @@ mml:
|
|||||||
|
|
||||||
# Tracking configuration
|
# Tracking configuration
|
||||||
trace:
|
trace:
|
||||||
enabled: true
|
enabled: false
|
||||||
host: "172.16.5.100" # Fill in the specific IP address
|
host: "172.16.5.100" # Fill in the specific IP address
|
||||||
port: 33033
|
port: 33033
|
||||||
|
|
||||||
@@ -109,7 +103,9 @@ omc:
|
|||||||
vendor: ""
|
vendor: ""
|
||||||
dn: ""
|
dn: ""
|
||||||
chk2ne: false
|
chk2ne: false
|
||||||
|
capability: 50
|
||||||
sn: "-"
|
sn: "-"
|
||||||
|
expiryDate: "-"
|
||||||
checksign: false
|
checksign: false
|
||||||
rootDir: /usr/local/omc
|
rootDir: /usr/local/omc
|
||||||
binDir: /usr/local/omc/bin
|
binDir: /usr/local/omc/bin
|
||||||
|
|||||||
BIN
docs/requirement/PSAP-OPENAPI说明文档.docx
Normal file
BIN
docs/requirement/PSAP-OPENAPI说明文档.docx
Normal file
Binary file not shown.
BIN
docs/requirement/PSAP门户网站-20250319-V1.xlsx
Normal file
BIN
docs/requirement/PSAP门户网站-20250319-V1.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user