# infra **Repository Path**: dalao708/infra ## Basic Information - **Project Name**: infra - **Description**: infrastructure基础架构服务 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-06-16 - **Last Updated**: 2023-08-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # infra #### 介绍 基础服务框架 #### 软件架构 软件架构说明 名称 | 技术 | ---- | ----| 数据库 | mysql8、redis 服务注册中心 | nacos2.0.3(port:8848) 配置中心 | nacos2.0.3(port:8848) 网关 | gateway 认证和鉴权方案 | Security+Oauth2+jwt+Redis+gateway+mysql 日志管理 | ELK(ELKB)(同一版本7.14.0)框架,Elasticsearch(port:9200)+Logstash(port:5044)+Kibana(port:5601)+fileBeat #### 安装教程 相关附件下载 链接:https://pan.baidu.com/s/1gSavM8f0saRa5-JyuTWZVA 提取码:gpyc #### 模块说明 名称 | 技术 | ---- | ----| common-api | 公共模块 common-log | 日志模块(已弃用,保留做参考),使用aop和注解方式记录操作日志 infra-gateway | 网关 infra-business | 基础业务工程 infra-auth | 认证授权工程 infra-monitor | 监控工程 #### 快速开始 - 系统要安装基本的mysql、redis环境,相关的环境的密码不一致要做变动 - mysql创建nacos_config数据库,执行/nacos/conf/nacos-mysql.sql文件添加相关表 - 修改/nacos/conf/application.properties配置文件,增加数据库链接配置 ```shell db.num=1 db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC db.user.0=root db.password.0=123456 ``` - 修改/nacos/bin/startup.cmd启动文件,改为单机启动 ```shell # 修改set MODE="cluster"为以下命令,由集群启动改为单机启动 set MODE="standalone" ``` - 双击/nacos/bin/startup.cmd启动文件启动nacos - 登陆nacos并导入infra/integration目录下的nacos_config_xxxx.zip压缩包的配置 - mysql创建infra数据库,导入infra/integration/sql/infra.sql数据库文件 - IDEA导入infra工程,IDEA setting配置要做相关的maven配置 - IDEA启动后端工程infra-auth、infra-business、infra-gateway;IDEA需要配置环境变量:编辑Edit Configurations下的相关工程配置Active profiles=”dev“环境配置。 或者bootstrap.yml添加以下环境变量 ```shell spring: profiles: active: dev ``` - 前端工程infra-portal需要系统安装了node环境 ```shell # 进入infra-portal根目录安装相关依赖 npm i # 启动 npm run serve ``` #### 其他 1. gitee地址 [https://gitee.com/dalao708/infra](https://gitee.com/dalao708/infra) 2. github地址 [https://github.com/708DaLao/infra](https://github.com/708DaLao/infra)