CI/CD

reghao e97cc6f718 PackType 添加一个 none 类型, 并添加一个对应的 EmptyPack 实现, 不对构建打包, 一般用于 mvn install 等安装依赖的场景 2 ماه پیش
agent 7f1b2749ec TailReader 中添加 websocket 发送失败时的处理 2 ماه پیش
bin ba859902a9 agent 模块中添加 logstash 功能, 通过 devopsagent.json 配置文件中的 logstash 参数来指定是否启用日志收集功能 2 ماه پیش
common e97cc6f718 PackType 添加一个 none 类型, 并添加一个对应的 EmptyPack 实现, 不对构建打包, 一般用于 mvn install 等安装依赖的场景 2 ماه پیش
deployer 33cd9a98bf update deployer module 3 ماه پیش
logstash 300716c891 更新 logstash 模块的 TailReader 2 ماه پیش
web e97cc6f718 PackType 添加一个 none 类型, 并添加一个对应的 EmptyPack 实现, 不对构建打包, 一般用于 mvn install 等安装依赖的场景 2 ماه پیش
zzz 2979b995fe update build script 4 ماه پیش
.gitignore 77746bcc59 1.将原来的 bnt 仓库更名为 bnt1, 原来的 devops 仓库更名为 bnt 5 ماه پیش
README.md 77746bcc59 1.将原来的 bnt 仓库更名为 bnt1, 原来的 devops 仓库更名为 bnt 5 ماه پیش
pom.xml 5cad41bb6d 还原读取日志文件的 logstash 模块 2 ماه پیش

README.md

bnt

freemarker 模板来自这个项目 master 分支的 da0aec93 版本

依赖

  • os:Linux
  • jdk:11
  • maven:3.9
  • mysql:5.7

模块

bnt 项目模块:

  • web > 监听 4030 HTTP 端口和 14030 RPC 端口 > > - console 模块 > > 作为 oss 项目的 oss-console 模块 > - blog 模块 > > 一个独立的 blog 服务 > - devops 模块 > > 一个独立的 devops 服务

构建部署

pull 项目源码

cd ~/Downloads
git clone https://git.reghao.cn/reghao/bnt.git

初始化 MySQL

cd ~/Downloads/bnt/zzz
bash db_init.sh

执行 db_init.sh 会自动创建 bnt 项目需要的数据库并初始化数据库表

需要自行指定 db_init.sh 脚本中的 host, username, password 等变量值

构建并运行

cd ~/Downloads/bnt/zzz
bash build_jar.sh

执行 db_init.sh 会自动构建并运行 bntweb 应用 jar 包

build_jar.sh 脚本中的 proj_dir 变量默认是 ~/Downloads/bnt

mvn 构建默认使用 dev 环境, 所以需要修改 web 模块 resources/application-dev.yml 配置文件中的第三方服务配置

运行 bntweb 应用前需要根据环境修改 bnt/web/bin/bntweb.yml 文件中的配置

mysql 配置

运行应用

执行 bnt/web/bin/start.sh 脚本

使用 bntweb.yml 外部配置文件

执行 bnt/web/bin/start1.sh 脚本

根据 mvn 打包选择的 profile, 使用 resources/application-dev.yml 或 resources/application-test.yml 内部配置文件

停止应用

cd ~/Downloads/bnt/web/bin
bash shutdown.sh

执行 shutdown.sh 会结束 bntweb 应用