# aiops **Repository Path**: china-you/aiops ## Basic Information - **Project Name**: aiops - **Description**: AI智能运维平台,全程AI迭代! - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-13 - **Last Updated**: 2026-05-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AI智能运维平台 [![Go Version](https://img.shields.io/badge/Go-1.26+-blue.svg)](https://golang.org/) [![Gin Framework](https://img.shields.io/badge/Gin-1.12+-green.svg)](https://gin-gonic.com/) ## 项目介绍 AI智能运维平台是一个基于Go语言开发的智能化运维管理系统,旨在通过AI技术提升运维效率,实现自动化监控、告警和故障处理。 ## 技术栈 - **语言**: Go 1.26+ - **框架**: Gin 1.12+ - **容器化**: Docker / Docker Compose ## 项目结构 ``` aiops/ ├── cmd/ # 命令行入口 │ └── api/ # API服务入口 ├── internal/ # 内部模块 │ ├── controller/ # REST API控制器 │ ├── service/ # 业务逻辑层 │ ├── model/ # 数据模型 │ ├── middleware/ # 中间件 │ └── repository/ # 数据访问层 ├── pkg/ # 公共包 │ ├── config/ # 配置管理 │ └── utils/ # 工具函数 ├── api/ # API定义 ├── configs/ # 配置文件 ├── .ci/ # CI/CD配置 │ ├── Dockerfile # Docker镜像构建 │ ├── docker-compose.yaml # Docker Compose配置 │ ├── build.sh # 构建脚本 │ └── deploy.sh # 部署脚本 ├── scripts/ # 脚本文件 ├── deploy/ # 部署文件 └── docs/ # 文档 ``` ## 快速开始 ### 环境要求 - Go 1.26+ - Docker (可选) - Docker Compose (可选) ### 本地运行 ```bash # 克隆项目 git clone git@gitee.com:china-you/aiops.git # 进入项目目录 cd aiops # 下载依赖 go mod tidy # 启动服务 go run cmd/api/main.go ``` ### Docker运行 **方式一:使用构建脚本** ```bash # 构建镜像 bash .ci/build.sh # 部署启动 bash .ci/deploy.sh ``` **方式二:手动构建** ```bash # 构建Docker镜像 docker build -f .ci/Dockerfile -t aiops:latest . # 运行容器 docker run -p 8080:8080 aiops:latest ``` **方式三:Docker Compose** ```bash # 使用Docker Compose启动 docker-compose -f .ci/docker-compose.yaml up -d # 查看日志 docker-compose -f .ci/docker-compose.yaml logs -f ``` ### 访问服务 服务启动后,访问以下地址: - 健康检查: `http://localhost:8080/health` - 版本信息: `http://localhost:8080/version` ## API接口 | 接口 | 方法 | 描述 | |------|------|------| | `/health` | GET | 健康检查 | | `/version` | GET | 版本信息 | ## 构建说明 ### 构建参数 | 参数 | 说明 | 默认值 | |------|------|--------| | `VERSION` | 版本号 | git tag/commit | | `BUILD_TIME` | 构建时间 | 当前时间 | | `BUILD_ENV` | 构建环境 | production | ### 手动指定版本构建 ```bash VERSION=1.0.0 BUILD_ENV=production bash .ci/build.sh ``` ## 开发规范 - 使用 Go Modules 管理依赖 - 代码遵循 Go 官方编码规范 - 使用 `go fmt` 格式化代码 ## 贡献指南 1. Fork 本仓库 2. 新建 `Feat_xxx` 分支 3. 提交代码 4. 新建 Pull Request ## 许可证 MIT License