{"id":13637989,"url":"https://github.com/leoiceo/OpenSA","last_synced_at":"2025-04-19T17:32:48.898Z","repository":{"id":34011830,"uuid":"165206084","full_name":"leoiceo/OpenSA","owner":"leoiceo","description":"资产管理、资产采集、灰度发布、反向代理、批量任务、任务编排、计划任务、日志审计、权限管理、角色管理、部门管理、运维自动化","archived":false,"fork":false,"pushed_at":"2023-02-07T22:14:06.000Z","size":67464,"stargazers_count":300,"open_issues_count":11,"forks_count":107,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-08-03T01:12:00.382Z","etag":null,"topics":["ansible","cd","celery","ci","cmdb","devops","django","linux","nginx","ops","python","python3","ssh","task","windows"],"latest_commit_sha":null,"homepage":"https://blog.imdst.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoiceo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/__init__.py","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-01-11T08:18:47.000Z","updated_at":"2024-06-17T01:24:09.000Z","dependencies_parsed_at":"2024-01-12T20:03:15.817Z","dependency_job_id":null,"html_url":"https://github.com/leoiceo/OpenSA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoiceo%2FOpenSA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoiceo%2FOpenSA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoiceo%2FOpenSA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoiceo%2FOpenSA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoiceo","download_url":"https://codeload.github.com/leoiceo/OpenSA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223805037,"owners_count":17205839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","cd","celery","ci","cmdb","devops","django","linux","nginx","ops","python","python3","ssh","task","windows"],"created_at":"2024-08-02T01:00:38.087Z","updated_at":"2025-04-19T17:32:48.892Z","avatar_url":"https://github.com/leoiceo.png","language":"JavaScript","readme":"# OpenSA 运维自动化平台 \n\n[![Python3](https://img.shields.io/badge/python-3.7-green.svg?style=plastic)](https://www.python.org/)\n[![Django](https://img.shields.io/badge/django-2.1-brightgreen.svg?style=plastic)](https://www.djangoproject.com/)\n[![Ansible](https://img.shields.io/badge/ansible-2.6.3-blue.svg?style=plastic)](https://www.ansible.com/)\n[![Paramiko](https://img.shields.io/badge/paramiko-2.4.2-green.svg?style=plastic)](http://www.paramiko.org/)\n\n#### 架构说明\n* Django 2.1 + Mysql 5.7 + redis 5.0 + celery v4.2.0 \n* 生产环境请使用 nginx + uwsgi,不对公网开放,或者使用SSL双向认证\n* 命令和文件分发基于SSH协议，支持Linux/Windows(cygwin)|支持快速修改为ansible\n* 使用2.7版本inspina模版\n* 支持国际化(默认中/英)，有些细节未完善，欢迎加入完善项目，联系WX “leoiceo” 或者加群(142189771)\n* 如果系统自己用得还不错,请多多推荐给身边的朋友 (star！star！star！......)\n* 欢迎提交功能开发和优化建议！\n\n#### [screenshots](https://github.com/leoiceo/OpenSA/wiki/screenshots) \n* screenshots文件200M以上,建议 download screenshots 目录进行查看\n\n#### [中文指南 wiki](https://github.com/leoiceo/OpenSA/wiki)\n\n#### 安装部署说明\n* 系统: CentOS 7\n```\nsetenforce 0\nsed -i \"s/enforcing/disabled/g\" /etc/selinux/config\n\n# 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文\nlocaledef -c -f UTF-8 -i zh_CN zh_CN.UTF-8\nexport LC_ALL=zh_CN.UTF-8\necho 'LANG=\"zh_CN.UTF-8\"' \u003e /etc/locale.conf\n```\n* 安装 Python3  \u0026\u0026 redis \n```\nwget http://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz\ntar -xvf Python-3.7.1.tar.xz \u0026\u0026 cd Python-3.7.1 \n./configure --prefix=/usr/local/python37\nmake \u0026\u0026 make install\n\nyum install redis -y\nservice redis start\n\n##settings 设置了密码，可自行修改Redis.conf\n```\n* 拉取代码安装模块\n```\ncd /opt/\ngit clone https://github.com/leoiceo/OpenSA\nwget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py\npython ez_setup.py --insecure\n\n# 创建日志目录 \nmkdir -p /data/opensa/logs\n \n# 修改pypi源\nmkdir -p ~/.pip/\ncat \u003e ~/.pip/pip.conf \u003c\u003cEOF\n[global]\nindex-url = http://mirrors.aliyun.com/pypi/simple/\n\n[install]\ntrusted-host=mirrors.aliyun.com\nEOF\n\ncd OpenSA\n/usr/local/python37/bin/pip install -r requirements.txt\n```\n* 初始化数据库 (修改 config.conf 设置DB和redis配置信息)\n```\ncd /opt/OpenSA\nsh migrate.sh\n\n# 初始化权限和用户\npython manage.py permission_data\n\n# 国际化文件生成\ndjango-admin makemessages -l en\ndjango-admin compilemessages\n```\n\n* Celery 后台启动\n```\ncd /opt/OpenSA\nnohup /usr/local/python37/bin/celery -B -A opensa worker --loglevel=INFO  \u0026\n```\n\n* 启动\n```\ncd /opt/OpenSA\npython manage.py runserver 0.0.0.0:8000\n```\n \n* 默认用户名密码\n```\n管理员： opensa@imdst.com\n密码：redhat\n```\n\n#### 交流群QQ: 142189771\n\n#### 截图\n![](https://github.com/leoiceo/OpenSA/blob/master/screenshots/1.png)\n![](https://github.com/leoiceo/OpenSA/blob/master/screenshots/2.png)\n![](https://github.com/leoiceo/OpenSA/blob/master/screenshots/3.png)\n![](https://github.com/leoiceo/OpenSA/blob/master/screenshots/4.png)\n#### 预览进度\n* [博客地址](https://blog.imdst.com/kai-yuan-yun-wei-zi-dong-hua-ping-tai-kai-fa-she-ji-si-lu/)\n\n#### 参与人员\n* pzp\n\n#### 附上一波小广告，【炎陵黄桃】 自家果园，每年8月一季，欢迎尝鲜\n* [快来吃桃了！](https://blog.imdst.com/ylht-zjgy-xzxf/)\n* [微信小程序 【酃峰炎陵黄桃】](https://store.weixin.qq.com/shop/b/qVKjavEqofybIlq?entrance_id=h5)\n* [湘粤避暑度假](https://blog.imdst.com/hu-nan-yan-ling-chu-liao-yun-shang-da-yuan-huan-you-ge-bi-shu-sheng-di-ling-feng-cun/)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=leoiceo/opensa\u0026type=Date)](https://star-history.com/#leoiceo/opensa\u0026Date)\n","funding_links":[],"categories":["运维相关管理系统"],"sub_categories":["运维管理系统"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoiceo%2FOpenSA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoiceo%2FOpenSA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoiceo%2FOpenSA/lists"}