14 Star 36 Fork 4

Saisimon / AGTMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Auto-Generate Template Management System

       d8888  .d8888b. 88888888888 888b     d888  .d8888b.  
      d88888 d88P  Y88b    888     8888b   d8888 d88P  Y88b 
     d88P888 888    888    888     88888b.d88888 Y88b.      
    d88P 888 888           888     888Y88888P888  "Y888b.   
   d88P  888 888  88888    888     888 Y888P 888     "Y88b. 
  d88P   888 888    888    888     888  Y8P  888       "888 
 d8888888888 Y88b  d88P    888     888   "   888 Y88b  d88P 
d88P     888  "Y8888P88    888     888       888  "Y8888P"  

CircleCI Codecov branch Codacy branch grade Total Lines GitHub

AGTMS 是一个基于 Spring Cloud 和 Vue.js 的自定义配置对象管理系统,支持 Oracle、MySQL、MariaDB、SQL Server、PostgreSQL、MongoDB、RESTful 等方式获取数据。

分支

项目结构

.
├── agtms-admin         Spring Boot Admin 服务 (可选)(默认端口:7890, 默认用户:agtms, 密码:agtms7890)
├── agtms-autoconfigure 自动配置支持类库
├── agtms-autotest      自动化测试
├── agtms-example       远程调用示例服务 (默认端口:7899)
├── agtms-parent 
│   ├── agtms-api       内部接口类库
│   ├── agtms-config    配置类库
│   ├── agtms-core      核心类库
│   ├── agtms-jpa       JPA 实现支持类库 (默认为 H2,支持 Oracle、MySQL、MariaDB、SQL Server、PostgreSQL 数据库)
│   ├── agtms-mongodb   MongoDB 实现支持类库 (可选)
│   ├── agtms-redis     Redis 支持类库 (可选)
│   ├── agtms-remote    远程调用实现支持类库 (可选)
│   └── agtms-web       Web 服务 (默认端口:7892, 默认用户:admin, 密码:123456)
├── agtms-record        集成测试报告聚合模块
├── agtms-vue           前端页面 (默认端口:8080)
├── agtms-zuul          Zuul 网关服务 (默认端口:7891)
├── data                Docker 相关数据
│   └── web
|       ├── config      Web 服务额外配置
|       ├── files       Web 服务文件(图片、导入、导出)路径
|       └── libs        Web 服务额外 jar 库路径
├── .env                Docker Compose 环境变量配置
├── docker-compose.yml  Docker Compose 配置
├── README.md           README 文件
├── start.cmd           一键启动脚本 (Windows)
├── stop.cmd            停止脚本 (Windows)
├── start               一键启动脚本 (Unix)
└── stop                停止脚本 (Unix)

先决条件

  1. JRE(JDK) 8+
  2. Node.js
  3. Apache ZooKeeper
  4. RAM 4G+

  1. Docker

安装并启动

一键启动

默认使用 H2 内存数据库,每次重启数据会重制。要想保存数据,请自行配置数据库连接

  1. 准备 Zookeeper 并配置 hosts
  • /etc/hosts (Unix)
  • c:\windows\system32\drivers\etc\hosts (Windows)
<ZooKeeper IP>   zookeeperserver
  1. 执行启动脚本
  • start.cmd 默认会杀掉占用 7890、7891、7892端口的进程,请确认以后再执行操作
# Unix
./start

# Windows
start.cmd
  1. 访问
http://localhost:8080
  1. 日志
data
├── admin 
|   └── agtms-admin.log   Spring Boot Admin 服务日志
├── web 
|   └── agtms-web.log     Web 服务日志
└── zuul
    └── agtms-zuul.log    网关日志

分步启动

默认使用 H2 内存数据库,每次重启数据会重制。要想保存数据,请自行配置数据库连接

  1. 准备 Zookeeper 并配置 hosts
  • /etc/hosts (Unix)
  • c:\windows\system32\drivers\etc\hosts (Windows)
<ZooKeeper IP>   zookeeperserver
  1. 打包
# Unix
./mvnw clean package -Ddockerfile.skip=true

# Windows
mvnw.cmd clean package -Ddockerfile.skip=true
  1. 启动Web 服务 (agtms-web)
java -jar agtms-parent/agtms-web/target/agtms-web.jar
  1. 启动网关服务 (agtms-zuul)
java -jar agtms-zuul/target/agtms-zuul.jar
  1. 启动前端页面 (agtms-vue)
cd agtms-vue
npm install
npm run serve
  1. 访问
http://localhost:8080
  1. 启动 Spring Boot Admin 服务 (agtms-admin)
java -jar agtms-admin/target/agtms-admin.jar
  1. 日志
data
├── admin 
|   └── agtms-admin.log   Spring Boot Admin 服务日志
├── web 
|   └── agtms-web.log     Web 服务日志
└── zuul
    └── agtms-zuul.log    网关服务日志

Docker 容器启动

  1. 安装 Docker CE 或者 Docker EE,请参考官方文档下载安装
  2. 安装 Docker Compose,请参考官方文档下载安装
  3. 编译 Java 项目并生成 Docker 镜像
# Unix
./mvnw clean package

# Windows
mvnw.cmd clean package
  1. data/web/libs 路径下添加对应数据库驱动 jar 包
  • 默认使用 MySQL 5.7
# mysql-connector-java-8.0.16.jar
wget -P data/web/libs http://central.maven.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar
  1. 启动容器
  • WEB_CONFIG_HOME:Web 服务额外配置,默认为 ./data/web/config
  • WEB_LIBS_HOME:Web 服务额外 jar 库路径,默认为 ./data/web/libs
  • REVISION::版本号,默认为最新版本
# Docker Compose
docker-compose up -d

# Docker Swarm
docker stack deploy -c docker-compose.yml agtms
  1. 访问
http://localhost:8080

远程调用示例

  1. 准备 Zookeeper 并配置 hosts
  • /etc/hosts (Unix)
  • c:\windows\system32\drivers\etc\hosts (Windows)
<ZooKeeper IP>   zookeeperserver
  1. 启动 agtms 服务
# Unix
./start

# Windows
start.cmd
  1. 启动 agtms-example 服务
java -jar agtms-example/target/agtms-example.jar
  1. 访问
http://localhost:8080

自动化测试

Chrome

  1. 下载与 Chrome 浏览器对应版本的 Chrome Driver,并解压缩
  2. 配置 Chrome Driver 路径
  • agtms-autotest/src/main/resources/autotest.properties
auto.test.chrome.driver=/Users/saisimon/Downloads/chromedriver
  1. 运行测试用例
  • agtms-autotest/src/test/java/net/saisimon/agtms/autotest/ChromeTest

Firefox

  1. 下载最新版本的 Gecko Driver,并解压缩
  2. 配置 Gecko Driver 路径
  • agtms-autotest/src/main/resources/autotest.properties
auto.test.firefox.driver=/Users/saisimon/Downloads/geckodriver
  1. 运行测试用例
  • agtms-autotest/src/test/java/net/saisimon/agtms/autotest/FirefoxTest
MIT License Copyright (c) 2019 Saisimon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

AGTMS 是一个基于 Spring Cloud 和 Vue.js 的自定义配置对象管理系统,支持 Oracle、MySQL、MariaDB、SQL Server、PostgreSQL、MongoDB、RESTful 等方式获取数据 展开 收起
MIT
取消

发行版 (4)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/saisimon/AGTMS.git
git@gitee.com:saisimon/AGTMS.git
saisimon
AGTMS
AGTMS
dev

搜索帮助