• Stars
    star
    239
  • Rank 167,882 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

链喵 CMDB 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!

链喵 CMDB

DEMO

介绍

重要通知:因本人工作原因,本项目就此完结。之后不提供更新和维护。 项目仅供参考。 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!

项目

项目中文名:链喵

项目英文名:chain

版本 : v1.0.0 最终版本

linux 云主机 管理系统,包含 CMDB系统,webssh登录、命令执行、异步执行shell/python/yml、查看日志、定时任务等功能。

  • 交流群号: 620176501 django开发讨论群

目录结构

DEMO

  • asset 资产
    • api asset/api/asset.html
  • chain 主配置目录
  • crontab 定时任务
  • data 测试数据/Dockerfile目录
  • index 首页及用户处理
  • tasks 任务
  • name 系统用户 | 组 | 权限
  • static css | js
  • templates 静态模板
  • webssh 终端ssh登录 参考的 https://github.com/huashengdun/webssh 此项目

权限

关于权限,采用的为 django-guardian 对象权限 和 django自带auth权限 相结合

举个例子:

  • 新建一个资产项目 [运维] 新建一个资产 [web01] 和 资产用户 [web01-root] 分配到 [运维] 项目下

  • 新建一个用户 [hequan] , 将 [hequan] 分配到用户组 [ops].

  • 系统用户--组对象权限 | 添加 对象类型:[资产项目] 资产项目:[运维] 组:[ops] 权限:[asset | 资产项目 | 只读资产项目]

  • [ hequan ] 获得 [web01] [web01-root] [运维] 可读权限

  • 小权限分5类: [可读 添加(没用到) 修改 删除 执行(后面用来执行cmd 和工具)]

  • [admin] 默认有所有权限

  • 如果想让 [hequan] 有添加资产权限, 选择 系统用户 -- 用户或者组 选择 Can add 资产管理

  • 普通用户 无权限 管理系统用户 和 登录后台

环境

前端模板:

  • INSPINIA 2.7.1

后端:

  • django 2.0.5
  • Python 3.6.5

运行环境:

  • 阿里云 Centos 7.5

数据库:

  • 目前开发阶段 用的 sqlite3,可无缝切换为 mysql

部署

git clone https://github.com/hequan2017/chain.git

修改 chain/settings.py

web_ssh = "47.104.140.38"    ##修改为本机外网IP
web_port = 8002
mkdir /etc/ansible/
cd chain/


yum  install   sshpass  bzip2  redis  wget  -y
systemctl start redis

cd /tmp/
wget https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2
tar xf Twisted-18.4.0.tar.bz2
cd Twisted-18.4.0
python3 setup.py install


pip3   install -r   requirements.txt
cd  chain/
python3     manage.py   makemigrations
python3     manage.py   migrate

python manage.py  shell
from  name.models import Names
user=Names.objects.create_superuser('admin','[email protected]','1qaz.2wsx')
exit()

python3   manage.py runserver 0.0.0.0:80


##
nohup  python36  manage.py  runserver 0.0.0.0:8003  >>  /tmp/chain-http.log   2>&1  &

python3    webssh/main.py    ##启动终端登录功能

celery -B   -A  chain  worker  -l  info
如果遇到报错 ImportError: No module named '_sqlite3' ,可以执行下面的操作

yum -y install sqlite-devel

重新编译python3.6.5

想在windows 环境下运行,请注释 tasks/views.py  以下两行

from   task.ansible_2420.runner import AdHocRunner
from   task.ansible_2420.inventory import BaseInventory

截图

DEMO DEMO DEMO DEMO DEMO

More Repositories

1

go-admin

go web api,包含gin+gorm+jwt+rbac等。
Go
410
star
2

autoops

linux资产管理,cmdb,django, webssh,运维管理平台,数据库操作平台 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Python
356
star
3

cmdb

资产管理、主机管理、批量执行命令|脚本、流量图、webssh 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Python
128
star
4

seal

django-base-templates 主要为 django 开发DEMO, 支持 非前后端分离 和 前后端分离模式 。
Python
124
star
5

go-webssh

go版本 webssh
Go
74
star
6

husky

Django之入门CMDB系统
Python
30
star
7

zabbix-models

zabbix 模板 ansible api
Python
28
star
8

raptor

猛禽 运维平台 项目完结,后续不再更新。
Go
21
star
9

seal-vue

本项目为 https://github.com/hequan2017/seal 项目 前端vue版本 基于 iview-admin 2.5.0 支持 动态菜单 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Vue
16
star
10

coypus

coypus 海狸鼠 基于goframe 的 go web 后端 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Go
12
star
11

pandaAdmin

panda 熊猫后端 https://github.com/hequan2017/panda 前端地址。
Python
7
star
12

go-admin-vue

go-admin-vue
Vue
4
star
13

python-code

python 开发规范
4
star
14

panda

管理平台 https://github.com/hequan2017/pandaAdmin 后端地址
JavaScript
3
star
15

go-web-admin

基本gf的 go web 管理框架
Go
3
star
16

coypus-vue

coypus-vue
Vue
1
star
17

go-micro-hello-world

hello world go 微服务例子
Go
1
star
18

quan

新开始写的运维平台。
Go
1
star
19

seal-d2-admin

seal-d2-admin
JavaScript
1
star
20

pcdn-p2p-peering-bandwidth

点对点 互拉带宽 pcdn
Go
1
star