CMDB: configuration and management of IT resources | 运维的权威数据库
Go to file
pycook 8ca93d72f7 GPLv2 2019-11-25 20:35:05 +08:00
api UI: relation type define [done] 2019-11-25 19:23:51 +08:00
docs search by elasticsearch [doing] 2019-11-18 20:02:25 +08:00
logs mkdir logs, ignore *.log 2019-11-01 10:45:35 +08:00
tests License change to GPLv3 2019-11-25 19:42:37 +08:00
.env License change to GPLv3 2019-11-25 19:42:37 +08:00
.gitattributes add .gitattributes 2019-08-28 21:08:28 +08:00
.gitignore mkdir logs, ignore *.log 2019-11-01 10:45:35 +08:00
Dockerfile elastic search [done] 2019-11-19 18:16:31 +08:00
LICENSE change to GPLv2 2019-11-25 20:33:56 +08:00
Makefile update Makefile and support for install by make 2019-11-12 11:55:04 +08:00
Pipfile search by elasticsearch [doing] 2019-11-18 20:02:25 +08:00
README.md GPLv2 2019-11-25 20:35:05 +08:00
autoapp.py License change to GPLv3 2019-11-25 19:42:37 +08:00
celery_worker.py License change to GPLv3 2019-11-25 19:42:37 +08:00
docker-compose.yml elastic search [done] 2019-11-19 18:16:31 +08:00
setup.cfg License change to GPLv3 2019-11-25 19:42:37 +08:00

README.md

CMDB

尽可能实现比较通用的运维资产数据的配置和管理

License UI API

  • 在线预览: CMDB
    • username: admin
    • password: admin

重要提示: master 分支在开发过程中可能处于 不稳定的状态 。 请通过releases获取

Overview

基础资源视图

模型配置

Docker一键快速构建

  • 进入主目录先安装docker环境
    docker-compose up -d

本地搭建: 环境和依赖

  • 存储: mysql, redis
  • python版本: python2.7, >=python3.6

Install

  • 启动mysql服务, redis服务

  • 创建数据库cmdb

  • 拉取代码

git clone https://github.com/pycook/cmdb.git
cd cmdb
cp api/settings.py.example api/settings.py

设置api/settings.py里的database

  • 安装库

    • 后端: pipenv run pipenv install
    • 前端: cd ui && yarn install && cd ..
  • 创建数据库表 pipenv run flask db-setup && pipenv run flask init-cache

  • 可以将docs/cmdb.sql导入到数据库里登录用户和密码都是:admin

  • 启动服务

    • 后端: pipenv run flask run -h 0.0.0.0

    • 前端: cd ui && yarn run serve

    • worker: celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1

    • 浏览器打开: http://127.0.0.1:8000

      • 如果是非本机访问, 要修改ui/.envVUE_APP_API_BASE_URL里的IP地址为后端服务的ip地址

Install by Makefile

  • 启动mysql服务, redis服务

  • 创建数据库cmdb

  • 拉取代码

git clone https://github.com/pycook/cmdb.git
cd cmdb
cp api/settings.py.example api/settings.py

设置api/settings.py里的database

  • 顺序在cmdb目录下执行
    • 环境: make env
    • 启动API: make api
    • 启动UI: make ui
    • 启动worker: make worker

欢迎加入CMDB运维开发QQ群336164978

QQ群