All Projects → pythonzm → Ops

pythonzm / Ops

基于centos6+python3.6+django2+ansible2.4+celery4.2 运维管理系统,目前实现功能:用户和用户组管理、资产管理、集成ansible2.4、简易堡垒机(主机分配支持rdp以及vnc、用户分配、文件上传下载、配置禁用命令清单、操作录像回放功能)、CI/CD(支持git仓库和svn仓库)、数据库管理(一部分)、celery任务编排、知识库及文件共享

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ops

Opsmanage
自动化运维平台: 代码及应用部署CI/CD、资产管理CMDB、计划任务管理平台、SQL审核|回滚、任务调度、站内WIKI
Stars: ✭ 2,849 (+467.53%)
Mutual labels:  ansible, cmdb, celery
Opensa
资产管理、资产采集、灰度发布、反向代理、批量任务、任务编排、计划任务、日志审计、权限管理、角色管理、部门管理、运维自动化
Stars: ✭ 220 (-56.18%)
Mutual labels:  cmdb, django, celery
Chain
链喵 CMDB 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 240 (-52.19%)
Mutual labels:  cmdb, django, celery
Baize
白泽自动化运维系统:配置管理、网络探测、资产管理、业务管理、CMDB、CD、DevOps、作业编排、任务编排等功能,未来将添加监控、报警、日志分析、大数据分析等部分内容
Stars: ✭ 296 (-41.04%)
Mutual labels:  ansible, cmdb, django
Autoops
linux资产管理,cmdb,django, webssh,运维管理平台,数据库操作平台 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 340 (-32.27%)
Mutual labels:  cmdb, django, celery
Ara
ARA Records Ansible and makes it easier to understand and troubleshoot.
Stars: ✭ 1,176 (+134.26%)
Mutual labels:  ansible, django
Awx
AWX Project
Stars: ✭ 10,469 (+1985.46%)
Mutual labels:  ansible, django
Django Init
Project template used at Fueled for scaffolding new Django based projects. 💫
Stars: ✭ 126 (-74.9%)
Mutual labels:  ansible, django
Ansible Cmdb
Ansible-cmdb takes the output of Ansible's fact gathering and converts it into a static HTML overview page (and other things) containing system configuration information.
Stars: ✭ 2,003 (+299%)
Mutual labels:  ansible, cmdb
Promansible
PromAnsible, 集成了Prometheuse(基于时间序列数据的服务监控系统)和Ansible(超级简单好用的IT自动化系统),并通过事件报警机制把二者紧密的结合在一起,并配以简单易用的WebUI,真正实现了监控-报警-处理一条龙的全自动化服务。
Stars: ✭ 183 (-63.55%)
Mutual labels:  ansible, django
Opendevops
CODO是一款为用户提供企业多混合云、一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台
Stars: ✭ 2,990 (+495.62%)
Mutual labels:  ansible, cmdb
Cookiecutter Django Ansible
Powered by Cookiecutter, Cookiecutter Django Ansible is a framework for jumpstarting an ansible project for provisioning a server that is ready for your cookiecutter-django application.
Stars: ✭ 69 (-86.25%)
Mutual labels:  ansible, django
Web develop
《Python Web开发实战》书中源码
Stars: ✭ 1,146 (+128.29%)
Mutual labels:  ansible, celery
Wagtail Pipit
Pipit is a Wagtail CMS boilerplate which aims to provide an easy and modern developer workflow with a React-rendered frontend.
Stars: ✭ 109 (-78.29%)
Mutual labels:  ansible, django
Yesterday I Learned
Brainfarts are caused by the rupturing of the cerebral sphincter.
Stars: ✭ 50 (-90.04%)
Mutual labels:  ansible, django
Opscloud
运维管理平台(阿里云),自动同步阿里云配置信息,堡垒机(容器),批量运维,Kubernetes,Zabbix管理等功能
Stars: ✭ 788 (+56.97%)
Mutual labels:  ansible, cmdb
Letsmapyournetwork
Lets Map Your Network enables you to visualise your physical network in form of graph with zero manual error
Stars: ✭ 305 (-39.24%)
Mutual labels:  django, celery
Django Celery Results
Celery result back end with django
Stars: ✭ 337 (-32.87%)
Mutual labels:  django, celery
Polemarch
Simple WEB gui for infrastructure management by ansible playbooks or modules. This is only mirror with bins in releases.
Stars: ✭ 530 (+5.58%)
Mutual labels:  ansible, django
Adminset
自动化运维平台:CMDB、CD、DevOps、资产管理、任务编排、持续交付、系统监控、运维管理、配置管理
Stars: ✭ 2,985 (+494.62%)
Mutual labels:  cmdb, django

ops

基于centos6+python3.6+django2+ansible2.4+celery4.2 运维管理系统-开发中,目前实现功能:用户和用户组管理、日程管理、资产管理、集成ansible、简易堡垒机(主机分配(支持Linux和Windows)、用户分配、文件上传下载、配置禁用命令清单、操作录像回放功能)、数据库管理(一部分)、CI/CD(支持git仓库和svn仓库)、celery任务编排、基于markdown编辑器的知识库支持实时预览和全局搜索结果高亮和文件共享中心

4.24更新

资产管理新增了阿里云主机自动拉取入库功能,像其他腾讯云、华为云等实现方法都差不多就没一一实现,本来想写一些关于docker管理的东西,但感觉没什么实际应用场景,现在 k8s 编排这么流行,就没写,不过在我的博客文章中 django实现web端登录docker 简单的写了下web端登录docker容器的方法,然后这篇文章 docker 配置远程加密调用 描述了如何开启docker远程调用

无耻的推一波我的博客:https://www.poorops.com/#/ 自动拉取阿里云主机实现方法参考 https://github.com/opendevops-cn/codo-cmdb/blob/master/libs/aliyun/rds.py

安装

一、安装python3.6

建议安装虚拟环境,具体步骤参考https://github.com/pyenv/pyenv

二、安装模块

git clone https://github.com/pythonzm/Ops.git
pip install -r requirements.txt

// 因为django-celery-results的pip包与github上不一致,所以使用下面方法安装
pip install https://github.com/celery/django-celery-results/zipball/master#egg=django-celery-results

三、安装mysql

建议MySQL5.6,安装过程略

vim /etc/my.cnf
## 设置字符集
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake

## 忽略大小写
lower_case_table_names=1

/etc/init.d/mysqld restart
# mysql -uroot -p
mysql>create database ops DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql>grant all privileges on ops.* to [email protected]'%' identified by 'password';
mysql>quit

四、安装redis(略)

五、安装mongodb(略)

六、配置celery后台运行,或查看官网

cp conf/celeryd.conf /etc/default/celeryd
### 将配置文件里的内容按照实际情况更改

cp conf/celeryd.server /etc/init.d/celeryd
cp conf/celerybeat.server /etc/init.d/celerybeat
/etc/init.d/celeryd start  ##如果出现celeryd无法启动,则添加环境变量:export C_FORCE_ROOT="true"
/etc/init.d/celerybeat start

七、配置获取主机内存脚本

cp conf/get_mem.py /path/to/your ansible python module location  ##可以使用ansbile --version命令查看路径

八、安装Guacamole用于支持web端登录Windows服务器以及开启VNC的服务器(可选)

安装步骤建议参考官方文档:https://guacamole.apache.org/doc/gug/installing-guacamole.html

安装完成后,修改settings.py中的 GUACD_HOST和 GUACD_PORT,改为guac服务启动后监听的地址和端口

功能实现参考:https://github.com/mohabusama/pyguacamole以及https://github.com/jimmy201602/django-guacamole

九、启动服务

需要将Ops目录中的settings.py celery.py按照实际情况更改

python manage.py makemigrations users assets dbmanager fort plan projs task wiki
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8000

以下为部分截图:

系统操作日志

image image

用户管理

image

日程管理

参考:https://github.com/RobbieHan/sandboxOA image

添加用户以及分配用户权限(采用的django自带的权限系统)等,用户组同理

image

资产概览

image

资产拉取

可以自动同步阿里云中的ECS,并同步至资产列表中,只写了阿里云的ECS同步,至于RDS等资产或其他像腾讯云、华为云的实现方式基本一致

实现方式参考:https://github.com/opendevops-cn/codo-cmdb

image

资产管理,需要关联的项目管理只完成了一部分

image

资产详细,CPU等信息可以通过收集按钮自动获取

image

资产监控

image

ansible执行模块

image

ansible执行playbook

image

ansible role编辑

image

webssh分配主机及用户、用户组

image

webssh终端,包括文件的上传下载

image

webssh操作记录回放

image

web端登录Windows服务器

image

登录日志查看

image

webssh命令查看

image

数据库用户管理,包括新增用户,修改用户,密码,权限

数据库管理用户,该用户需要有grant option权限,并且只能授权该用户所拥有的权限 image

数据库执行命令

image

数据库操作记录

image

CI/CD项目配置

image

注意:如果是启动tomcat项目,启动命令需要加上nohup,由于ansible运行机制问题

CI/CD部署流程

image

CI/CD部署日志

image

自定义项目架构

image

celery任务编排

image

新增文章

image

文章详细

image

用到的一些开源产品

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].