490 Commits
Author SHA1 Message Date
TsMask 458d8c9755 fix: 更新ne_info插入语句,修正字段格式并调整注释 2025-10-17 10:27:00 +08:00
TsMask 5a59f6547b fix: 统一脚本shebang为#!/usr/bin/env bash 2025-10-15 14:57:42 +08:00
TsMask b05211489e fix: 更新ne_info插入语句,添加额外的字段以记录脚本执行时间 2025-09-16 11:50:39 +08:00
TsMask a546f1783d fix: 在升级过程中停止omc.service以确保正确更新 2025-09-15 17:34:58 +08:00
TsMask 620dfe629f fix: 初始网元license表插入字段变更 2025-08-29 19:26:40 +08:00
TsMask e07774bc57 fix: 去除set -e导致脚本退出 2025-08-27 17:48:43 +08:00
TsMask 707a0c0e0b feat: 升级前stop omc.service,防止sqlilte文件更新错误 2025-08-18 16:06:37 +08:00
TsMask 2f6ad6cac0 feat: 更新前端版本号 2025-08-15 18:44:03 +08:00
TsMask 9036324202 fix: 在多个脚本中添加set -e以确保错误处理 2025-08-15 11:19:34 +08:00
TsMask 299b87d95b fix: 忽略文件导致无法正常提交内容 2025-08-07 16:05:08 +08:00
TsMask 75c22c4d8e Merge branch 'main-v2' of http://192.168.2.166:3180/OMC/build.ems into main-v2 2025-08-07 16:03:14 +08:00
TsMask 4aa0c545a1 style: 更新默认分支和使用说明 2025-08-07 16:03:11 +08:00
zhangsz f6203348bd update .gitignore 2025-08-01 15:49:06 +08:00
TsMask 1aa84000fe fix: nginx访问地址404补充/ 2025-07-22 18:54:42 +08:00
TsMask f925645b88 feat: 将sshsvc移除 2025-07-16 15:46:20 +08:00
TsMask 6ab25532e5 fix: 初始网元脚本local ssh地址变更ssh记录 2025-06-11 18:35:47 +08:00
TsMask 4c2bab63f2 feat: 初始网元脚本支持多组 2025-06-07 14:18:50 +08:00
TsMask b7a3aca364 feat: 将nginx配置文件分开为HTTP和HTTPS服务,默认单个负载均衡 2025-06-05 20:05:48 +08:00
TsMask 1f11bf2bbc fix: docker安装配置文件注释相关修改 2025-05-30 19:25:16 +08:00
TsMask 5518d0a8bf fix: 添加执行脚本服务的输出日志文件 2025-05-29 19:40:53 +08:00
TsMask e986487579 feat: 添加omc执行脚本的systemd服务 2025-05-29 19:32:01 +08:00
TsMask 551dfb3587 fix: 更新构建脚本以生成MD5和SHA256文件 2025-05-23 21:05:44 +08:00
TsMask d103c3632c fix: 升级配置目录放置 2025-05-22 18:35:49 +08:00
TsMask 6e769c468d feat: 添加对alpine3.20的支持并更新相关Dockerfile和脚本 2025-05-21 16:14:52 +08:00
TsMask e279b75c49 fix: 更新数据库配置设置 2025-05-21 14:23:58 +08:00
TsMask 2f5031cbd4 fix: 更新脚本以支持远程数据库配置和修复文件路径 2025-05-21 10:20:02 +08:00
TsMask 46bc90c2e4 fix: 更新Docker构建脚本 2025-05-20 18:47:08 +08:00
TsMask ac23c3a9f1 fix: 更新Docker构建脚本 2025-05-19 19:00:59 +08:00
TsMask ccad67ca7a fix: 更新Docker构建脚本 2025-05-16 17:28:57 +08:00
TsMask 0fe95af9c3 fix: 更新构建脚本中的分支和版本信息 2025-05-16 14:29:38 +08:00
TsMask 952e55140b fix: 更新Docker构建脚本,调整平台参数 2025-05-16 14:29:16 +08:00
TsMask b165562c2a fix: 打包前还原变更 2025-05-16 11:03:30 +08:00
TsMask ffe9c4c498 fix: 更新Docker构建脚本和Dockerfile 2025-05-15 21:41:07 +08:00
TsMask 16189c51fa fix: Docker打包脚本 2025-05-15 16:08:19 +08:00
TsMask 0f7ff2aca7 fix: Docker打包脚本 2025-05-15 15:55:57 +08:00
TsMask 04eb36e899 feat: 添加Docker构建和管理脚本,优化构建流程 2025-05-15 15:19:27 +08:00
TsMask 7891d268cb feat: 添加Docker构建 2025-05-15 14:40:57 +08:00
TsMask bbbd5471c7 fix: 更新rpm打包逻辑以支持麒麟系统的特殊标签 2025-05-12 10:24:56 +08:00
TsMask 83c7603f91 feat: 打包文件名称使用系统ID加版本号 2025-05-09 20:45:30 +08:00
TsMask 1c96e28f38 feat: 初始网元授权表字段添加用户容量 2025-05-09 14:25:24 +08:00
TsMask 8c94cf6bc0 fix: 升级时前端config.js覆盖问题 2025-04-30 19:08:04 +08:00
TsMask 1da05f7721 fix: 更新OMC描述信息 2025-04-29 20:46:41 +08:00
TsMask 94481d36cd feat: 更新omc和sshsvc服务配置,增加Wants依赖并调整RestartSec时间 2025-04-27 17:27:44 +08:00
TsMask 86c3a87b35 feat: 添加默认读取的para5G.yaml配置文件 2025-04-27 17:27:29 +08:00
TsMask 096989ad15 feat: 添加www.omc.net证书和私钥,并更新nginx配置以使用新证书 2025-04-27 17:27:11 +08:00
TsMask 9ee596f01d fix: 优化omcd脚本,增加服务存在性检查 2025-04-21 16:27:49 +08:00
TsMask 38f6652301 feat: 添加OMC服务控制脚本并移除过时的脚本文件 2025-04-21 16:09:21 +08:00
TsMask fb021f4605 fix: 更新Golang版本要求至1.24.2 2025-04-19 17:18:51 +08:00
TsMask 04a5f9052e fix: deb更新脚本注释为英文 2025-04-19 16:47:37 +08:00
TsMask 7cac1e1249 fix: 优化setup.sh和omc.spec脚本 2025-04-19 15:53:24 +08:00
TsMask 23a51956ca fix: rpm保留vendor避免卸载错误,调试 2025-04-19 12:21:22 +08:00
TsMask 471811c1ca fix: rpm卸载错误信息 2025-04-19 12:08:50 +08:00
TsMask 80fb41ea51 fix: 根据安装模式去除其余数据 2025-04-18 19:59:44 +08:00
TsMask 4a0a341c4e fix: rpm注释掉卸载脚本文件删除命令 2025-04-18 19:58:52 +08:00
TsMask ab2026523a fix: 修正sshsvc.service路径 2025-04-18 19:58:29 +08:00
TsMask 29d1c41973 fix: 更新nginx配置,修改server_name为omc.http和omc.https 2025-04-18 14:44:03 +08:00
TsMask 92e1d20e9f fix: 更新rpm打包前脚本,添加对wiregasm.wasm文件的权限设置 2025-04-11 18:44:43 +08:00
TsMask 1f96e09a18 fix: 修复检查MySQL和MariaDB安装的逻辑,确保两者都未安装时才输出错误 2025-04-11 16:17:46 +08:00
TsMask e5c496d0bb fix: 更新nginx配置80端口https修改为http 2025-04-01 20:10:10 +08:00
TsMask 6fdc7738db sql: 新增脚本link_ne.sh,初始网元信息SQL语句 2025-04-01 18:20:44 +08:00
TsMask 79b1eb8364 ref: 更新nginx配置,调整监听端口和SSL设置 2025-04-01 18:20:14 +08:00
TsMask 874707cd00 fix: 将配置中的 "standard" 修改为 "std" 2025-03-20 19:41:19 +08:00
TsMask e363529519 ref: 打包脚本调整 2025-03-20 18:38:19 +08:00
TsMask 5160e85804 fix: rpm打包spec 2025-03-20 16:16:49 +08:00
TsMask 0aeb0673ee ref: 打包脚本调整支持切换分支 2025-03-20 16:16:30 +08:00
TsMask 0f1aae7c9a ref: 打包脚本调整 2025-03-20 15:30:31 +08:00
TsMask f35c535a77 ref: 打包脚本调整 2025-03-20 10:13:04 +08:00
TsMask 3655fb999a ref: 打包脚本调整 2025-03-19 21:03:30 +08:00
TsMask 6c0e636f3c feat: 新增pkg打包脚本 2025-03-19 20:55:53 +08:00
TsMask 96f56939e3 ref: 构建工具重构 2025-03-19 20:26:53 +08:00
TsMask 691bb89829 ref: 构建工具重构 2025-03-19 20:08:16 +08:00
TsMask 3a9b4375f4 ref: 构建工具重构 2025-03-19 19:38:34 +08:00
TsMask b2f867b86c ref: 构建工具重构 2025-03-19 17:21:47 +08:00
TsMask f2e43b0fc4 chore: 更新版本号 2.2503.2 2025-03-17 16:10:55 +08:00
TsMask 6e4f2c7773 chore: 更新版本号 2.2503.1 2025-03-08 11:10:29 +08:00
TsMask 53e5717400 fix: badeb 中文字符串替换 2025-03-04 16:13:07 +08:00
TsMask ca6b277c88 fix: badeb复制en_brand和en_icon.png文件 2025-03-03 20:59:17 +08:00
TsMask edc4ce7d48 fix: badeb复制en_brand和en_icon.png文件 2025-03-03 20:52:42 +08:00
TsMask ab59bd6869 fix: badeb复制en_brand和en_icon.png文件 2025-03-03 20:49:16 +08:00
TsMask 8c115a418f fix: badeb类型ba.d目录替换omc.d 2025-03-03 20:41:19 +08:00
TsMask c0c420dd4b chore: 更新版本号 2.2502.4 2025-02-28 22:09:46 +08:00
TsMask 6745c5e196 fix: badeb移除更多中文字符 2025-02-28 21:52:36 +08:00
TsMask 2bfc7887e3 feat: sqlite检查文件存在不覆盖 2025-02-28 21:40:53 +08:00
TsMask 645f223a2a fix: badeb移除更多中文字符 2025-02-28 21:38:33 +08:00
TsMask 66d3eaf79c feat: 添加kylin打包rpm 2025-02-24 16:35:06 +08:00
TsMask 9a41cbd736 feat: 添加anolis打包rpm 2025-02-24 16:28:19 +08:00
TsMask f4c79abf83 fix: 自定义数据sql更新 2025-02-24 12:01:30 +08:00
TsMask 542c9721ef fix: 自定义数据sql更新 2025-02-24 11:51:13 +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
simonzhangsz dd0d67c0ea update spec for ky10 arm build 2024-11-12 09:24:50 +08:00
simonzhangsz 343e32735d update spec for build 2024-11-08 19:39:40 +08:00
simonzhangsz 37477ad9f1 update spec for build 2024-11-08 19:25:56 +08:00
simonzhangsz 1fb64561c4 update spec for build 2024-11-08 19:15:39 +08:00
simonzhangsz 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
simonzhangsz ff7973194f update makepkg.sh 2024-11-07 16:40:44 +08:00
simonzhangsz c9277f1123 shell to sed fe src/hooks 2024-11-07 15:16:15 +08:00
simonzhangsz b8c1740875 update make package shell 2024-11-07 14:57:42 +08:00
simonzhangsz 121cbea72e update make package sh 2024-11-07 14:46:21 +08:00
simonzhangsz 3e08ef0cc4 update build package shell script 2024-11-07 14:37:00 +08:00
simonzhangsz 38dabd180d support customized images and locales for FE 2024-11-07 11:47:18 +08:00
simonzhangsz 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
simonzhangsz dbded5635f update git ignore list 2024-11-01 17:29:25 +08:00
simonzhangsz 44fad7ae82 Optimize the packaging process 2024-11-01 17:24:37 +08:00
simonzhangsz ec00a5fdec update sh 2024-10-31 10:05:56 +08:00
simonzhangsz f57e479e54 update build 2024-10-30 17:14:32 +08:00
simonzhangsz ceb385bbc6 .. 2024-10-30 16:02:31 +08:00
simonzhangsz fb6526e0a0 make package update 2024-10-30 15:59:25 +08:00
simonzhangsz 6ed5e0c425 update make 2024-10-30 15:07:23 +08:00
simonzhangsz 109c8ad68a update make package 2024-10-30 14:59:11 +08:00
simonzhangsz 6a48f1182f update git ignore 2024-10-30 12:07:15 +08:00
simonzhangsz 8b4492153c update make package 2024-10-30 11:14:36 +08:00
simonzhangsz c659fa38d2 make package update 2024-10-30 10:20:06 +08:00
simonzhangsz 21ce1d667e git ignore release 2024-10-30 09:42:59 +08:00
simonzhangsz 136f00ab62 dpkg debian package for general and BA tag 2024-10-29 19:40:17 +08:00
simonzhangsz b8e0dc30ac release main line version 2.2410.3 2024-10-25 16:47:36 +08:00
simonzhangsz c01c84e2e4 change git local root dir 2024-10-24 16:40:12 +08:00
simonzhangsz 25bf25c459 fix: upgrade config file by upgconf.sh 2024-10-23 16:14:33 +08:00
zhangsz 6205a6c178 chmod +x 2024-10-22 15:11:02 +08:00
simonzhangsz 00aad81aab update make package shell script 2024-10-22 15:06:13 +08:00
simonzhangsz b2333b119d copyright 2023 change to 2024 2024-10-22 14:13:00 +08:00
TsMask 3074d4a16a chore: 更新版本号 2.2410.2 2024-10-18 10:48:11 +08:00
TsMask 12fb46302a fix: deb安装前systemctl enable前reload 2024-10-12 16:06:54 +08:00
TsMask c17ba60b56 Merge branch 'main' of http://192.168.2.166:3180/OMC/build.ems 2024-10-12 15:52:26 +08:00
TsMask b83e486c36 chore: 更新版本号 2.2410.1 2024-10-12 15:52:23 +08:00
simonzhangsz debef0a5f1 export open api v2409.4 2024-10-12 10:58:58 +08:00
TsMask fea9a201c8 chore: 更新版本号 2.2409.4 2024-09-27 11:30:27 +08:00
simonzhangsz 912fc763a8 tips update 2024-09-25 18:21:39 +08:00
TsMask eea255ff95 fix: deb卸载systemctl操作判断 2024-09-21 16:32:23 +08:00
TsMask 586b4c2f5a fix: deb卸载systemctl操作判断 2024-09-21 16:12:45 +08:00
TsMask 1c565bdd61 fix: deb安装前systemctl stop的操作判断 2024-09-21 12:11:47 +08:00
TsMask ac25c16e74 fix: deb安装对systemctl stop的操作 2024-09-21 11:46:05 +08:00
TsMask c726cdc65b chore: 更新版本号 2.2409.3 2024-09-20 19:04:46 +08:00
simonzhangsz 472538f649 fix: .. 2024-09-04 18:34:45 +08:00
simonzhangsz 20e5f2bcf5 fix... 2024-09-04 18:32:45 +08:00
simonzhangsz 67bbf47c87 fix: ... 2024-09-04 18:29:42 +08:00
simonzhangsz 050edce089 fix: ... 2024-09-04 18:24:17 +08:00
simonzhangsz 06302a33e6 fix: ... 2024-09-04 17:59:32 +08:00
simonzhangsz 432a526dc2 fix: ... 2024-09-04 17:45:24 +08:00
simonzhangsz acaefa8dae fix: ... 2024-09-04 17:36:13 +08:00
simonzhangsz 0012615659 fix: .... 2024-09-04 17:34:18 +08:00
simonzhangsz 0114e59ed0 fix: wasm file issue 2024-09-04 17:31:50 +08:00
simonzhangsz b6e06a39e0 fix: ... 2024-09-04 17:21:21 +08:00
simonzhangsz b30f9d45fe fix:. .. 2024-09-04 17:19:16 +08:00
simonzhangsz 123e621b05 fix: ... 2024-09-04 17:14:22 +08:00
simonzhangsz 00d992dd4d fix: change var 2024-09-04 17:07:46 +08:00
simonzhangsz 9b9b9e9267 fix: build error with wiregasm.wasm.gz 2024-09-04 16:56:58 +08:00
simonzhangsz 31a072d4e2 fix: rm build step in omc.spec 2024-09-04 16:36:33 +08:00
simonzhangsz 842417b63c fix: remove install step 2024-09-04 16:28:06 +08:00
simonzhangsz d8b25cd071 fix: ... 2024-09-04 16:16:28 +08:00
simonzhangsz 8a63fb0173 fix: stop service at the begin install 2024-09-04 16:13:15 +08:00
simonzhangsz 8d3dccbeef fix: ... 2024-09-04 14:56:50 +08:00
simonzhangsz 915807dc53 opt: rpm support environment parameter to DB install or upgrade 2024-09-04 11:22:33 +08:00
simonzhangsz e7ea8dbf4a fix: postinst enhancement 2024-09-03 18:46:50 +08:00
simonzhangsz 2cfc10c86a fix: postinst with environment param 2024-09-03 16:56:57 +08:00
simonzhangsz ba9fec53f9 release for 2.2409.1 2024-09-03 16:52:46 +08:00
simonzhangsz e5dd8363ca opt: dpkg support environment paramter to do DB install or upgrade 2024-09-03 16:18:34 +08:00
TsMask 480363ae04 chore: 更新版本号2.2408.5 2024-08-31 10:18:36 +08:00
TsMask eca52ccbc9 chore: 更新版本号2.2408.4 2024-08-23 19:07:31 +08:00
TsMask 71311cb6a8 chore: 更新版本号2.2408.3 2024-08-16 19:25:35 +08:00
TsMask 84bb2f5ec9 chore: 更新版本号2.2408.2 2024-08-09 20:07:51 +08:00
TsMask dc8ec525f2 chore: 更新版本号2.2408.1 2024-08-02 10:08:37 +08:00
TsMask bca9f94b01 fix: Nginx配置文件 2024-07-30 18:16:09 +08:00
TsMask 5b31d4739b fix: agt字符改为omc 2024-07-29 18:31:02 +08:00
TsMask 2bdd14a761 chore: 更新版本号 2.2407.4 2024-07-27 11:19:09 +08:00
TsMask b542ee6073 fix: dep打包时默认restconf配置文件信息 2024-07-27 11:17:14 +08:00
TsMask 2717409d47 fix: Nginx配置文件变更 2024-07-27 11:14:32 +08:00
TsMask 9ab3d2d53f del: deb22打包移除kvdb服务绑定 2024-07-27 11:07:46 +08:00
TsMask 8a4bd1216a del: deb18打包移除kvdb服务绑定 2024-07-27 11:07:34 +08:00
TsMask 80f3b33813 del: rpm打包移除kvdb服务绑定 2024-07-27 10:56:53 +08:00
TsMask f66806e127 fix: Nginx配置文件变更 2024-07-27 10:46:19 +08:00
TsMask 10752171a1 chore: 更新版本号 2.2407.3 2024-07-16 11:39:23 +08:00
simonzhangsz 14c0ecbf8e release 2.2407.2 for multi-tenancy 2024-07-11 11:48:57 +08:00
simonzhangsz ccd8a4fd82 opt: setting firewall 2024-07-09 16:18:56 +08:00
simonzhangsz 43d61681aa opt: setting firewall 2024-07-09 16:12:59 +08:00
simonzhangsz 78576a2a40 opt: setting firewall in package installation 2024-07-09 16:11:57 +08:00
simonzhangsz 3ed69ebd5f update package build shell script for adb rename to kvdb 2024-07-09 15:08:29 +08:00
simonzhangsz 9c95b66d2a adb rename to kvdb 2024-07-09 14:20:29 +08:00
simonzhangsz 8b4c5145e0 fix: ... 2024-07-09 11:22:46 +08:00
simonzhangsz b5de6f7bb4 fix: ... 2024-07-09 11:18:24 +08:00
simonzhangsz eaf514673b fix: ... 2024-07-09 10:59:45 +08:00
simonzhangsz 5488290851 fix: arm64 update 2024-07-09 10:56:35 +08:00
simonzhangsz 0220ae6112 fix: update arm64 install shell script 2024-07-09 10:53:45 +08:00
simonzhangsz e6893d76f4 fix: kvdb issues 2024-07-09 10:49:26 +08:00
simonzhangsz e53b949025 fix: kvdb issue 2024-07-09 10:42:32 +08:00
simonzhangsz df3b722680 fix: kvdb issue 2024-07-09 10:36:54 +08:00
simonzhangsz 0a7268c568 fix: kvdb issue 2024-07-09 10:22:29 +08:00
simonzhangsz 5339846f88 fix: kvdb install for arm64 2024-07-09 10:02:31 +08:00
simonzhangsz 6b14855085 disable system auto upgrade 2024-07-08 09:37:04 +08:00
simonzhangsz 2ae019ed88 keep system and logo directory 2024-07-08 09:36:37 +08:00
TsMask 251f798f2e chore: 更新版本号 2.2407.1 2024-07-04 10:25:54 +08:00
TsMask 302011cc19 docs: zh help doc 2024-06-28 16:40:28 +08:00
TsMask d2c5db5e8e chore: 更新版本号 2.2406.4 2024-06-26 19:25:22 +08:00
TsMask d99efba39e sql: 数据库安装升级-c ba/agt 2024-06-26 19:23:07 +08:00
TsMask 848cd8633c docs: en help doc 2024-06-24 18:11:13 +08:00
TsMask baae06d301 chore: 更新版本号 2.2406.3 2024-06-19 19:48:49 +08:00
TsMask ef60460b64 docs: zh help doc 2024-06-18 15:09:35 +08:00
TsMask 912151844e chore: 更新版本号 2.2406.2 2024-06-17 18:05:21 +08:00
TsMask 690e7191bb chore: 更新版本号 2.2406.1 2024-06-06 12:00:30 +08:00
TsMask 27af9d7c37 feat: 默认配置文件追加omc.conf作为脚本配置变量 2024-06-06 11:59:01 +08:00
simonzhangsz 32ae6f747d opt: optize build shell for multi-branch 2024-05-31 17:55:30 +08:00
simonzhangsz 93e3e633d3 fix... 2024-05-31 11:20:56 +08:00
simonzhangsz 2ddfdf4334 opt: support build shell with directory 2024-05-31 11:08:03 +08:00
simonzhangsz b147b5fda1 release 2.2405.4 for main branch 2024-05-30 15:58:06 +08:00
simonzhangsz cdc6c3c3aa fix: remove overwrite omc etc config file 2024-05-27 11:02:33 +08:00
simonzhangsz d3a69d2705 add: update overview doc 2024-05-24 16:43:43 +08:00
simonzhangsz 0da66f0a59 release 2.2405.3 2024-05-24 16:27:01 +08:00
simonzhangsz ca347f27a2 fix: service removed 2024-05-17 19:57:31 +08:00
simonzhangsz aba6f10651 fix: service 2024-05-17 19:47:29 +08:00
simonzhangsz 20ccc7a7b6 release 2.2405.2 2024-05-15 12:13:06 +08:00
simonzhangsz c0a5a207d6 release 2.2405.1 2024-05-10 17:19:56 +08:00
simonzhangsz 3e5f285061 add: api interface and kpi list 2024-05-10 09:53:48 +08:00
simonzhangsz 8872048642 release 2.2404.6 2024-04-29 18:31:28 +08:00
simonzhangsz 2c7be31ca3 release 2.2404.5 2024-04-26 18:34:40 +08:00
simonzhangsz 347614b127 fix: adb conf issue 2024-04-25 14:15:30 +08:00
simonzhangsz ee3e8b8032 fix: adb conf issue 2024-04-25 14:13:58 +08:00
simonzhangsz dd315bf439 fix: ... 2024-04-19 20:36:15 +08:00
simonzhangsz f985f40eca fix: copy yaml from default 2024-04-19 20:29:32 +08:00
simonzhangsz 2a2a131574 fix: ... 2024-04-19 19:58:09 +08:00
simonzhangsz a434d276f6 fix: ... 2024-04-19 19:48:16 +08:00
simonzhangsz 439a960fd0 fix: adb issue 2024-04-19 19:38:49 +08:00
simonzhangsz 5a1a60c569 opt: adb 2024-04-17 18:46:35 +08:00
simonzhangsz 7cbfd4757e opt: adb 2024-04-17 18:37:16 +08:00
simonzhangsz e603a06880 opt: adb package adjustment 2024-04-17 18:00:43 +08:00
simonzhangsz f2f08f4c00 opt: remove old adb package 2024-04-17 16:02:42 +08:00
simonzhangsz 55b3bc7152 opt: adb change directory 2024-04-17 16:00:23 +08:00
simonzhangsz 94ce3910e0 opt: redis db protect by password 2024-04-16 11:29:37 +08:00
simonzhangsz 3ae1829b2e fix:... 2024-04-16 09:26:15 +08:00
simonzhangsz bcd6960653 fix: ... 2024-04-15 18:44:10 +08:00
simonzhangsz 88c88d67cb release 2.2404.4 version 2024-04-15 11:58:39 +08:00
simonzhangsz e4c75b87f1 Merge branch 'main' of http://192.168.2.166:3180/OMC/build.ems 2024-04-12 19:35:19 +08:00
simonzhangsz 11f2165968 release 2.2404.3 2024-04-12 19:35:18 +08:00
TsMask c132f6c554 docs: zh and en help doc 2024-04-09 14:28:46 +08:00
simonzhangsz f30d587baa release version 2.2404.2 2024-04-08 11:02:51 +08:00
simonzhangsz 70ad2bcde0 fix: adb(redis) cannot start after reboot 2024-04-08 11:02:25 +08:00
simonzhangsz 5a43c9fa0a r2.2404.1 2024-04-02 11:52:33 +08:00
simonzhangsz e7ed1ee23c changed version to 2.2403.3 2024-03-29 09:43:00 +08:00
simonzhangsz 1a87403514 version 2.2403.2 2024-03-27 15:07:06 +08:00
simonzhangsz a4771e3335 fix: arm64 redis depend 2024-03-27 15:02:21 +08:00
simonzhangsz 85f8ceef64 fix: ... 2024-03-26 11:16:23 +08:00
simonzhangsz decc009db0 fix: all-in-one packages issue 2024-03-26 11:15:21 +08:00
simonzhangsz 2915caff5f fix: all-in-on package 2024-03-26 10:32:01 +08:00
simonzhangsz 1b6db2a8fc fix: all-in-one package 2024-03-26 10:12:15 +08:00
simonzhangsz 4e7bd18921 fix: ... 2024-03-26 09:51:20 +08:00
simonzhangsz 057b66f1d6 fix: all-in-one package issue 2024-03-26 09:50:17 +08:00
simonzhangsz f1c9cdb20d fix: all-in-one package 2024-03-26 09:42:13 +08:00
simonzhangsz e4eb83585e fix: change redis db installation in env all-in-one 2024-03-25 18:37:57 +08:00
simonzhangsz 9cb3a32976 add: quickstart of build for BA 2024-03-18 21:08:17 +08:00
simonzhangsz cab0925653 fix: adjustment db directory 2024-03-08 15:03:22 +08:00
simonzhangsz ca061181e6 fix: build rpm part 2024-03-08 11:26:49 +08:00
simonzhangsz 87002d8201 fix: build deb part ok 2024-03-08 10:24:14 +08:00
simonzhangsz 433e4c6340 fix: build.sh 2024-03-07 18:25:03 +08:00
simonzhangsz 8406d68283 fix: build 2024-03-07 18:21:06 +08:00
simonzhangsz eff9f8d565 fix: build.sh 2024-03-07 17:14:52 +08:00
simonzhangsz 0b68a7b3da add: new build script 2024-03-07 17:01:10 +08:00
simonzhangsz 02b88827eb version change to 2.2403.1 2024-03-06 19:44:05 +08:00
simonzhangsz fa31ac4f0d fix: change to version 2.2402.6 2024-02-21 19:00:17 +08:00
simonzhangsz 6b8e8d04d7 fix:... 2024-02-18 11:37:40 +08:00
simonzhangsz fd4ad885c0 fix: clear FE old index hash files 2024-02-18 11:29:51 +08:00
simonzhangsz 3b273be5d0 fix:pre install clear old files 2024-02-18 11:16:25 +08:00
TsMask f058e3ee3b version change to 2.2402.5 2024-02-04 10:57:21 +08:00
simonzhangsz bd7b8293ed fix: ba internationalization switching issue 2024-02-02 11:20:57 +08:00
simonzhangsz ed401f4f89 version change to 2.2402.4 2024-02-01 10:27:27 +08:00
simonzhangsz 28a1da570b fix: to 2.2401.4 2024-01-26 17:19:27 +08:00
simonzhangsz 2f8a98d7cd fix: change to 2.2401.3 2024-01-18 09:53:40 +08:00
simonzhangsz 99adcc22b7 fix: omc installation issue 2024-01-17 10:40:35 +08:00
simonzhangsz 6715efec4d add: open api json file 2024-01-16 09:56:26 +08:00
simonzhangsz b7994b0e85 fix: certs update 2024-01-12 14:59:30 +08:00
simonzhangsz edd12fb06d fix: postinst and rm 2024-01-12 14:46:45 +08:00
simonzhangsz a9e22e1d92 fix: postrm update 2024-01-12 09:34:36 +08:00
simonzhangsz 7afb2bf3af fix:... 2024-01-11 17:23:25 +08:00
simonzhangsz 7e97c56514 fix: build script update 2024-01-11 16:53:30 +08:00
simonzhangsz fc2cbd1e35 fix:postrm update 2024-01-11 15:34:59 +08:00
simonzhangsz 05ce228239 fix: postinst update 2024-01-11 14:55:10 +08:00
simonzhangsz 287c26201d fix: postinst update 2024-01-11 14:54:27 +08:00
simonzhangsz 8ab8944bdb fix: postinst update 2024-01-11 14:22:43 +08:00
simonzhangsz f52461329d fix: postinst update 2024-01-11 14:19:35 +08:00
simonzhangsz c029e32ab1 fix: version 2.2401.2 2024-01-11 11:46:02 +08:00
simonzhangsz 8c58dc1191 fix: postinst update 2024-01-10 18:12:15 +08:00
simonzhangsz 1bbdd3fab9 fix: postinst 2024-01-10 17:26:35 +08:00
simonzhangsz 6c72779483 fix: omc.spec update 2024-01-10 17:12:15 +08:00
simonzhangsz 81e254ab76 fix: postinst update 2024-01-10 17:05:21 +08:00
simonzhangsz 53c5ef5457 fix: certs renew 2024-01-10 11:36:11 +08:00
simonzhangsz 3fd8d21e2c fix: customized sql 2024-01-10 11:25:02 +08:00
TsMask bd1bc5ef00 docs: en help doc 2024-01-09 17:55:36 +08:00
simonzhangsz 4ae62691b1 fix: dpkg overwrite exist log 2024-01-08 18:06:27 +08:00
simonzhangsz 458de65e45 fix: alarm definition 2024-01-08 18:05:55 +08:00
TsMask de47bac51b docs: zh and en help doc 2024-01-05 20:07:24 +08:00
TsMask e20ecc11d6 docs: en help doc 2024-01-04 17:14:51 +08:00
TsMask b9de77d612 docs: en help doc 2024-01-04 17:10:49 +08:00
simonzhangsz 4e9f5125c4 fix: customized sql 2024-01-04 16:24:23 +08:00
simonzhangsz 7400561d23 fix: whole sys_config for customized sql 2024-01-04 13:57:07 +08:00
simonzhangsz 23f0a25e0a fix: change to verision 2.2401.1 2024-01-03 20:45:33 +08:00
simonzhangsz 0027e57392 add: omc alarm definition 2024-01-03 20:45:08 +08:00
simonzhangsz 66c6d7fcc9 fix: customized sql 2024-01-02 19:55:07 +08:00
simonzhangsz e8a151d07d fix: static dir 2023-12-29 21:00:42 +08:00
simonzhangsz 68b9f881f6 fix: agt customized dir 2023-12-29 17:20:34 +08:00
simonzhangsz e38efdae72 fix: change to 2.2312.10 2023-12-29 10:27:01 +08:00
simonzhangsz d82dad8d3d fix: 2.2312.9-20231222 release note 2023-12-22 16:34:22 +08:00
simonzhangsz db7ed45622 fix: ba customzied sql 2023-12-22 11:11:54 +08:00
simonzhangsz 5c779aff60 fix: postinst update 2023-12-22 10:32:27 +08:00
simonzhangsz a35dd637c5 fix: ba customized sql 2023-12-22 10:07:12 +08:00
simonzhangsz 0d321657c2 fix: ba customized sql 2023-12-22 09:21:11 +08:00
simonzhangsz 9dbdeb6f9e fix: ba logo file name 2023-12-21 20:58:19 +08:00
simonzhangsz 92a6e62f98 fix: doc and interfaces 2023-12-21 20:12:44 +08:00
simonzhangsz 448aec4e86 fix: ba customized 2023-12-21 20:12:24 +08:00
simonzhangsz 3e38056e71 fix: version 2.2312.9 2023-12-21 20:10:00 +08:00
simonzhangsz c73c74dbde fix: custom option 2023-12-20 20:06:03 +08:00
simonzhangsz e73bb75dfc fix: control and postinst add option1/option2 2023-12-20 19:44:59 +08:00
TsMask ff2ace4df8 add: en help doc 2023-12-20 17:04:01 +08:00
TsMask 840f3a1c9b add: en help doc 2023-12-20 15:02:51 +08:00
simonzhangsz 9a6b240b3e fix: interface and overview update 2023-12-08 14:54:28 +08:00
simonzhangsz 6d139b71d7 fix: redis conf slaveof udm default ip 2023-12-06 18:01:57 +08:00
simonzhangsz 2e50b86f88 fix: logo 2023-12-06 17:31:51 +08:00
simonzhangsz f22d43ac18 fix: name 2023-12-06 15:45:05 +08:00
simonzhangsz 5caf675514 fix: to 2.2312.8 2023-12-06 15:09:51 +08:00
simonzhangsz 14b9a8c794 fix:doc 2023-12-06 14:58:11 +08:00
simonzhangsz 10c02071e3 fix: doc and logo 2023-12-06 14:47:53 +08:00
simonzhangsz 351f96bc83 fix: arrange doc directory 2023-12-02 17:32:39 +08:00
simonzhangsz 29c9fcfb6c fix: add zh help doc 2023-11-29 19:04:52 +08:00
simonzhangsz 461b26f95c fix: 。。。 2023-11-24 19:33:59 +08:00
simonzhangsz c7f721c9b7 fix: 2.2311.8 2023/11/24 version 2023-11-24 19:30:57 +08:00
simonzhangsz f529baa189 add: zh help doc 2023-11-24 17:42:26 +08:00
simonzhangsz 62b5603a61 fix: docs 2023-11-20 17:22:01 +08:00
simonzhangsz 378415ea72 fix: change to release 2.2311.8 2023-11-20 17:17:23 +08:00
simonzhangsz 00e8b54f5e fix: ... 2023-11-10 15:08:28 +08:00
simonzhangsz 603a50e038 fix: nginx default server port 80 2023-11-10 14:37:31 +08:00
simonzhangsz 3b9bf4af77 fix: release note 2023-11-09 20:21:38 +08:00
simonzhangsz 0e0da26da1 fix: as last 2023-11-09 19:27:13 +08:00
simonzhangsz abbf2c436b fix: change nginx default https port 443 to 4443 2023-11-09 19:26:21 +08:00
simonzhangsz d59e465639 fix: build spec 2023-11-09 19:15:30 +08:00
simonzhangsz f9de6819aa fix... 2023-11-09 19:11:20 +08:00
simonzhangsz 89fee39484 fix: web port 80 2023-11-09 19:07:06 +08:00
simonzhangsz 0bf15fd164 fix: nginx default web server port 2023-11-09 18:59:39 +08:00
simonzhangsz bb4b02765e fix: ky10 nginx.conf 2023-11-09 18:23:25 +08:00
simonzhangsz ddb1761f0a fix: web port change to 80,443 2023-11-09 18:08:32 +08:00
simonzhangsz 94988d48a1 fix:release note 2023-11-09 13:20:18 +08:00
simonzhangsz 399b663dc6 fix:... 2023-11-08 16:05:55 +08:00
simonzhangsz f3d45cbc97 fix: update release note 2023-11-08 15:55:59 +08:00
simonzhangsz 029c7828d2 fix: rollback change buildarch 2023-11-07 09:47:27 +08:00
simonzhangsz f56e9a4e7e fix: customize rpm package name 2023-11-07 09:39:14 +08:00
simonzhangsz bda3e31733 fix: change version to 2.2311.7 2023-11-06 14:12:49 +08:00
simonzhangsz be3c590d29 update omc arch 2023-11-06 14:12:23 +08:00
simonzhangsz 0827d8a620 update: omc architecture 2023-11-06 14:11:55 +08:00
simonzhangsz 8e6bd419fb fix:omc.cof dir 2023-10-31 17:54:59 +08:00
simonzhangsz 723234dae5 fix: restart nginx after install 2023-10-31 17:43:11 +08:00
simonzhangsz 5058bea561 fix: missing omc.conf 2023-10-31 17:30:45 +08:00
simonzhangsz 6935124f29 fix: dir of omc_conf 2023-10-31 16:41:39 +08:00
simonzhangsz 39e31d7647 fix: omc.conf for new frame 2023-10-27 19:39:00 +08:00
simonzhangsz ea6e19fd97 fix: omc.conf update 2023-10-25 19:57:25 +08:00
simonzhangsz 3ea68aca59 add: independ 2023-10-25 18:30:42 +08:00
simonzhangsz 1ae81d7b59 fix: omc.conf update 2023-10-25 18:30:06 +08:00
simonzhangsz 2ee5ff81fa fix: omc.conf for vue3 2023-10-23 18:52:48 +08:00
simonzhangsz 6f23043b59 fix: redisconfdir 2023-10-20 19:58:11 +08:00
simonzhangsz 7bc5b4d5e6 fix: redis config dir 2023-10-19 13:00:08 +08:00
simonzhangsz 353009689b redis.conf 2023-10-13 17:39:21 +08:00
simonzhangsz dafce8bf02 CONFIG SET replica-read-only no 2023-10-13 14:59:22 +08:00
simonzhangsz 893fa92af4 docs 2023-10-13 14:31:50 +08:00
simonzhangsz 169d0be5ee d 2023-10-11 09:16:59 +08:00
simonzhangsz d72c3a64fd d 2023-10-08 16:59:03 +08:00
simonzhangsz b071ba58c2 d 2023-09-27 20:36:24 +08:00
simonzhangsz dfe97e562d trace 2023-09-27 20:35:42 +08:00
simonzhangsz 7f656ecaec d 2023-09-25 15:43:33 +08:00
simonzhangsz b5ffec54a7 d 2023-09-25 15:40:26 +08:00
simonzhangsz 37d67c032a 1.6.2 2023-09-25 15:25:14 +08:00
simonzhangsz 26b4f46f6a d 2023-09-22 12:10:09 +08:00
lai 11609ee194 ---前端 2023-09-22 12:01:11 +08:00
TsMask f89bf7754b docs: 更新版本说明 2023-09-22 11:50:18 +08:00
simonzhangsz b2a53db4be d 2023-09-22 11:37:01 +08:00
simonzhangsz 36e5d27b01 d 2023-09-22 11:35:18 +08:00
simonzhangsz 53720f6d4f release note 2023-09-22 11:29:33 +08:00
simonzhangsz c476456d11 d 2023-09-20 18:34:34 +08:00
simonzhangsz 3405ba34ba d 2023-09-20 18:07:01 +08:00
simonzhangsz d865ae645c d 2023-09-20 11:20:29 +08:00
simonzhangsz ed90a56e0f d 2023-09-20 09:23:27 +08:00
simonzhangsz 2d5c883a97 d 2023-09-18 19:14:39 +08:00
simonzhangsz 01b2098165 d 2023-09-18 19:10:53 +08:00
simonzhangsz 03eadbbf6d d 2023-09-18 17:22:54 +08:00
simonzhangsz 6a11a6427a trace 2023-09-18 17:14:45 +08:00
simonzhangsz 351087749a d 2023-09-18 11:35:07 +08:00
simonzhangsz 871552e430 d 2023-09-18 10:56:27 +08:00
simonzhangsz e24e5e3e6a d 2023-09-16 17:51:12 +08:00
simonzhangsz 5fbbaaafe6 d 2023-09-16 16:23:55 +08:00
simonzhangsz 40b78b7a57 d 2023-09-16 16:15:56 +08:00
simonzhangsz 6cc8fd4daf trace 2023-09-16 15:36:08 +08:00
simonzhangsz 2257b8ad00 trace x86 2023-09-16 15:29:35 +08:00
simonzhangsz af0fa2c884 d 2023-09-16 15:10:07 +08:00
simonzhangsz 3615eea94d d 2023-09-16 15:03:57 +08:00
simonzhangsz 1784c2f655 d 2023-09-16 15:00:36 +08:00
simonzhangsz bb211c9c76 d 2023-09-16 14:58:10 +08:00
simonzhangsz c47ef897cd d 2023-09-16 14:51:44 +08:00
simonzhangsz 714448c94d d 2023-09-16 14:26:24 +08:00
simonzhangsz 128cae73e9 d 2023-09-16 14:24:13 +08:00
simonzhangsz e4b2be84e0 d 2023-09-16 14:21:23 +08:00
simonzhangsz 8f1354796c d 2023-09-16 14:20:05 +08:00
simonzhangsz ea6dbec9e2 d 2023-09-16 14:14:54 +08:00
simonzhangsz 5a70cabc56 d 2023-09-16 14:12:00 +08:00
simonzhangsz 94dbaf8c3c d 2023-09-16 14:07:59 +08:00
simonzhangsz e9a230d5f1 d 2023-09-16 14:06:41 +08:00
simonzhangsz 44beff079d d 2023-09-16 13:54:01 +08:00
simonzhangsz 2cee0bb943 d 2023-09-16 13:50:37 +08:00
simonzhangsz a00649aec4 build 2023-09-16 13:35:44 +08:00
simonzhangsz 8809b92498 build 2023-09-16 13:23:43 +08:00
simonzhangsz b7962ce50b d 2023-09-16 11:41:03 +08:00
simonzhangsz efed954a78 d 2023-09-16 11:30:42 +08:00
simonzhangsz 4cbdd415b5 依赖包 2023-09-16 11:30:08 +08:00
simonzhangsz 9a45f54cf9 d 2023-09-15 17:11:12 +08:00
simonzhangsz 667fd6f890 d 2023-09-15 16:18:41 +08:00
simonzhangsz 9de4eda0c2 d 2023-09-15 15:30:10 +08:00
simonzhangsz 5a1d37060e d 2023-09-15 15:25:50 +08:00
simonzhangsz 19d31722b7 d 2023-09-15 15:21:51 +08:00
simonzhangsz 901d95643e d 2023-09-15 15:08:20 +08:00
simonzhangsz 77f7782636 d 2023-09-15 15:05:08 +08:00
simonzhangsz f872401ab0 d 2023-09-15 14:54:41 +08:00
simonzhangsz cd3ebcbbd0 d 2023-09-15 14:46:04 +08:00
simonzhangsz 88625d3bb7 d 2023-09-15 14:44:24 +08:00
simonzhangsz 5ebc241133 d 2023-09-15 14:41:36 +08:00
simonzhangsz 42675dbb3a d 2023-09-15 14:40:03 +08:00
simonzhangsz f8c5821089 d 2023-09-15 14:35:47 +08:00
simonzhangsz f3c1452c83 d 2023-09-15 14:34:24 +08:00
simonzhangsz 8350eef747 d 2023-09-15 14:08:47 +08:00
simonzhangsz e576d5a8ee d 2023-09-15 14:06:18 +08:00
simonzhangsz 4bec4fdec5 d 2023-09-14 17:38:12 +08:00
simonzhangsz 20e085a94e d 2023-09-14 14:54:06 +08:00
simonzhangsz eb7f33c477 conf 2023-09-14 14:46:03 +08:00
simonzhangsz 58e3d5124c d 2023-09-13 19:37:22 +08:00
simonzhangsz fe64ce505a d 2023-09-13 18:14:51 +08:00
simonzhangsz f914b2f81c redis 2023-09-13 18:08:00 +08:00
simonzhangsz 83baadade5 d 2023-09-13 17:40:58 +08:00
simonzhangsz 1cfef0f9b4 redis 2023-09-13 17:32:02 +08:00
simonzhangsz 886647f9c2 d 2023-09-13 17:13:25 +08:00
simonzhangsz f2b2493ddc d 2023-09-13 16:58:55 +08:00
simonzhangsz 11ba58e2a1 d 2023-09-13 16:57:21 +08:00
simonzhangsz 1192735cca redis 2023-09-13 16:55:42 +08:00
simonzhangsz 3a64cf67de d 2023-09-13 16:49:17 +08:00
simonzhangsz 88a3c8e735 redis 2023-09-13 16:45:30 +08:00
simonzhangsz 36eac6b912 redis 2023-09-13 15:50:12 +08:00
simonzhangsz 7f8108ae77 guide 2023-09-12 11:52:03 +08:00
simonzhangsz f8d1c8751f ue 2023-09-11 11:26:38 +08:00
simonzhangsz 6a5dcbf81f d 2023-09-08 14:04:30 +08:00
simonzhangsz 333579a5de d 2023-09-07 10:55:20 +08:00
simonzhangsz c2aadc123b docs 2023-09-07 10:47:34 +08:00
simonzhangsz 51a9c29a6f 1 2023-09-06 16:50:19 +08:00
simonzhangsz 74ee7e3f02 zip 2023-09-06 16:15:08 +08:00
simonzhangsz 4180c96eb0 d 2023-09-06 16:09:41 +08:00
simonzhangsz 8a1b9c8705 ZIP 2023-09-06 16:03:04 +08:00
simonzhangsz 3427f7750d ssh 2023-09-05 15:28:19 +08:00
simonzhangsz 72252c476d d 2023-09-04 18:27:15 +08:00
simonzhangsz 9b65e2f563 d 2023-09-04 17:08:14 +08:00
simonzhangsz be96cb810c d 2023-09-04 16:39:26 +08:00
simonzhangsz 461fa651e8 d 2023-09-04 16:35:48 +08:00
simonzhangsz 085b1d38ef d 2023-09-04 16:17:01 +08:00
simonzhangsz 9a5c0a696b d 2023-09-04 14:51:50 +08:00
simonzhangsz 29ae8bad8c d 2023-09-01 15:31:40 +08:00
simonzhangsz edcafc3688 d 2023-09-01 12:06:47 +08:00
simonzhangsz d598077a2e d 2023-09-01 11:41:25 +08:00
simonzhangsz de7e68515c d 2023-08-31 17:08:12 +08:00
simonzhangsz 2920fff789 run 2023-08-31 17:04:14 +08:00
simonzhangsz bda1549092 n 2023-08-30 10:42:11 +08:00
simonzhangsz 96507297d3 new 2023-08-29 17:58:02 +08:00
simonzhangsz 8f326ab80d new version for 5GC 2023-08-29 17:56:06 +08:00
simonzhangsz f3586f1ebe empty dir 2023-08-26 12:16:52 +08:00
simonzhangsz 9545d76071 new 2023-08-26 11:25:40 +08:00
zhangsz e9805e98e4 new 2023-08-26 10:47:45 +08:00
zhangsz b4c1e2fc75 删除 README.md 2023-08-26 10:44:49 +08:00
zhangsz 059cd4a212 new 2023-08-26 10:32:23 +08:00
54 changed files with 2192 additions and 2 deletions

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
.idea/
# Built Visual Studio Code Extensions
*.vsix
*.log
*.log
*.bak
*.exe
# Build Output
tmp/*
+36 -2
View File
@@ -1,3 +1,37 @@
# build.ems
# Quickstart Of Build
OMC 打包脚本
## Platform
OS: Ubuntu 18.04 / 22.04 (Recommendation)
Golang: go1.24.2 (or above)
Database: 10.6.16-MariaDB, Redis server v=5.0.5 (or above)
node.js: v20.18.0 (or above)
## Build Guide
### Pull Code
`pwd` default in `/root`
```bash
git clone https://xxx@git/ems.git omc.git
cd omc.git && ls
# be.ems build.ems fe.ems.vue3
cp build.ems/pkg-* .
```
### Build System Pageage Manager
Modify the information in the script as appropriate
```bash
# Universal
bash pkg.sh --web --api -v 2.2508.1
# RemoveChinese
bash pkg-remove-chinese.sh --web --api -v 2.2508.1
# Docker
bash pkg-docker.sh -v 2.2508.1
```
+164
View File
@@ -0,0 +1,164 @@
#!/usr/bin/env bash
set -e
# Check if Docker is installed
if command -v docker &> /dev/null; then
echo $(docker --version)
else
echo "Docker is not installed"
exit 1
fi
# Default Version
VERSION="1.0.0"
# Default Platform
PLATFORM="amd64"
# Default System
SYSTEM="ubuntu22.04"
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v, --version Specify the version"
echo " -p, --platform Specify the platform architecture (amd64,arm64)"
echo " -s, --system Specify the system image (ubuntu22.04,alpine3.20)"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v|--version) VERSION="$2"; shift 2 ;; # Processing the version after -v
-p|--platform) PLATFORM="$2"; shift 2 ;; # Processing the platform after -p
-s|--system) SYSTEM="$2"; shift 2 ;; # Processing the system after -s
*) usage ;;
esac
done
# output result
echo "Version: $VERSION"
# =================== Compile System Information
# Determine if -p is passed in
if [ -n "$PLATFORM" ]; then
case $PLATFORM in
amd64) ;;
arm64) ;;
*)
echo "Error: platform be: $PLATFORM"
echo "can only be amd64/arm64"
exit 1
;;
esac
fi
echo "Platform: $PLATFORM"
# Determine if -s is passed in
if [ -n "$SYSTEM" ]; then
case $SYSTEM in
ubuntu22.04) ;;
alpine3.20) ;;
*)
echo "unknown system image: $SYSTEM"
exit 1
;;
esac
fi
echo "System: $SYSTEM"
# =================== Compile Variable Information
# Script Path
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Compile Linux System Directory
BuildLinuxDir=${RootDir}/linux
# Compile Package Management Directory
BuildPackagelDir=${RootDir}/pkg
# Compile the build directory
BuildDir=${RootDir}/tmp
# Release Package directory
ReleaseDir=${RootDir}/release/docker/${PLATFORM}
# Release Package name file
ReleaseFileName=omc-r${VERSION}-docker-${SYSTEM}-${PLATFORM}
# =================== file processing
# Apply file handling
app() {
cd ${BuildDir}
# Database scripts within common are rebuild scripts
modeList="std lite"
for v in ${modeList}; do
# . /Located in the temporary directory
path=./linux/usr/local/etc/omc/database/${v}
cp -rf $path/common/* $path/install/
cp -rf $path/common/* $path/upgrade/
rm -rf $path/common
done
}
# =================== compile
docker_build() {
cd ${BuildDir}
# Replacement Tags {version} {arch}
sed -i "s/{version}/${VERSION}/g" ./${ReleaseFileName}/omc-docker.sh
sed -i "s/{arch}/${PLATFORM}/g" ./${ReleaseFileName}/omc-docker.sh
sed -i "s/{system}/${SYSTEM}/g" ./${ReleaseFileName}/omc-docker.sh
# check docker image
if ! docker images | grep -q "mariadb-$PLATFORM\s*10.6.21"; then
docker pull --platform linux/${PLATFORM} mariadb:10.6.21
docker tag mariadb:10.6.21 mariadb-$PLATFORM:10.6.21
fi
if [ ! -f ${BuildDir}/$ReleaseFileName/tar/mariadb_10.6.21_$PLATFORM.tar ]; then
docker save mariadb-$PLATFORM:10.6.21 -o ${BuildDir}/${ReleaseFileName}/tar/mariadb_10.6.21_$PLATFORM.tar
fi
if ! docker images | grep -q "keydb-$PLATFORM\s*6.3.4"; then
docker pull --platform linux/${PLATFORM} bitnami/keydb:6.3.4
docker tag bitnami/keydb:6.3.4 keydb-$PLATFORM:6.3.4
fi
if [ ! -f ${BuildDir}/$ReleaseFileName/tar/keydb_6.3.4_$PLATFORM.tar ]; then
docker save keydb-$PLATFORM:6.3.4 -o ${BuildDir}/${ReleaseFileName}/tar/keydb_6.3.4_$PLATFORM.tar
fi
# build omc
docker build --platform linux/${PLATFORM} --build-arg TARGETARCH=${PLATFORM} --build-arg VERSION=${VERSION} -t omc:${VERSION}-${SYSTEM}-${PLATFORM} .
docker save omc:${VERSION}-${SYSTEM}-${PLATFORM} -o ${BuildDir}/${ReleaseFileName}/tar/omc_${VERSION}-${SYSTEM}-${PLATFORM}.tar
# tar package
filename=${ReleaseFileName}.tar.gz
output=${ReleaseDir}/${filename}
tar -czf ${output} ./${ReleaseFileName}
echo "build success => ${output}"
# Generate HAX file
cd ${ReleaseDir}
md5sum ${filename} > ${filename}.md5
echo "md5 => $(cat ${filename}.md5)"
sha256sum ${filename} > ${filename}.sha256
echo "sha256 => $(cat ${filename}.sha256)"
}
# =================== building
echo
echo "building omc..."
mkdir -p ${BuildDir}/${ReleaseFileName}/tar
cp -rf ${BuildLinuxDir} ${BuildDir}
cp -rf ${BuildPackagelDir}/docker/linux ${BuildDir}
cp -rf ${BuildPackagelDir}/docker/tar/* ${BuildDir}/${ReleaseFileName}
cp -rf ${BuildPackagelDir}/docker/Dockerfile.${SYSTEM} ${BuildDir}/Dockerfile
app
docker_build
# bash build-docker.sh --version 2.2505.2 --platform amd64 --system ubuntu22.04
# bash build-docker.sh --version 2.2505.2 --platform amd64 --system alpine3.20
Executable
+188
View File
@@ -0,0 +1,188 @@
#!/usr/bin/env bash
set -e
# Default Version
VERSION="1.0.0"
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v Specify the version"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v) VERSION="$2"; shift 2 ;; # Processing the version after -v
*) usage ;;
esac
done
# output result
echo "Version: $VERSION"
# =================== Compile System Information
# package manager
get_manager() {
if command -v rpm &> /dev/null; then
echo "rpm"
elif command -v dpkg &> /dev/null; then
echo "deb"
else
echo "unknown manager"
cat /etc/os-release
exit 1
fi
}
# Get the package manager of the current system
PACKAGE_MANAGER=$(get_manager)
echo "Package Manager: $PACKAGE_MANAGER"
# System Architecture
get_arch() {
ARCH_UNAME=$(uname -m)
case $ARCH_UNAME in
x86_64) echo "amd64" ;;
aarch64) echo "arm64" ;;
i386|i686) echo "i386" ;;
*)
echo "unknown architecture: $ARCH_UNAME"
exit 1
;;
esac
}
# Get the architecture of the current system
PACKAGE_ARCH=$(get_arch)
echo "Architecture: $PACKAGE_ARCH"
# Operating System Name Version
get_os_name_version() {
if [ -f /etc/os-release ]; then
. /etc/os-release
# 检查 $ID 是否为空
if [ -z "$ID" ]; then
echo "ID is not defined in /etc/os-release"
exit 1
fi
echo "$ID$VERSION_ID"
else
echo "unknown ID: /etc/os-release not found"
exit 1
fi
}
# Get the current operating system name version
OS_NAME=$(get_os_name_version)
echo "OS Version: $OS_NAME"
# =================== Compile Variable Information
# Compile Date
Date=`date +%Y%m%d`
# Script Path
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Compile Linux System Directory
BuildLinuxDir=${RootDir}/linux
# Compile Package Management Directory
BuildPackagelDir=${RootDir}/pkg
# Compile the build directory
BuildDir=${RootDir}/tmp
# Release Package directory
ReleaseDir=${RootDir}/release/${PACKAGE_MANAGER}/${PACKAGE_ARCH}
# Release Package name file
ReleaseFileName=omc-r${VERSION}-${Date}-${OS_NAME}-${PACKAGE_ARCH}.${PACKAGE_MANAGER}
# =================== file processing
# Apply file handling . /Located in the temporary directory
app() {
# Database scripts within common are rebuild scripts
modeList="std lite"
for v in ${modeList}; do
path=./usr/local/etc/omc/database/${v}
cp -rf $path/common/* $path/install/
cp -rf $path/common/* $path/upgrade/
rm -rf $path/common
done
}
# =================== system package manager
# deb package manager
deb() {
cd ${BuildDir}
# Replacement Tags {version} {arch}
sed -i "s/{arch}/${PACKAGE_ARCH}/g" ./DEBIAN/control
sed -i "s/{version}/${VERSION}/g" ./DEBIAN/control
sed -i "s/{date}/${Date}/g" ./DEBIAN/control
# Packaging deb
chmod 755 -R ${BuildDir}
dpkg -b ${BuildDir} ${ReleaseDir}/${ReleaseFileName}
echo "build success => ${ReleaseDir}/${ReleaseFileName}"
# Generate HAX file
cd ${ReleaseDir}
md5sum ${ReleaseFileName} > ${ReleaseFileName}.md5
echo "md5 => $(cat ${ReleaseFileName}.md5)"
sha256sum ${ReleaseFileName} > ${ReleaseFileName}.sha256
echo "sha256 => $(cat ${ReleaseFileName}.sha256)"
}
# rpm package manager
rpm() {
cd ${BuildDir}
ARCH_UNAME=$(uname -m)
# Replacement Tags {version} {arch} {date}
sed -i "s/{version}/${VERSION}/g" ./SPECS/omc.spec
sed -i "s/{arch}/${ARCH_UNAME}/g" ./SPECS/omc.spec
sed -i "s/{date}/${Date}/g" ./SPECS/omc.spec
# Packaging rpm
chmod 755 -R ${BuildDir}
rpmbuild -bb -D "_topdir ${BuildDir}" ${BuildDir}/SPECS/omc.spec
# Moving package to the distribution directory
if [[ "$OS_NAME" = "kylinV10" ]]; then # kylin system has ky10 tags
mv ${BuildDir}/RPMS/${ARCH_UNAME}/omc-${VERSION}-${Date}.ky10.${ARCH_UNAME}.rpm ${ReleaseDir}/${ReleaseFileName}
else
mv ${BuildDir}/RPMS/${ARCH_UNAME}/omc-${VERSION}-${Date}.${ARCH_UNAME}.rpm ${ReleaseDir}/${ReleaseFileName}
fi
rm -rf ${BuildDir}/RPMS
echo "build success => ${ReleaseDir}/${ReleaseFileName}"
# Generate HAX file
cd ${ReleaseDir}
md5sum ${ReleaseFileName} > ${ReleaseFileName}.md5
echo "md5 => $(cat ${ReleaseFileName}.md5)"
sha256sum ${ReleaseFileName} > ${ReleaseFileName}.sha256
echo "sha256 => $(cat ${ReleaseFileName}.sha256)"
}
# =================== building
echo
echo "building omc..."
rm -rf ${BuildDir} && mkdir -p ${BuildDir}
cp -rf ${BuildPackagelDir}/${PACKAGE_MANAGER}/* ${BuildDir}
if [[ $PACKAGE_MANAGER = "deb" ]]; then
cp -rf ${BuildLinuxDir}/* ${BuildDir}
cd ${BuildDir}
app
deb
elif [[ $PACKAGE_MANAGER = "rpm" ]]; then
cp -rf ${BuildLinuxDir}/* ${BuildDir}/BUILD
cd ${BuildDir}/BUILD
app
rpm
else
echo "unknown runing: $PACKAGE_MANAGER"
exit 1
fi
# bash build.sh -v 2.2505.2
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=omc execute script daemon
[Service]
ExecStart=/usr/local/etc/omc/script/omc_exec.sh
StandardOutput=append:/var/log/omc_exec.log
StandardError=append:/var/log/omc_exec.log
Type=oneshot
[Install]
WantedBy=multi-user.target
+18
View File
@@ -0,0 +1,18 @@
[Unit]
Description=omc service daemon
After=network-online.target kvdb.service
Wants=network-online.target
[Service]
Type=simple
LimitNOFILE=65535
LimitNPROC=65535
Restart=always
ExecStart=/usr/local/bin/omc -c /usr/local/etc/omc/omc.yaml
RestartSec=3
RestartPreventExitStatus=SIGTERM SIGKILL
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
+1
View File
@@ -0,0 +1 @@
占位
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
ServiceList="omc"
BinDir="/usr/local/bin"
# Check if the service exists
check_service() {
systemctl list-unit-files | grep -q "$1.service"
return $?
}
case "$1" in
start)
for v in $ServiceList; do
if ! check_service "$v"; then
echo "Service $v does not exist"
continue
fi
systemctl start $v
if [ $? = 0 ]; then
echo "Starting $v process done"
else
echo "Failed to start $v"
fi
sleep 1
done
;;
status)
for v in $ServiceList; do
if ! check_service "$v"; then
echo "Service $v does not exist"
continue
fi
echo "=== Status of $v ==="
systemctl status --no-pager -n 20 $v
echo ""
done
;;
stop)
for v in $ServiceList; do
if ! check_service "$v"; then
echo "Service $v does not exist"
continue
fi
systemctl stop $v
if [ $? = 0 ]; then
echo "Stopping $v process done"
else
echo "Failed to stop $v"
fi
done
;;
restart)
$0 stop
sleep 1
$0 start
;;
version)
for v in $ServiceList; do
if [ -x "$BinDir/$v" ]; then
$BinDir/$v --version
else
echo "$v binary not found in $BinDir"
fi
done
;;
*)
echo "OMC Service Control"
echo "Usage: $0 start|status|stop|restart|version"
echo ""
;;
esac
@@ -0,0 +1,33 @@
-----BEGIN CERTIFICATE-----
MIIFqzCCA5OgAwIBAgIUd84SMrVmGfyUArN/y78WQY518DIwDQYJKoZIhvcNAQEL
BQAwZTELMAkGA1UEBhMCQ04xDDAKBgNVBAgMAzVHQzEMMAoGA1UEBwwDNUdDMREw
DwYDVQQKDAhPTUMtVGVhbTERMA8GA1UECwwIT01DLVRlYW0xFDASBgNVBAMMC3d3
dy5vbWMubmV0MB4XDTI1MDQyNzA4NDEzMloXDTM1MDQyNTA4NDEzMlowZTELMAkG
A1UEBhMCQ04xDDAKBgNVBAgMAzVHQzEMMAoGA1UEBwwDNUdDMREwDwYDVQQKDAhP
TUMtVGVhbTERMA8GA1UECwwIT01DLVRlYW0xFDASBgNVBAMMC3d3dy5vbWMubmV0
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAm+870e0lMn8f9P/340HS
cXdEoCWsBGRSuYTZVymY3qeX2uRCfxgrV+y0l5HBYS7jfER6Fd58Ixesd9UXPH06
mWCycl2U1HTxE0miUMVeD37QPYldehy52R/TqXnsCJRBteYvLUlIr1xC0cZR+LYE
4uK0h4VrcANnHrU1c0r1EZIMU1ANZU0EqEOtjUU/+IT/fOUR8MHzTnu20/DpogHU
4v4nG2H94nj5MTzwvjLlTx5EU1VD0J93qHZHkzw+kOWCLDWHf/AkDmBJNHwHPiWK
BC8g7/GENeP8FQY9ZmNtn5whsWOGsjaK4zpiifYz9jpWvDFioDK1CFr0901DRr2q
g2U0qMoMrOFucGIEWLm7ecdWefIjdhWVdhqBP9o1SBtJ1WUIVHfB7ujg8fpA0N8R
o+T4EhSnfwbdJxTvjEZtVPgxBKtrxL47AAjl+TdbY+2f6IU7xBIZn2XLxAiGBFSD
oTL1fm7XOPGKT/NuxOXPCbYiCEeZcipkTFHXXSu274Npwz1xl7rjS2EEaIy6b3QQ
0ks5UquLOP44Wl1IIYwxR+WBQDDXYbklZUHh22lmb02XFc10Cs1m4a/xMFamAklz
hn4WDJTiW5fRgCTJDw6cmCncpvuw5cGjdo9fnsMQYOSLOsg9zzQ5WVjJC3oCu6xJ
p0T2mByiBnwoBK76dhddyF8CAwEAAaNTMFEwHQYDVR0OBBYEFO2829icz/VewU6Q
b9TSwDiG8rFaMB8GA1UdIwQYMBaAFO2829icz/VewU6Qb9TSwDiG8rFaMA8GA1Ud
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAIEdlrw1w+d6LgjA6kuf8pmo
yfopjQmFfN4vfJ8sPiTSoY5KdetPmxTc04knpWn9qrUhgtpxoW7ZAXNct3ltGiI/
zAPDB6jzXFoXfbhYEPpZYLpuGGWr/J9p2fkXTqdzHODcGFoOJuGlMrvxqIWL1raL
BDHajs1ETuyxJEZFXc1NO6LBeJ07eaLykEsyfUy9x7MCbZ0CkuefTnj6MuBchqAn
oxrNupw1G5+36wnFeyK43FAUWHclP4t/S2VvVHYg1U/2qZcRV6Ddxz/Yra/+TRIP
wBU6kMi+2GMjWVDgURfniKXpBfDkE77GKj3OphMZ+EEPXSKHnOF2Un8Mj5fVk86h
F4rSJ4J6LRcyEFf/pB5LT6usk3Buxq5OZjlD9UqGIbakcwCR6grxO7JPab2G8kwr
M6tYxVzW0wDbfm4YNakkpjpcwPHraVvOY1VV6DIfdFuiRP61HdkMu6WxUnd/DXsr
AOGB7gLya8+EtyydgaABolU0y3lZZaR9XCNSe1tTtTQkjik/SWGxxhue6QNR/Rr2
IGKu2oYtjwnCpir342Bc/OLyTudtYxxHbPXj6/GO1tApYKgG+50KJKx5TXUz9BGM
mqOtLSZLGs3FWKybGmZvPvgurewQqr+inRPYM5Llkeiyis1bg5CVdHL6Bb68VZaJ
+Qv3f5EhOiZfu5jcjdxb
-----END CERTIFICATE-----
@@ -0,0 +1,52 @@
-----BEGIN PRIVATE KEY-----
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCb7zvR7SUyfx/0
//fjQdJxd0SgJawEZFK5hNlXKZjep5fa5EJ/GCtX7LSXkcFhLuN8RHoV3nwjF6x3
1Rc8fTqZYLJyXZTUdPETSaJQxV4PftA9iV16HLnZH9OpeewIlEG15i8tSUivXELR
xlH4tgTi4rSHhWtwA2cetTVzSvURkgxTUA1lTQSoQ62NRT/4hP985RHwwfNOe7bT
8OmiAdTi/icbYf3iePkxPPC+MuVPHkRTVUPQn3eodkeTPD6Q5YIsNYd/8CQOYEk0
fAc+JYoELyDv8YQ14/wVBj1mY22fnCGxY4ayNorjOmKJ9jP2Ola8MWKgMrUIWvT3
TUNGvaqDZTSoygys4W5wYgRYubt5x1Z58iN2FZV2GoE/2jVIG0nVZQhUd8Hu6ODx
+kDQ3xGj5PgSFKd/Bt0nFO+MRm1U+DEEq2vEvjsACOX5N1tj7Z/ohTvEEhmfZcvE
CIYEVIOhMvV+btc48YpP827E5c8JtiIIR5lyKmRMUdddK7bvg2nDPXGXuuNLYQRo
jLpvdBDSSzlSq4s4/jhaXUghjDFH5YFAMNdhuSVlQeHbaWZvTZcVzXQKzWbhr/Ew
VqYCSXOGfhYMlOJbl9GAJMkPDpyYKdym+7DlwaN2j1+ewxBg5Is6yD3PNDlZWMkL
egK7rEmnRPaYHKIGfCgErvp2F13IXwIDAQABAoICAB0PDxHG5LitUhJBJTvXh1UX
ydUiUBUdcQEbjbkdilxr1PO4t9+hbGpdNSZNxkDLER+WTz4GERIlFkHalxLxr1rn
1zlS0SpqhIZ4oWP189plYn8lOyNHeSbKNJKPovnSTxCLzdzdnEr5oYYgNCRqHyz8
3HGo3mWobK4fTM+od1UH534bG/P1z1lgC1aZQhuZBVeMBLTeH+5PRbnnWlKTjs2i
WT1UHJD4xE91sNNw/qSo2kjBSfr1zMG7EQmSH4K3EnQUoaSo5r87GElMl7jwG/E9
qyCr3FyCmPZ+DDEpdENbQDgjePV7DpTby4M0O2i2ZHV7qop6CJx+/smbP19Odxjs
6roI2z0N/AzQmohHe1enBLGCIgJDVS9TCTC1EARgceEM+EAbUiwOlWpuSIuhqFwI
AwzHtZoilL9O0zvKv1Et9HWvScXtWvVkmNFmDJbsjn1li2fMC/SvsHElx7ZRUgvQ
+pNG6QVSfqHwd6+e4+E0nV1DSzWsXWJL8KXofFWx2xt5HBiFLS19AM8IupaNsLBC
CEeZO1MiqS68YhRar5QMTUm121qq4zNBRXjMWJ6mXOJ2M+pbAj+QfKrwMbZsnvhU
KfxFQLFQ+aD+/rHp+cwRflSVGj7nK1GMZXLJQlcMGfl/15Zl3vbcnbzOq+jC/hyV
Jnz8lAge2E7szo2E7lMpAoIBAQDILUUXL5f3tK/h/aMOCygdjFWSDMHtLe0GAGfK
qhsz6kFBISEDEtqHPwGV/NJF/nD9pWHxI4M2raFkH7QZlMHhgvKEBmjXldfQ2a7p
aP+EGYSf+xHmfomJCie04dyrbvfznzp/CkIRRAUatCpe5kk8PgWbRi5gtueXrQbA
Wdm1hOXIGcz0eh2FnXwpR3ilpjV3PzPi9Pkz3c52efocpBLeFwht3IIOppKAmsyB
LFrEzJBysmKpjhBRvSae1oGsSS+ut7PZx92IjaJRu2zUuAj4z9TRMKf3OEppBHJp
H3U23bf2+sjn1swoAnJXOuIEv+bWWzJjmDt8st11ChD/+MLlAoIBAQDHa3sEMAb9
cq0uWpQBrggKKYv4NvnOEquj/k11oX1tZPSQtO8sRx/vp/8c3zxIX9GdU/iV/32f
Xopqebj8NqvWkSbjzqSXiioNSFgppGVaNu1RH6IFSzUk3EF/M6H9YRqgW8XYMSeE
MVJutvRa2+vrIelhS4KDScWKX/WuKX7mbD8891YJOIObFi4HJMBtTD2mFN/jli24
3YZwlmxsmPN28VrZB6YqBsvJNOeA9oBL7eg/elsWhh0V7Ie4FyKTHd5CSugJwD4C
So3CoEfZGYcNcxGF2pA5AXMhc4bDb8A3afCzQ7C5kIvQ3Yq6FcZvXVKcR7eTPqSD
/JwanOY5QBXzAoIBAQCPdmpS0KhQPe3jwDyw3uwUKTRWpNADZOu/ZmD8jWdLkLLN
s6mOI1/8l/pR/UzSHyXpkzKbeMEcWdoWAOa5grRlI80dM97Fyz1OEATcgYTGrucv
JOhSUhPN5DpK16ioMLKBpnds/vQUnbQuzDqlotOP2j94Zhbs94kJWldBWeO+xQ1N
mLgb6rznutN2XiOoTHN7EA/ms306X9gNbyQCjNB83PMMkYGgcF8EzmyMkzZGXvmT
SieNryQhALgCFGgBCr6isEO0bBpoOGHBw9qepXrAn2q9tepbMruZgjdhAcum08Z5
uohsJ7RPZFmADNJZZxNQQzHc0QipOSOgMuO2IBnFAoIBAEyWuO5Iy8Z3To/o9cMX
ZbsRbdJsutAsV4NqXbF5zkQ/a7ZP5zOoNVnDubUK/4oEUusLnwNs1oBovNxb13H2
RVTo9nizmn8g7zmeuU10+AAH7GklrwI9ejGn7fe+is5XhvRjir6XUkfw8WnYFkz2
/cqWgZ1+dKebo6Sbai3zfetdU4REseRkshbUE+VmdgkEKQEqLzqnKPRBECsZepbS
v17FH1EPIQAvEAE8slTTVz7SJkqK4YTrCSysZQuMxxiddgkb37YvASG8JGnFSRLW
PQorUWWJJa7fIaqNRgq1VqtxoqIWsz7xhuE21NrXFhkbTGj9GkIQ4vpWAFYwQDNo
q4UCggEAD5C079b8ZrrZAPaB62CFW6s5HibiSjI5YTS++eCJSi9TOmi8yAdipZgD
CmuEzfw060VOflyNAAck9vZc1NHkANgpt1StZmo0CQikKjua7u7NPtBIwKF/OMMv
gcYduoTCmntMe85DSviZD0bZ5Ez5ocsT2cTMBvltT1YZjU5F91H87qhzZlVqP9C5
Sml2mY+QYi9yifEYqp5Qth5W5bcp+QV/LecAS6Rv3xbkd5nV4v0oN8ekp40iA3+q
bqoyWol6pHym+3X0j3bHwWbBz1QG6H1rzi6n6fM08lfvT7bHvh+4iOQEm/ph/Alh
RNodAySNybYrYHj6i4VkgDxYg+FhYg==
-----END PRIVATE KEY-----
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,49 @@
upstream lbHTTPByOMC {
server 127.0.0.1:33030 max_fails=3 fail_timeout=30s;
#server 127.0.0.2:33030 max_fails=3 fail_timeout=30s;
}
server {
listen 80;
listen [::]:80;
server_name www.omc.local;
client_max_body_size 100M;
keepalive_timeout 180s;
# access_log /var/log/nginx/host.access.log main;
location / {
root /usr/local/etc/omc/web;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_cache_bypass $http_upgrade;
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;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_pass http://lbHTTPByOMC/;
}
#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 {
return 301 http://$host$request_uri;
}
}
@@ -0,0 +1,58 @@
upstream lbHTTPSByOMC {
server 127.0.0.1:33443 max_fails=3 fail_timeout=30s;
#server 127.0.0.2:33443 max_fails=3 fail_timeout=30s;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.omc.net;
ssl_certificate /usr/local/etc/omc/certs/www.omc.net.crt;
ssl_certificate_key /usr/local/etc/omc/certs/www.omc.net.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;
client_max_body_size 100M;
keepalive_timeout 180s;
# access_log /var/log/nginx/host.access.log main;
location / {
root /usr/local/etc/omc/web;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /omc-api/ {
proxy_cache_bypass $http_upgrade;
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;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_pass https://lbHTTPSByOMC/;
}
#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 {
return 301 https://$host$request_uri;
}
}
+33
View File
@@ -0,0 +1,33 @@
upstream lbByOMC {
server 127.0.0.1:33030 max_fails=3 fail_timeout=30s;
#server 127.0.0.2:33030 max_fails=3 fail_timeout=30s;
}
server {
listen 33040;
listen [::]:33040;
server_name omc;
client_max_body_size 100M;
keepalive_timeout 180s;
# access_log /var/log/nginx/host.access.log main;
location / {
proxy_cache_bypass $http_upgrade;
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;
proxy_connect_timeout 180s;
proxy_send_timeout 180s;
proxy_read_timeout 180s;
proxy_pass https://lbByOMC/;
}
}
+46
View File
@@ -0,0 +1,46 @@
basic:
dnn_data: internet
dnn_ims: ims
plmnId:
mcc: "460"
mnc: "60"
snssai:
sd: "460001"
sst: "1"
tac: "4388"
external:
amfn2_ip: 172.16.5.120
ims_sip_ip: 172.16.5.110
mmes1_ip: 172.16.5.220/20
mmes10_ip: 172.16.5.221/24
mmes11_ip: 172.16.5.220/24
ue_pool: 10.2.1.0/24
upf_driver_type: vmxnet3
upf_type: LightUPF
upfn3_card_name: eth0
upfn3_gw: 192.168.1.1
upfn3_ip: 172.16.5.190/24
upfn3_mac: "00:00:00:00:00:00"
upfn3_pci: "0000:00:00.0"
upfn6_card_name: eth0
upfn6_gw: 192.168.1.1
upfn6_ip: 172.16.5.191/24
upfn6_mac: "00:00:00:00:00:00"
upfn6_pci: "0000:00:00.0"
sbi:
amf_ip: 172.16.5.120
ausf_ip: 172.16.5.130
db_ip: 0.0.0.0
ims_ip: 172.16.5.110
lmf_ip: 172.16.5.200
mme_ip: 172.16.5.220
n3iwf_ip: 172.16.5.230
nef_ip: 172.16.5.210
nrf_ip: 172.16.5.180
nssf_ip: 172.16.5.170
omc_ip: 172.16.5.100
pcf_ip: 172.16.5.160
smf_ip: 172.16.5.150
smsc_ip: 172.16.5.240
udm_ip: 172.16.5.140
upf_ip: 172.16.5.190
+213
View File
@@ -0,0 +1,213 @@
#!/usr/bin/env bash
declare -A NE_LIST
# Default network element number ne_id = 001
# Defining a list of network elements
# Format: "ne_type, ne_ip, ne_port"
# -----------------------------------------
# ne_id 001 Network Elements
# -----------------------------------------
NE_LIST["001"]="\
OMC,172.16.5.100,33030
IMS,172.16.5.110,33030
AMF,172.16.5.120,33030
AUSF,172.16.5.130,33030
UDM,172.16.5.140,33030
SMF,172.16.5.150,33030
PCF,172.16.5.160,33030
UPF,172.16.5.190,33030
"
# -----------------------------------------
# ne_id 002 Network Elements
# -----------------------------------------
# NE_LIST["002"]="\
# IMS,172.16.15.110,33030
# AMF,172.16.15.120,33030
# AUSF,172.16.15.130,33030
# UDM,172.16.15.140,33030
# SMF,172.16.15.150,33030
# PCF,172.16.15.160,33030
# UPF,172.16.15.190,33030
# "
# SSH info
DEFAULT_SSH_USER="manager"
DEFAULT_SSH_PORT=22
# If you already have a password-free authorization
# Please set the password to ""
#DEFAULT_SSH_PWD=""
DEFAULT_SSH_PWD="bSQ21KY7cjn58JNkZ0UZM64EbSIPMQwfCTmzk3MTBvQ=" # admin123
# 5gc+omc use local 127.0.0.1
DEFAULT_SSH_LOCAL=false
# ne_host info
DEFAULT_TELNET_PORT=4100
DEFAULT_TELNET_PORT2=5002
DEFAULT_REDIS_PORT=6379
# Path to the output file
output_file="output.sql"
# Empty the contents of the file (if the file already exists)
> "$output_file"
# ======================= generate sql
# ne_info
# generate_ne_info 1 OMC 001 127.0.0.1 33030 1,2
generate_ne_info() {
local row_id=$1
local ne_type=$2
local ne_id=$3
local ip=$4
local port=$5
local ne_host=$6
local ne_name="${ne_type}_${ne_id}"
local ne_rmuid="4400HX${ne_type}${ne_id}"
echo "INSERT INTO ne_info VALUES (${row_id}, '${ne_type}', '${ne_id}', '${ne_rmuid}', '${ne_name}', "2", 'http', '${ip}', ${port}, 'PNF', '-', '-', '-', '-', '${ne_host}', 1, '', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
}
# ne_host
# generate_ne_host 1 OMC 001 127.0.0.1
generate_ne_host() {
local row_id=$1
local ne_type=$2
local ne_id=$3
local ip=$4
local ne_name="${ne_type}_${ne_id}"
local start_id=$row_id
local ssh_ip=$4
if [ "$DEFAULT_SSH_LOCAL" == true ]; then
ssh_ip="127.0.0.1"
fi
local ssh_type="2"
local ssh_password=""
if [ -n "$DEFAULT_SSH_PWD" ]; then
ssh_type="0"
ssh_password="$DEFAULT_SSH_PWD"
fi
# SSH
echo "INSERT INTO ne_host VALUES (${start_id}, 'ssh', '1', '${ne_name}_${DEFAULT_SSH_PORT}_${start_id}', '${ssh_ip}', ${DEFAULT_SSH_PORT}, '${DEFAULT_SSH_USER}', '${ssh_type}', '${ssh_password}', '', '', '', '', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
((start_id++))
# Telnet
echo "INSERT INTO ne_host VALUES (${start_id}, 'telnet', '1', '${ne_name}_${DEFAULT_TELNET_PORT}_${start_id}', '${ip}', ${DEFAULT_TELNET_PORT}, 'admin', '0', 'okzArqkFYlnVVdQYkNiqmiW+CGQrxg1AFmroR1bw1Kg=', '', '', '', '', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
((start_id++))
# Special network element type handling
case "$ne_type" in
"UDM")
echo "INSERT INTO ne_host VALUES (${start_id}, 'redis', '1', '${ne_name}_${DEFAULT_REDIS_PORT}_${start_id}', '${ip}', ${DEFAULT_REDIS_PORT}, 'udmdb', '0', 'jW965gWZK0mw6EtYfihMV9QqHjqa03vJ8VlVii9non8=', '', '', '0', '', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
;;
"UPF")
echo "INSERT INTO ne_host VALUES (${start_id}, 'telnet', '1', '${ne_name}_${DEFAULT_TELNET_PORT2}_${start_id}', '${ip}', ${DEFAULT_TELNET_PORT2}, 'admin', '0', '', '', '', '', '', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
;;
esac
}
# generate_ne_host_ids OMC 1
generate_ne_host_ids() {
local ne_type=$1
local start_id=$2
local ids="${start_id},$((start_id+1))"
case "$ne_type" in
"UDM")
ids="${ids},$((start_id+2))"
;;
"UPF")
ids="${ids},$((start_id+2))"
;;
esac
echo "$ids"
}
# ne_version
# generate_ne_version 1 OMC 001
generate_ne_version() {
local row_id=$1
local ne_type=$2
local ne_id=$3
echo "INSERT INTO ne_version VALUES (${row_id}, '${ne_type}', '${ne_id}', '-', '-', '-', '', '', '', '', '', '', '0', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
}
# ne_license
# generate_ne_license 1 OMC 001
generate_ne_license() {
local row_id=$1
local ne_type=$2
local ne_id=$3
echo "INSERT INTO ne_license VALUES (${row_id}, '${ne_type}', '${ne_id}', '', '', '', '', 0, 0, '1', '', 'script', $(date +%s%3N), 'script', $(date +%s%3N));"
}
# =======================
# Execute output sql to file
execute_output() {
local row_id=1
local host_id=1
# empty the table
echo "DELETE FROM ne_host;" >> "$output_file"
echo "DELETE FROM ne_info;" >> "$output_file"
echo "DELETE FROM ne_version;" >> "$output_file"
echo "DELETE FROM ne_license;" >> "$output_file"
echo "" >> "$output_file"
# -----------------------------------------
# Example of accessing and parsing the elements
# -----------------------------------------
for ne_id in "${!NE_LIST[@]}"; do
echo "NEID: $ne_id:"
# Splitting the values by newline to get each device entry
IFS=$'\n' read -r -d '' -a devices <<< "${NE_LIST[$ne_id]}"
# Iterating over each device entry
for device in "${devices[@]}"; do
# Split device entry into name, IP, and port
IFS=',' read -r ne_type ne_ip ne_port <<< "$device"
echo "===> ${ne_type} ${ne_ip} ${ne_port}"
generate_ne_host "$host_id" "$ne_type" "$ne_id" "$ne_ip" >> "$output_file"
local host_ids=$(generate_ne_host_ids $ne_type $host_id)
generate_ne_info "$row_id" "$ne_type" "$ne_id" "$ne_ip" "$ne_port" "$host_ids" >> "$output_file"
generate_ne_version "$row_id" "$ne_type" "$ne_id" >> "$output_file"
generate_ne_license "$row_id" "$ne_type" "$ne_id" >> "$output_file"
echo "" >> "$output_file"
((row_id++))
case "$ne_type" in
"UDM"|"UPF")
host_id=$((host_id+3))
;;
*)
host_id=$((host_id+2))
;;
esac
done
done
}
execute_output
# Execute import sql to omc
execute_import() {
local OMCBinFile=/usr/local/bin/omc
local OMCEtcDir=/usr/local/etc/omc
local confFile=$OMCEtcDir/omc.yaml
source $OMCEtcDir/omc.conf
$OMCBinFile -c $confFile --sqlPath $output_file --sqlSource $MODE
}
execute_import
# Remove the output file
rm -rf $output_file
@@ -0,0 +1 @@
#!/usr/bin/env bash
+131
View File
@@ -0,0 +1,131 @@
#!/usr/bin/env bash
set -e
OMCBinFile=/usr/local/bin/omc
OMCEtcDir=/usr/local/etc/omc
confFile=$OMCEtcDir/omc.yaml
VariableFile=$OMCEtcDir/omc.conf
# Read the value of the variable from file
source $VariableFile
# Initializing variables
T_PARAM=""
R_PARAM=false
C_PARAM=""
M_PARAM=""
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Program Initialization OPTION:"
echo " -i, --install Specify the install"
echo " -u, --upgrade Specify the upgrade"
echo " -r, --remote Specify the remote database"
echo " -m, --mode Available the mode (std/lite)"
echo " -c, --customize Available the customize (omc/agt/ba)"
echo " -h Display this help message"
echo
exit 1
}
# =========================
while [[ $# -gt 0 ]]; do
case "$1" in
-i|--install)
T_PARAM="install"
shift
;;
-u|--upgrade)
T_PARAM="upgrade"
shift
;;
-r|--remote)
R_PARAM=true
shift
;;
-m|--mode)
M_PARAM="$2"
shift 2 # 跳过 -m 参数和值
;;
-c|--customize)
C_PARAM="$2"
shift 2 # 跳过 -c 参数和值
;;
-h)
usage
;;
*)
echo "Error: Unknown option: $1"
usage
;;
esac
done
# Make sure -i or -u comes first.
if [ -z "$T_PARAM" ]; then
echo "Error: You must specify -i (install) or -u (upgrade) first."
usage
fi
# echo "Type parameter: $T_PARAM"
# Determine if -m is passed in
if [ -n "$M_PARAM" ]; then
# Check that mode is within the std range
if [[ "$M_PARAM" != "std" && "$M_PARAM" != "lite" ]]; then
echo "Error: M_PARAM can only be 'std' or 'lite'."
exit 1
fi
sed -i "s/MODE=.*/MODE=${M_PARAM}/" $VariableFile
sed -i "s/serverVersion: \"std\"/serverVersion: \"${M_PARAM}\"/" $confFile
sed -i "/database:/,/defaultDataSourceName:/s/\"std\"/\"${M_PARAM}\"/" $confFile
MODE=$M_PARAM
fi
# echo "Mode parameter: $MODE"
# Determine if -c is passed in
if [ -n "$C_PARAM" ]; then
# Check if customize is within the omc/agt/ba range
if [[ "$C_PARAM" != "omc" && "$C_PARAM" != "agt" && "$C_PARAM" != "ba" ]]; then
echo "Error: C_PARAM can only be 'omc', 'agt' or 'ba'."
exit 1
fi
sed -i "s/VENDORS=.*/VENDORS=${C_PARAM}/" $VariableFile
VENDORS=$C_PARAM
fi
# echo "Customize parameter: $VENDORS"
# ========================= Specify the mode pre-determination
if [[ "$T_PARAM" == "install" ]]; then
case "$MODE" in
std)
# Check if MySQL or MariaDB is installed when not a remote database
if [ "$R_PARAM" = false ]; then
if ! command -v mysql &>/dev/null && ! command -v mariadb &>/dev/null; then
echo "MySQL or MariaDB not installed"
exit 1
fi
fi
;;
lite)
cp -rf $OMCEtcDir/default/omc_db.sqlite $OMCEtcDir/database/omc_db.sqlite
;;
esac
fi
# ========================= Execute the catalog sql file according to the schema
$OMCBinFile -c $confFile --sqlPath $OMCEtcDir/database/$MODE/$T_PARAM --sqlSource $MODE
# ========================= Customize
if [[ -d $OMCEtcDir/vendor ]]; then
if [[ "$T_PARAM" == "install" ]]; then
cp -rf $OMCEtcDir/vendor/$VENDORS/web/* $OMCEtcDir/web/background
cp -rf $OMCEtcDir/vendor/$VENDORS/static/* /usr/local/omc/static
fi
$OMCBinFile -c $confFile --sqlPath $OMCEtcDir/vendor/$VENDORS/database/$MODE/$T_PARAM --sqlSource $MODE
fi
# bash setup.sh -i -m std -c omc
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Defining a list of SSH
# ssh_user,ssh_ip
# ssh_user,ssh_ip,ssh_port
SSH_LIST=(
"manager,172.16.5.100"
"manager,172.16.5.110"
"manager,172.16.5.120"
"manager,172.16.5.130"
"manager,172.16.5.140"
"manager,172.16.5.150"
"manager,172.16.5.160"
"manager,172.16.5.190"
)
DEFAULT_SSH_PORT=22
# Create .ssh directory if it doesn't exist
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Check if the SSH key already exists
if [ ! -f ~/.ssh/id_rsa ]; then
# Generate SSH key
ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
fi
for v in "${SSH_LIST[@]}"; do
IFS=',' read -r ssh_user ssh_ip ssh_port <<< "$v"
if [ -z "$ssh_port" ]; then
ssh_port=$DEFAULT_SSH_PORT
fi
echo "===> ${ssh_user} ${ssh_ip} ${ssh_port}"
# Copy public key content
cat ~/.ssh/id_rsa.pub | ssh -p ${ssh_port} ${ssh_user}@${ssh_ip} "\
mkdir -p ~/.ssh && chmod 700 ~/.ssh && \
touch ~/.ssh/authorized_keys && chmod 775 ~/.ssh/authorized_keys && \
cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
done
View File
Whitespace-only changes.
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
+107
View File
@@ -0,0 +1,107 @@
#!/usr/bin/env bash
set -e
# front-end Catalog
WebDir=/root/omc.git/fe.ems.vue3
WebBranch=main-v2
# back-end catalog
ApiDir=/root/omc.git/be.ems
ApiBranch=main-v2
# Package Catalog
BuildDir=/root/omc.git/build.ems
BuildBranch=main-v2
BuildTmpDir=/root/omc.git/build.ems/tmp
# Default Version Value
VERSION="2.2508.1"
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v Specify the version"
echo " -webBranch Web Branch ($WebBranch)"
echo " -apiBranch Api Branch ($ApiBranch)"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v) VERSION="$2"; shift 2 ;;
-webBranch) WebBranch="$2"; shift 2 ;;
-apiBranch) ApiBranch="$2"; shift 2 ;;
*) usage ;;
esac
done
# =================== build branch
echo
cd $BuildDir
git checkout .
git pull
git checkout $BuildBranch
git pull
# clear tmp dir
rm -rf ${BuildTmpDir} && mkdir -p ${BuildTmpDir}
echo "===> build checkout directory: $BuildDir"
# =================== Web
echo
cd $WebDir
git checkout .
git pull
git checkout $WebBranch
git pull
# cp -rf $WebDir $BuildTmpDir/omc_web
mkdir -p $BuildTmpDir/omc_web
cp -rf $WebDir/src $BuildTmpDir/omc_web
cp -rf $WebDir/public $BuildTmpDir/omc_web
cp -rf $WebDir/index.html $BuildTmpDir/omc_web
cp -rf $WebDir/.env.production $BuildTmpDir/omc_web
cp -rf $WebDir/.env.development $BuildTmpDir/omc_web
cp -rf $WebDir/package.json $BuildTmpDir/omc_web
cp -rf $WebDir/tsconfig.json $BuildTmpDir/omc_web
cp -rf $WebDir/tsconfig.node.json $BuildTmpDir/omc_web
cp -rf $WebDir/vite.config.ts $BuildTmpDir/omc_web
echo "===> web source code to $BuildTmpDir/omc_web"
# =================== Api
echo
cd $ApiDir
git checkout .
git pull
git checkout $ApiBranch
git pull
# cp -rf $ApiDir $BuildTmpDir/omc_api
mkdir -p $BuildTmpDir/omc_api
cp -rf $ApiDir/features $BuildTmpDir/omc_api
cp -rf $ApiDir/lib $BuildTmpDir/omc_api
cp -rf $ApiDir/src $BuildTmpDir/omc_api
cp -rf $ApiDir/swagger_docs $BuildTmpDir/omc_api
cp -rf $ApiDir/go.sum $BuildTmpDir/omc_api
cp -rf $ApiDir/go.mod $BuildTmpDir/omc_api
cp -rf $ApiDir/main.go $BuildTmpDir/omc_api
echo "===> omc source code to $BuildTmpDir/omc_api"
# Vendor Database
output=$BuildDir/linux/usr/local/etc/omc
dirs="database default vendor"
for v in ${dirs}; do
rm -rf ${output}/${v}
cp -rf ${ApiDir}/build/${v} ${output}/${v}
done
echo
echo "===> vendor data copy to $output"
# =================== build docker image
echo
# bash $BuildDir/build-docker.sh -v $VERSION -p amd64 -s ubuntu22.04
bash $BuildDir/build-docker.sh -v $VERSION -p amd64 -s alpine3.20
# Compile the front-end and back-end and then package the version
# bash pkg-docker.sh -v 2.2505.2
+120
View File
@@ -0,0 +1,120 @@
#!/usr/bin/env bash
set -e
# front-end Catalog
WebDir=/root/omc.git/fe.ems.vue3
WebBranch=main-v2
BuildWeb=""
# back-end catalog
ApiDir=/root/omc.git/be.ems
ApiBranch=main-v2
BuildApi=""
# Package Catalog
BuildDir=/root/omc.git/build.ems
BuildBranch=main-v2
# Default Version Value
VERSION="2.2508.1"
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v Specify the version"
echo " --web Build Web ($WebDir)"
echo " --api Build Api ($ApiDir)"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v) VERSION="$2"; shift 2 ;;
--web) BuildWeb="build"; shift ;;
--api) BuildApi="build"; shift ;;
*) usage ;;
esac
done
# =================== build branch
echo
cd $BuildDir
git checkout .
git pull
git checkout $BuildBranch
git pull
# =================== Web
echo
# Determine if --web is passed in
if [ -n "$BuildWeb" ]; then
cd $WebDir
git checkout .
git pull
git checkout $WebBranch
git pull
sed -i "s/VITE_APP_VERSION = .*/VITE_APP_VERSION = \"${VERSION}\"/g" $WebDir/.env.development
sed -i "s/VITE_APP_VERSION = .*/VITE_APP_VERSION = \"${VERSION}\"/g" $WebDir/.env.production
# RemoveChinese
rm -rf ./public/alarmHelp/zh
rm -rf ./public/nbStateImput/zh.xlsx
find ./public -type f \( -name "*.js" -o -name "*.json" \) -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
find ./src -type f \( -name "*.ts" -o -name "*.vue" -o -name "*.js" -o -name "*.json" \) -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
npm install --registry https://registry.npmmirror.com
npm run build
output=$BuildDir/linux/usr/local/etc/omc/web
rm -rf $output && cp -rf dist $output
echo "===> web build dist copy to $output"
fi
# =================== Api
echo
# Determine if --api is passed in
if [ -n "$BuildApi" ]; then
cd $ApiDir
git checkout .
git pull
git checkout $ApiBranch
git pull
# RemoveChinese
find ./build/database -type f -name '*.sql' -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
find ./features -type f -name '*.go' -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
find ./lib -type f -name '*.go' -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
find ./src -type f -name '*.go' -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
find ./build/vendor -type f -name '*.sql' -exec sed -i 's/[一-龥、,。?!“”()【】·]//g' {} +
find ./build/vendor -type f -name '*.sql' -exec sed -i "s/'true' WHERE \`config_id\`/'false' WHERE \`config_id\`/g" {} +
find ./build/vendor -type f -name '*.sql' -exec sed -i "s/'1' WHERE \`menu_id\`/'0' WHERE \`menu_id\`/g" {} +
find ./build/vendor -type f -name 'zh_*' -exec rm -f {} \;
MOD_CONFIG="be.ems/src/framework/config"
go build -o omc -v -ldflags "-s -w -X '$MOD_CONFIG.Version=$VERSION' -X '$MOD_CONFIG.BuildTime=$(date)' -X '$MOD_CONFIG.GoVer=$(go version)'"
output=$BuildDir/linux/usr/local/bin
cp -rf omc $output/omc
echo "===> go build omc copy to $output"
# Vendor Database
output=$BuildDir/linux/usr/local/etc/omc
dirs="database default vendor"
for v in ${dirs}; do
rm -rf ${output}/${v}
cp -rf ${ApiDir}/build/${v} ${output}/${v}
done
echo
echo "===> vendor data copy to $output"
fi
# =================== deb/rpm
echo
bash $BuildDir/build.sh -v $VERSION
# Compile the front-end and back-end and then package the version
# bash pkg-remove-chinese.sh --web --api -v 2.2503.2
# Packaged version of just the last compiled file/build directory
# bash pkg-remove-chinese.sh -v 2.2503.2
+109
View File
@@ -0,0 +1,109 @@
#!/usr/bin/env bash
set -e
# front-end Catalog
WebDir=/root/omc.git/fe.ems.vue3
WebBranch=main-v2
BuildWeb=""
# back-end Catalog
ApiDir=/root/omc.git/be.ems
ApiBranch=main-v2
BuildApi=""
# Package Catalog
BuildDir=/root/omc.git/build.ems
BuildBranch=main-v2
# Default Version Value
VERSION="2.2508.1"
# usage
usage() {
echo "Usage: bash $0 [OPTION]"
echo
echo "Build Software Package OPTION:"
echo " -v Specify the version"
echo " --web Build Web ($WebDir) Branch ($WebBranch)"
echo " --api Build Api ($ApiDir) Branch ($ApiBranch)"
echo " -h Display this help message"
echo
exit 1
}
# Read command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-v) VERSION="$2"; shift 2 ;;
--web) BuildWeb="build"; shift ;;
--api) BuildApi="build"; shift ;;
*) usage ;;
esac
done
# =================== build branch
echo
cd $BuildDir
git checkout .
git pull
git checkout $BuildBranch
git pull
echo "===> build checkout directory: $BuildDir"
# =================== Web
echo
# Determine if --web is passed in
if [ -n "$BuildWeb" ]; then
cd $WebDir
git checkout .
git pull
git checkout $WebBranch
git pull
sed -i "s/VITE_APP_VERSION = .*/VITE_APP_VERSION = \"${VERSION}\"/g" $WebDir/.env.development
sed -i "s/VITE_APP_VERSION = .*/VITE_APP_VERSION = \"${VERSION}\"/g" $WebDir/.env.production
# remote replication
#scpDir=/root/omc.git/fe.ems.vue3
#scp -r -P 18422 root@192.168.9.58:$scpDir/dist $WebDir/
# local compilation
npm install --registry https://registry.npmmirror.com
npm run build
output=$BuildDir/linux/usr/local/etc/omc/web
rm -rf $output && cp -rf dist $output
echo "===> web build dist copy to $output"
fi
# =================== Api
echo
# Determine if --api is passed in
if [ -n "$BuildApi" ]; then
cd $ApiDir
git checkout .
git pull
git checkout $ApiBranch
git pull
MOD_CONFIG="be.ems/src/framework/config"
go build -o omc -v -ldflags "-s -w -X '$MOD_CONFIG.Version=$VERSION' -X '$MOD_CONFIG.BuildTime=$(date)' -X '$MOD_CONFIG.GoVer=$(go version)'"
output=$BuildDir/linux/usr/local/bin
cp -rf omc $output/omc
echo "===> go build omc copy to $output"
# Vendor Database
output=$BuildDir/linux/usr/local/etc/omc
dirs="database default vendor"
for v in ${dirs}; do
rm -rf ${output}/${v}
cp -rf ${ApiDir}/build/${v} ${output}/${v}
done
echo
echo "===> vendor data copy to $output"
fi
# =================== deb/rpm
echo
bash $BuildDir/build.sh -v $VERSION
# Compile the front-end and back-end and then package the version
# bash pkg.sh --web --api -v 2.2503.2
# Packaged version of just the last compiled file/build directory
# bash pkg.sh -v 2.2503.2
+8
View File
@@ -0,0 +1,8 @@
Package: OMC
Version: {version}-{date}
Section: OMC-Team
Prioritt: optional
Architecture: {arch}
Maintainer: OMC-Team
Depends:
Description: OMC for 4G/5G Core Network Software
+63
View File
@@ -0,0 +1,63 @@
# !/bin/bash
# Execute the script after installation
RootDir=/usr/local/etc/omc
# Perform post-installation configuration
echo ""
echo "Output: $RootDir"
echo "Service:"
echo " sudo systemctl [start|stop|status|restart] omc.service"
echo ""
# Check if this is the first installation or upgrade
if [ ! -f $RootDir/machine.ini ]; then
# First installation, perform the related operations
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
# read environment parameter and to do
if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then
bash $RootDir/script/setup.sh -i -m $M_PARAM -c $C_PARAM
elif [ -n "$C_PARAM" ]; then
bash $RootDir/script/setup.sh -i -c $C_PARAM
else
bash $RootDir/script/setup.sh -i
fi
if [ $? -ne 0 ]; then
echo "Initialization failure."
rm -rf $RootDir
exit 1
fi
systemctl daemon-reload
systemctl enable omc.service
systemctl daemon-reload
systemctl restart omc.service
else
# Operation when upgrading
if [ ! -f $RootDir/omc.conf ]; then
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
fi
# Override Configuration
if ! grep -q "# route service configuration" $RootDir/omc.yaml; then
cp -rf $RootDir/default/omc.yaml $RootDir/omc.yaml
fi
# Stop Service
systemctl daemon-reload
systemctl stop omc.service
bash $RootDir/script/setup.sh -u
if [ $? -ne 0 ]; then
echo "Upgrade failed."
exit 1
fi
systemctl daemon-reload
systemctl restart omc.service
fi
echo ""
+21
View File
@@ -0,0 +1,21 @@
# !/bin/bash
# Execute the script after uninstallation
case "$1" in
remove)
# Uninstallation operations
# Deletion of service files
systemctl daemon-reload
systemctl disable omc.service
rm -rf /lib/systemd/system/omc.service
systemctl daemon-reload
# Removal of relevant documents
rm -rf /usr/local/bin/omc
rm -rf /usr/local/etc/omc
;;
upgrade)
# Update Operation
;;
esac
+4
View File
@@ -0,0 +1,4 @@
# !/bin/bash
# Execute the script before installation
rm -rf /usr/local/etc/omc/default
+6
View File
@@ -0,0 +1,6 @@
# !/bin/bash
# Execute the script before uninstalling
# Stop Service
systemctl daemon-reload
systemctl stop omc.service
+79
View File
@@ -0,0 +1,79 @@
## 第一阶段 ====> Nodejs打包编译输出前端资源
FROM node:20-alpine AS build-node
# 系统文件
COPY ./linux /linux
# 后端程序
COPY ./omc_api /api
# 前端程序
COPY ./omc_web /web
RUN npm config set registry https://registry.npmmirror.com
RUN cd /web && npm install && npm run build
## 第二阶段 ====> Go打包编译输出后端程序
FROM golang:1.24-alpine AS build-golang
ARG TARGETARCH
ARG VERSION
# 从上个阶段复制文件
COPY --from=build-node /web/dist /web
COPY --from=build-node /api /api
COPY --from=build-node /linux /linux
# 设置变量
ARG VERSION
ENV CGO_ENABLED 1
ENV GOOS linux
ENV GOPROXY https://goproxy.cn,direct
# 更新apt并安装必要工具
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add gcc musl-dev libpcap-dev && rm -rf /var/cache/apk/*
RUN cd /api && go mod download
RUN cd /api && go build -o omc -v -ldflags "-s -w \
-X 'be.ems/src/framework/config.Version=$VERSION' \
-X 'be.ems/src/framework/config.BuildTime=$(date)' \
-X 'be.ems/src/framework/config.GoVer=$(go version)'"
## 第三阶段 ====> 构建前后端融合镜像
FROM alpine:3.20
# 从上个阶段复制文件
COPY --from=build-golang /linux/usr/local/etc/omc /usr/local/etc/omc
COPY --from=build-golang /linux/usr/local/omc /usr/local/omc
COPY --from=build-golang /api/omc /usr/local/bin/omc
COPY --from=build-golang /web /usr/local/etc/omc/web
# 更新apt并安装必要工具
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add musl-dev libpcap-dev bash nginx tzdata && rm -rf /var/cache/apk/*
# 设置时区和语言环境
ENV LANG="en_US.UTF-8"
ENV TZ="Asia/Shanghai"
WORKDIR /usr/local/etc/omc
RUN chmod +x /usr/local/etc/omc/script/*.sh
RUN /usr/local/etc/omc/script/postunpack.sh
EXPOSE 80 443 33030 33443 33033 33034 33060
CMD [ "/usr/local/etc/omc/script/entrypoint.sh" ]
# build 448MB
# docker docker build --platform linux/amd64 --build-arg TARGETARCH=amd64 --build-arg VERSION=2.2505.2 -t omc:2.2505.2-alpine3.20-amd64 .
# docker run --network omcnet -it omc:2.2505.2-alpine3.20-amd64 /bin/bash
# docker run --privileged=true --restart=always -m 512M \
# -e TZ=Asia/Shanghai \
# -e M_PARAM=lite \
# -p 80:80 \
# -p 443:443 \
# --network omcnet \
# --name omc \
# -d omc:2.2505.2-alpine3.20-amd64
+85
View File
@@ -0,0 +1,85 @@
## 第一阶段 ====> Nodejs打包编译输出前端资源
FROM node:20-alpine AS build-node
# 系统文件
COPY ./linux /linux
# 后端程序
COPY ./omc_api /api
# 前端程序
COPY ./omc_web /web
RUN npm config set registry https://registry.npmmirror.com
RUN cd /web && npm install && npm run build
## 第二阶段 ====> Go打包编译输出后端程序
FROM ubuntu:22.04 AS build-golang
ARG TARGETARCH
ARG VERSION
# 从上个阶段复制文件
COPY --from=build-node /web/dist /web
COPY --from=build-node /api /api
COPY --from=build-node /linux /linux
# 安装 Go 和其他依赖
RUN apt-get update && \
apt-get install -y build-essential libpcap-dev curl \
&& curl -OL https://dl.google.com/go/go1.24.2.linux-$TARGETARCH.tar.gz \
&& tar -C /usr/local -xzf go1.24.2.linux-$TARGETARCH.tar.gz \
&& rm go1.24.2.linux-$TARGETARCH.tar.gz \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# 设置变量
ENV PATH="/usr/local/go/bin:${PATH}"
ENV OS_ARCH="${TARGETARCH:-amd64}"
ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOPROXY=https://goproxy.cn,direct
RUN cd /api && go mod download
RUN cd /api && go build -o omc -v -ldflags "-s -w \
-X 'be.ems/src/framework/config.Version=$VERSION' \
-X 'be.ems/src/framework/config.BuildTime=$(date)' \
-X 'be.ems/src/framework/config.GoVer=$(go version)'"
## 第三阶段 ====> 构建前后端融合镜像
FROM ubuntu:22.04
# 从上个阶段复制文件
COPY --from=build-golang /linux/usr/local/etc/omc /usr/local/etc/omc
COPY --from=build-golang /linux/usr/local/omc /usr/local/omc
COPY --from=build-golang /api/omc /usr/local/bin/omc
COPY --from=build-golang /web /usr/local/etc/omc/web
# 更新apt并安装必要工具
RUN apt-get update && apt-get install -y libpcap-dev nginx
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
RUN apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
# 设置时区和语言环境
ENV LANG="en_US.UTF-8"
ENV TZ="Asia/Shanghai"
WORKDIR /usr/local/etc/omc
RUN chmod +x /usr/local/etc/omc/script/*.sh
RUN /usr/local/etc/omc/script/postunpack.sh
EXPOSE 80 443 33030 33443 33033 33034 33060
CMD [ "/usr/local/etc/omc/script/entrypoint.sh" ]
# build 707MB
# docker docker build --platform linux/amd64 --build-arg TARGETARCH=amd64 --build-arg VERSION=2.2505.2 -t omc:2.2505.2-ubuntu22.04-amd64 .
# docker run --network omcnet -it omc:2.2505.2-ubuntu22.04-amd64 /bin/bash
# docker run --privileged=true --restart=always -m 512M \
# -e TZ=Asia/Shanghai \
# -e M_PARAM=lite \
# -p 80:80 \
# -p 443:443 \
# --network omcnet \
# --name omc \
# -d omc:2.2505.2-ubuntu22.04-amd64
+49
View File
@@ -0,0 +1,49 @@
# Docker 编译
内部文件资源
| 路径 | 说明 |
| --------------------------- | -------------------------- |
| /usr/local/omc/static | 网管静态资源文件路径 |
| /usr/local/omc/upload | 网管上传文件资源路径 |
| /usr/local/etc/omc/omc.yaml | 网管配置文件 |
| /etc/nginx/nginx.conf | nginx 配置 |
| /etc/nginx/conf.d/omc.conf | 网管前端 nginx 代理配置 |
| /var/log | 网管相关日志输出 |
| /tmp/omc | 存放从网元拉取到本地的文件 |
端口声明
| 端口 | 说明 |
| ----- | ----------------------------- |
| 80 | 网管 Nginx HTTP 服务 |
| 443 | 网管 Nginx HTTP2 服务 |
| 33030 | 网管后台 API HTTP 服务 |
| 33443 | 网管后台 API HTTP2 服务 |
| 33033 | 网管信令跟踪 UDP 协议接收服务 |
| 33060 | 网管性能分析监控 metrics 服务 |
容器变量
| 属性 | 说明 |
| ------- | ------------------------------------------------------------------------- |
| M_PARAM | 服务模式(std、lite) std:d 标准版需外接 mariadb lite:轻量版内置 sqlite |
| C_PARAM | 相关厂商定制 |
## 镜像导出导入
```sh
docker save bitnami/keydb:6.3.4 -o keydb_6.3.4.tar
docker save mariadb:10.6.21 -o mariadb_10.6.21.tar
docker save omc:xx -o omc_xx.tar
docker load -i keydb_6.3.4.tar
docker load -i mariadb_10.6.21.tar
docker load -i omc_xx.tar
sudo bash omc-docker.sh install
tar -czvf omc-r2.2505.2-docker-alpine3.20-amd64.tar.gz omc-r2.2505.2-docker-alpine3.20-amd64/
tar -xzvf omc-r2.2505.2-docker-alpine3.20-amd64.tar.gz
```
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purposes
# Load OMC environment variables
. /usr/local/etc/omc/script/omc-env.sh
# We add the copy from default config in the entrypoint to not break users
# case someone mounts a configuration file in /usr/local/etc/omc/default)
cp -n $BASE_DIR/default/omc.conf $BASE_DIR/omc.conf
cp -n $BASE_DIR/default/omc.yaml $BASE_DIR/omc.yaml
# Initialize OMC DB
if [ ! -f /usr/local/etc/omc/machine.ini ]; then
bash /usr/local/etc/omc/script/setup.sh -i -r -m $M_PARAM -c $C_PARAM
fi
# Start Nginx server | -s stop
nginx
# Parse CLI flags to pass to the 'omc' call
args=("--config" "${BASE_DIR}/omc.yaml")
# Add flags specified via the 'CMD_EXTRA_FLAGS' environment variable
read -r -a extra_flags <<< "$CMD_EXTRA_FLAGS"
[[ "${#extra_flags[@]}" -gt 0 ]] && args+=("${extra_flags[@]}")
# Add flags passed to this script
args+=("$@")
# Run omc
omc "${args[@]}"
@@ -0,0 +1,15 @@
# Paths
export BASE_DIR="/usr/local/etc/omc"
export DATA_DIR="/usr/local/omc"
# OMC settings
export M_PARAM="${M_PARAM:-std}"
export C_PARAM="${C_PARAM:-omc}"
# OMC Config settings
export API_HTTP_PORT="${API_HTTP_PORT:-33030}"
export API_HTTPS_PORT="${API_HTTPS_PORT:-33443}"
export WEB_HTTP_PORT="${WEB_HTTP_PORT:-80}"
export WEB_HTTPS_PORT="${WEB_HTTPS_PORT:-443}"
export CMD_EXTRA_FLAGS=""
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purposes
# Load OMC environment variables
. /usr/local/etc/omc/script/omc-env.sh
chmod -R g+rwX "$BASE_DIR" "$DATA_DIR"
chmod +rx /usr/local/bin/omc
# We add the copy from default config in the entrypoint to not break users
# bypassing the setup.sh logic. If the file already exists do not overwrite (in
# case someone mounts a configuration file in /usr/local/etc/omc/default)
cp $BASE_DIR/default/omc.conf $BASE_DIR/omc.conf
cp $BASE_DIR/default/omc.yaml $BASE_DIR/omc.yaml
# OMC config
sed -i "s/addr: "0.0.0.0:33030" # route http port/addr: "0.0.0.0:$API_HTTP_PORT" # route http port/" "$BASE_DIR"/omc.yaml
sed -i "s/addr: "0.0.0.0:33443" # route https port/addr: "0.0.0.0:$API_HTTPS_PORT" # route https port/" "$BASE_DIR"/omc.yaml
sed -i 's/enabled: true # web server enabled/enabled: false # web server enabled/' "$BASE_DIR"/omc.yaml
sed -i 's/host: "127.0.0.1" # mysql host$/host: "omc_mariadb" # mysql host/' "$BASE_DIR"/omc.yaml
sed -i 's/port: 33066 # mysql port$/port: 3306 # mysql port/' "$BASE_DIR"/omc.yaml
sed -i 's/host: "127.0.0.1" # redis host$/host: "omc_keydb" # redis host/' "$BASE_DIR"/omc.yaml
# Nginx config
sed -i 's/#gzip on;/gzip on;/' /etc/nginx/nginx.conf
sed -i '/^include \/etc\/nginx\/conf.d/s/^/# /' /etc/nginx/nginx.conf
sed -i 's/include \/etc\/nginx\/http.d/include \/etc\/nginx\/conf.d/' /etc/nginx/nginx.conf
sed -i 's/# gzip_/gzip_/' /etc/nginx/nginx.conf
sed -i 's/include \/etc\/nginx\/sites-enabled/# include \/etc\/nginx\/sites-enabled/' /etc/nginx/nginx.conf
rm -rf /etc/nginx/conf.d && mkdir -p /etc/nginx/conf.d
cp -rf /usr/local/etc/omc/nginx/omc.conf /etc/nginx/conf.d
touch /usr/local/etc/omc/web/config.js && echo 'sessionStorage.clear()' | tee /usr/local/etc/omc/web/config.js
sed -i "s/33030;/$API_HTTP_PORT;/" /etc/nginx/conf.d/omc.conf
sed -i "s/33443;/$API_HTTPS_PORT;/" /etc/nginx/conf.d/omc.conf
sed -i "s/80;/$WEB_HTTP_PORT;/" /etc/nginx/conf.d/omc.conf
sed -i "s/443;/$WEB_HTTPS_PORT;/" /etc/nginx/conf.d/omc.conf
+143
View File
@@ -0,0 +1,143 @@
#!/usr/bin/env bash
OMC_CONTAINER_NAME="omc"
MYSQL_CONTAINER_NAME="omc_mariadb"
REDIS_CONTAINER_NAME="omc_keydb"
# usage
usage() {
echo "Usage: bash omc-docker.sh [install|uninstall|restart|start|stop]"
exit 1
}
# install
install(){
echo "====================== Install container omc service ====================="
echo "Install mysql and redis service program, default N (Y/N):"
read DB_SERVICE
DB_SERVICE=${DB_SERVICE:-"N"}
echo "Select the image in the tar directory (omc_{version}-{system}-{arch}.tar):"
read OMC_FILE
OMC_FILE=${OMC_FILE:-"omc_{version}-{system}-{arch}.tar"}
echo "Container time zone (Asia/Shanghai):"
read OMC_TZ
OMC_TZ=${OMC_TZ:-"Asia/Shanghai"}
echo "Container service http port (80):"
read OMC_HTTP_PORT
OMC_HTTP_PORT=${OMC_HTTP_PORT:-"80"}
echo "Container service https port (443):"
read OMC_HTTPS_PORT
OMC_HTTPS_PORT=${OMC_HTTPS_PORT:-"443"}
echo "Container name ($OMC_CONTAINER_NAME):"
read OMC_CONTAINER_NAME
OMC_CONTAINER_NAME=${OMC_CONTAINER_NAME:-"omc"}
sed -i "s/^OMC_CONTAINER_NAME=.*/OMC_CONTAINER_NAME=\"$OMC_CONTAINER_NAME\"/" ./omc-docker.sh
echo "===================== Start ====================="
echo "==> Checking Docker version"
if sudo docker -v > /dev/null 2>&1; then
sudo docker -v
else
echo "Docker is not available or sudo privileges are not granted."
exit 1
fi
echo "==> Created service network"
NETWORK="omcnet"
if ! docker network ls --filter name=$NETWORK -q | grep -q .; then
docker network create $NETWORK
echo "Network '$NETWORK' created."
else
echo "Network '$NETWORK' already exists."
fi
echo "==> Install service mysql and redis container"
if [[ "$DB_SERVICE" =~ ^[Yy]$ ]]; then
# MySQL Config
mysql_container=$(docker ps --filter "name=$MYSQL_CONTAINER_NAME" --format "{{.Names}}")
if [[ -z "$mysql_container" ]]; then
echo "MySQL container is not running. Installing MySQL container..."
docker load --input $(pwd)/tar/mariadb_10.6.21_{arch}.tar
MYSQL_IMAGE="mariadb-{arch}:10.6.21"
MYSQL_ROOT_PASSWORD="1000omc@kp!"
MYSQL_DATA=/usr/local/etc/$MYSQL_CONTAINER_NAME/data
mkdir -p $MYSQL_DATA && chmod 777 $MYSQL_DATA
docker run --privileged=true --restart=always -e TZ="$OMC_TZ" \
-e MARIADB_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD \
-e MARIADB_DATABASE=omc_db \
-v $MYSQL_DATA:/var/lib/mysql \
--network $NETWORK \
--name $MYSQL_CONTAINER_NAME \
-d $MYSQL_IMAGE
else
echo "MySQL container is already running: $mysql_container"
fi
# Redis Config
redis_container=$(docker ps --filter "name=$REDIS_CONTAINER_NAME" --format "{{.Names}}")
if [[ -z "$redis_container" ]]; then
echo "Redis container is not running. Installing Redis container..."
docker load --input $(pwd)/tar/keydb_6.3.4_{arch}.tar
REDIS_IMAGE="keydb-{arch}:6.3.4"
REDIS_PASSWORD="helloearth"
REDIS_DATA=/usr/local/etc/$REDIS_CONTAINER_NAME/data
mkdir -p $REDIS_DATA && chmod 777 $REDIS_DATA
docker run --privileged=true --restart=always -e TZ="$OMC_TZ" \
-e KEYDB_PASSWORD=$REDIS_PASSWORD \
-v $REDIS_DATA:/bitnami/keydb/data \
--network $NETWORK \
--name $REDIS_CONTAINER_NAME \
-d $REDIS_IMAGE
else
echo "Redis container is already running: $redis_container"
fi
else
echo "You chose not to install MySQL and Redis containers."
fi
echo "==> Loading service omc container"
docker load --input $(pwd)/tar/$OMC_FILE
OMC_IMAGE=$(echo "$OMC_FILE" | sed -e 's/_/:/' -e 's/\.tar$//')
docker run --privileged=true --restart=always -m 512M \
-e TZ=$OMC_TZ \
-p $OMC_HTTP_PORT:80 \
-p $OMC_HTTPS_PORT:443 \
--network $NETWORK \
--name $OMC_CONTAINER_NAME \
-d $OMC_IMAGE
echo "Running service $OMC_CONTAINER_NAME container http port $OMC_HTTP_PORT / https port $OMC_HTTPS_PORT"
}
# uninstall
uninstall(){
docker stop $OMC_CONTAINER_NAME && docker rm $OMC_CONTAINER_NAME
docker stop $REDIS_CONTAINER_NAME && docker rm $REDIS_CONTAINER_NAME
docker stop $MYSQL_CONTAINER_NAME && docker rm $MYSQL_CONTAINER_NAME
}
# According to the input parameters, the corresponding method will be selected for execution, and the instructions will be executed without input.
case "$1" in
"install")
install
;;
"uninstall")
uninstall
;;
"restart")
echo "restart container $OMC_CONTAINER_NAME"
docker restart $OMC_CONTAINER_NAME
;;
"start")
echo "start container $OMC_CONTAINER_NAME"
docker start $OMC_CONTAINER_NAME
;;
"stop")
echo "stop container $OMC_CONTAINER_NAME"
docker stop $OMC_CONTAINER_NAME
;;
*)
usage
;;
esac
View File
Whitespace-only changes.
+137
View File
@@ -0,0 +1,137 @@
Name: omc
Version: {version}
Release: {date}
Summary: OMC-Team
License: Proprietary
Group: Applications/Communications
BuildArch: {arch}
# Software Description ========
%description
OMC for 4G/5G Core Network Software
# Pre-Packaging Script ========
%prep
rm -rf ${RPM_BUILD_ROOT} && mkdir -p ${RPM_BUILD_ROOT}
cp -rf ${RPM_BUILD_DIR}/* ${RPM_BUILD_ROOT}/
chmod 644 ${RPM_BUILD_ROOT}/usr/local/etc/omc/web/wiregasm/wiregasm.wasm
# Pre-Installation Scripts ========
%pre
rm -rf /usr/local/etc/omc/default
# Post-Installation Scripts ========
%post
RootDir=/usr/local/etc/omc
# Perform post-installation configuration
echo ""
echo "Output: $RootDir"
echo "Service:"
echo " sudo systemctl [start|stop|status|restart] omc.service"
echo "Firewall:"
echo " add: "
echo " firewall-cmd --zone=public --add-port=80/tcp --permanent && firewall-cmd --reload"
echo " remove: "
echo " firewall-cmd --zone=public --remove-port=80/tcp --permanent && firewall-cmd --reload"
echo ""
# Check if this is the first installation or upgrade
if [ ! -f $RootDir/machine.ini ]; then
# First installation, perform the related operations
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
# read environment parameter and to do
if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then
bash $RootDir/script/setup.sh -i -m $M_PARAM -c $C_PARAM
elif [ -n "$C_PARAM" ]; then
bash $RootDir/script/setup.sh -i -c $C_PARAM
else
bash $RootDir/script/setup.sh -i
fi
if [ $? -ne 0 ]; then
echo "Initialization failure."
rm -rf $RootDir
exit 1
fi
systemctl daemon-reload
systemctl enable omc.service
systemctl daemon-reload
systemctl restart omc.service
else
# Operation when upgrading
if [ ! -f $RootDir/omc.conf ]; then
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
fi
# Override Configuration
if ! grep -q "# route service configuration" $RootDir/omc.yaml; then
cp -rf $RootDir/default/omc.yaml $RootDir/omc.yaml
fi
# Stop Service
systemctl daemon-reload
systemctl stop omc.service
bash $RootDir/script/setup.sh -u
if [ $? -ne 0 ]; then
echo "Upgrade failed."
exit 1
fi
systemctl daemon-reload
systemctl restart omc.service
fi
echo ""
# Pre-uninstallation script ========
%preun
# Stop Service
systemctl daemon-reload
systemctl stop omc.service
# Post-uninstallation script ========
%postun
case "$1" in
0)
# Uninstallation operations
# Deletion of service files
rm -rf /lib/systemd/system/omc.service
systemctl daemon-reload
# Removal of relevant documents
rm -rf /usr/local/bin/omc
rm -rf /usr/local/etc/omc
;;
1)
# Update Operation
;;
esac
# Included documents ========
%files
%defattr(-,root,root,-)
/lib/systemd/system/*
/usr/local/bin/*
/usr/local/etc/omc/*
/usr/local/omc/*
# Update Log ========
%changelog
* Wed Jan 01 2025 omc <omc@example.com> - {version}
- Build package {date}.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
+1
View File
@@ -0,0 +1 @@
Building a temporary catalog for losing